:root {
  --primary: #6C63FF;
  --primary-dark: #5A52E0;
  --primary-light: #8B85FF;
  --accent: #FFD700;
  --accent-dark: #E6C200;
  --white: #FFFFFF;
  --dark: #2D3436;
  --dark-light: #636E72;
  --gray: #B2BEC3;
  --light-bg: #F8F9FA;
  --light-border: #E9ECEF;
  --success: #27AE60;
  --error: #E74C3C;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: all 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Offset for fixed navbar when scrolling to anchors */
[id] { scroll-margin-top: 80px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* === NAVBAR === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--light-border);
  padding: 0 24px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark) !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo:hover { color: var(--primary) !important; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--dark-light);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover { color: var(--primary); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.nav-links a:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: var(--transition);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #4834D4 100%);
  color: var(--white);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-5%, -5%); }
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 32px;
  position: relative;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,99,255,0.4);
}

.btn-accent {
  background: var(--accent);
  color: var(--dark);
}
.btn-accent:hover {
  background: var(--accent-dark);
  color: var(--dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,215,0,0.4);
}

.btn-download {
  background: var(--success);
  color: var(--white);
  font-size: 1.1rem;
  padding: 16px 40px;
}
.btn-download:hover {
  background: #219A52;
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.85rem;
  border-radius: 50px;
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* === TOOL GRID === */
.tools-section {
  padding: 80px 24px;
  background: var(--light-bg);
}

.tools-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 48px;
  color: var(--dark);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.tool-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--dark);
  display: block;
  border: 1px solid transparent;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  color: var(--dark);
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(108,99,255,0.05));
  margin: 0 auto 16px;
}

.tool-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--dark-light);
  line-height: 1.5;
}

/* === UPLOAD AREA === */
.upload-section {
  padding: 60px 24px;
}

.upload-area {
  max-width: 700px;
  margin: 0 auto;
  border: 3px dashed var(--gray);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: var(--light-bg);
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: rgba(108,99,255,0.05);
}

.upload-area.dragover {
  border-style: solid;
  transform: scale(1.02);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.upload-area h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.upload-area p {
  color: var(--dark-light);
  margin-bottom: 20px;
}

.upload-area input[type="file"] { display: none; }

/* === FILE LIST === */
.file-list {
  max-width: 700px;
  margin: 24px auto;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  animation: slideUp 0.3s ease;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.file-info .file-icon { font-size: 1.3rem; }

.file-info .file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-info .file-size {
  color: var(--dark-light);
  font-size: 0.85rem;
  white-space: nowrap;
}

.file-remove {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}
.file-remove:hover { background: rgba(231,76,60,0.1); }

/* === TOOL OPTIONS === */
.tool-options {
  max-width: 700px;
  margin: 24px auto;
  padding: 24px;
  background: var(--light-bg);
  border-radius: var(--radius);
}

.tool-options label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.tool-options select,
.tool-options input[type="text"],
.tool-options input[type="password"],
.tool-options input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--light-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
}

.tool-options select:focus,
.tool-options input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

/* === PROCESS BUTTON === */
.process-section {
  text-align: center;
  padding: 24px;
}

/* === PROGRESS BAR === */
.progress-container {
  max-width: 700px;
  margin: 24px auto;
  display: none;
}

.progress-bar {
  height: 8px;
  background: var(--light-border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  width: 0%;
  transition: width 0.5s ease;
}

.progress-text {
  text-align: center;
  margin-top: 12px;
  color: var(--dark-light);
  font-size: 0.9rem;
}

/* === RESULT === */
.result-section {
  max-width: 700px;
  margin: 24px auto;
  text-align: center;
  display: none;
  animation: fadeIn 0.5s ease;
}

.result-section.show { display: block; }

.result-card {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid var(--success);
  border-radius: var(--radius);
  padding: 40px;
}

.result-card .result-icon { font-size: 3rem; margin-bottom: 16px; }
.result-card h3 { font-size: 1.3rem; margin-bottom: 8px; color: var(--success); }
.result-card .result-size { color: var(--dark-light); margin-bottom: 24px; }

/* === TRUST BADGES === */
.trust-section {
  padding: 60px 24px;
  background: var(--white);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.trust-item .trust-icon { font-size: 2rem; margin-bottom: 12px; }
.trust-item h4 { font-size: 1rem; margin-bottom: 4px; }
.trust-item p { font-size: 0.85rem; color: var(--dark-light); }

/* === HOW IT WORKS === */
.how-section {
  padding: 80px 24px;
  background: var(--light-bg);
}

.how-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 48px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.how-step .step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 auto 16px;
}

.how-step h4 { font-size: 1.1rem; margin-bottom: 8px; }
.how-step p { font-size: 0.9rem; color: var(--dark-light); }

/* === FAQ === */
.faq-section {
  padding: 80px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

.faq-item {
  border: 1px solid var(--light-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  background: var(--white);
  transition: var(--transition);
}

.faq-question:hover { background: var(--light-bg); }

.faq-arrow {
  transition: transform 0.3s;
  font-size: 0.8rem;
  color: var(--dark-light);
}

.faq-item.active .faq-arrow { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: var(--light-bg);
  padding: 0 24px;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 18px 24px;
}

/* === BREADCRUMB === */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.9rem;
  color: var(--dark-light);
}

.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* === TOOL PAGE === */
.tool-header {
  text-align: center;
  padding: 40px 24px 20px;
}

.tool-header .tool-page-icon { font-size: 3rem; margin-bottom: 16px; }
.tool-header h1 { font-size: 2.2rem; margin-bottom: 12px; }
.tool-header p { color: var(--dark-light); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* === RELATED TOOLS === */
.related-section {
  padding: 60px 24px;
  background: var(--light-bg);
}

.related-section h3 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 32px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

/* === FOOTER === */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 24px 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(45,52,54,0.95);
  color: var(--white);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 99999;
  font-size: 0.85rem;
  transform: translateY(100%);
  transition: transform 0.5s ease;
  backdrop-filter: blur(10px);
}

.cookie-banner.show { transform: translateY(0); }
.cookie-banner a { color: var(--accent); }

/* === TOAST === */
.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  background: var(--error);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  z-index: 9999;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s ease;
  max-width: 400px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success { background: var(--success); }

/* === SPINNER === */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* === LEGAL PAGES === */
.legal-page { padding: 60px 24px; max-width: 800px; margin: 0 auto; }
.legal-page h1 { font-size: 2rem; margin-bottom: 24px; }
.legal-page h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.legal-page p { margin-bottom: 16px; color: var(--dark-light); }

/* === ERROR PAGE === */
.error-page { text-align: center; padding: 120px 24px; }
.error-page h1 { font-size: 6rem; color: var(--primary); }
.error-page p { font-size: 1.2rem; color: var(--dark-light); margin: 16px 0 32px; }

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
  }

  body { padding-top: 64px; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--light-border);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
  }

  .nav-links.open { transform: translateY(0); }

  .hero h1 { font-size: 1.6rem; line-height: 1.3; }
  .hero p { font-size: 0.88rem; margin-bottom: 20px; line-height: 1.5; }
  .hero { padding: 32px 20px; }

  .container { padding: 0 16px; }

  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .tool-card { padding: 20px 16px; }
  .tool-icon { width: 56px; height: 56px; font-size: 2rem; }

  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .how-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr; }

  .upload-area { padding: 30px 16px; }
  .upload-area h3 { font-size: 1.1rem; }
  .tool-header h1 { font-size: 1.5rem; }
  .tool-header { padding: 24px 16px 16px; }
  .tool-page-icon { font-size: 2.5rem; }

  .faq-question { padding: 14px 16px; font-size: 0.9rem; }
  .faq-item.active .faq-answer { padding: 14px 16px; font-size: 0.9rem; }

  .tools-section, .trust-section, .how-section, .related-section { padding: 40px 16px; }
  .faq-section { padding: 40px 16px; }

  .btn { padding: 12px 24px; font-size: 0.95rem; }
  .btn-download { padding: 14px 32px; }

  .cookie-banner { padding: 12px 16px; gap: 12px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.9rem; }

  .tool-card { padding: 16px 12px; }
  .tool-card h3 { font-size: 1rem; }
  .tool-card p { font-size: 0.85rem; }

  .cookie-banner { flex-direction: column; gap: 10px; text-align: center; }

  .nav-container { padding: 0 12px; }
}
