/* ===== VARIABLES ===== */
:root {
  --primary: #00a67e;
  --primary-dark: #007a5e;
  --primary-light: #e6f7f3;
  --accent: #ff6b35;
  --dark: #1a1a2e;
  --text: #333344;
  --text-light: #666677;
  --bg: #ffffff;
  --bg-alt: #f8f9fc;
  --border: #e8eaf0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.14);
  --radius: 14px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

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

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--dark);
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  transition: all 0.2s;
}

.nav-link:hover { background: var(--bg-alt); color: var(--primary); }

.nav-dropdown { position: relative; }

.nav-btn {
  padding: 8px 14px;
  border: none;
  background: none;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-btn:hover { background: var(--bg-alt); color: var(--primary); }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 180px;
  box-shadow: var(--shadow-hover);
}

.nav-dropdown:hover .dropdown-menu { display: flex; flex-direction: column; }

.dropdown-menu a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: background 0.2s;
}

.dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }

.nav-right { margin-left: auto; }

.btn-login {
  padding: 8px 20px;
  border: 2px solid var(--border);
  background: none;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-login:hover { border-color: var(--primary); color: var(--primary); }

.mobile-menu-btn {
  display: none;
  border: none;
  background: none;
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.2s;
}

.mobile-menu a:hover { background: var(--bg-alt); color: var(--primary); }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 80px 24px 100px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #fef9f6 0%, #f0fdf9 50%, #fdf0ff 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 50%, rgba(0,166,126,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 500px 300px at 80% 30%, rgba(255,107,53,0.07) 0%, transparent 70%);
}

.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-title em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--primary);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 32px;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 16px 36px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(0,166,126,0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,166,126,0.4);
}

.hero-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.hero-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
}

.s1 {
  width: 300px; height: 300px;
  background: var(--primary);
  top: -100px; right: -80px;
  animation: float 8s ease-in-out infinite;
}

.s2 {
  width: 200px; height: 200px;
  background: var(--accent);
  bottom: -60px; left: -60px;
  animation: float 10s ease-in-out infinite reverse;
}

.s3 {
  width: 150px; height: 150px;
  background: #6c63ff;
  top: 50%; left: 10%;
  animation: float 12s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* ===== TOOLS SECTIONS ===== */
.tools-section { padding: 60px 24px; }
.alt-bg { background: var(--bg-alt); }

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

.section-title {
  margin-bottom: 32px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.img-tag { background: #fff0f8; color: #d63384; }
.vid-tag { background: #fff3e0; color: #e65100; }
.aud-tag { background: #f3e5f5; color: #7b1fa2; }
.xls-tag { background: #e8f5e9; color: #2e7d32; }
.pdf-tag { background: var(--primary-light); color: var(--primary); }

.sub-section {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-light);
  margin: 32px 0 16px;
  text-transform: uppercase;
}

/* ===== TOOL CARDS ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.popular-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.25s;
  cursor: pointer;
}

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

.tool-card.featured {
  grid-column: span 2;
  background: var(--primary-light);
  border-color: var(--primary);
}

.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.tool-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.tool-info p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.4;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .logo { color: white; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.6; opacity: 0.7; }

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  color: white;
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  opacity: 0.7;
  margin-bottom: 10px;
  transition: opacity 0.2s;
}

.footer-col a:hover { opacity: 1; color: var(--primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer-links { display: flex; gap: 24px; }

/* ===== TOOL PAGE ===== */
.tool-page {
  min-height: 80vh;
  padding: 60px 24px;
}

.tool-page-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.tool-page-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}

.tool-page-header p {
  color: var(--text-light);
  font-size: 1rem;
}

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

.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

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

.upload-area h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.upload-area p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 20px; }

.btn-upload {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload:hover { background: var(--primary-dark); transform: translateY(-1px); }

.file-input { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links, .nav-right { display: none; }
  .mobile-menu-btn { display: block; }

  .hero { padding: 60px 20px 80px; }

  .tools-grid, .popular-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .tool-card.featured { grid-column: span 1; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .tools-grid, .popular-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== STATUS & PROGRESS ===== */
.status-msg {
  display: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  margin: 16px auto;
  max-width: 700px;
  font-weight: 600;
  text-align: center;
}
.status-msg.info { background: #e8f4fd; color: #1565c0; }
.status-msg.success { background: #e8f5e9; color: #2e7d32; }
.status-msg.error { background: #ffebee; color: #c62828; }

#progressWrap {
  display: none;
  max-width: 700px;
  margin: 12px auto;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
  height: 28px;
}
#progressBar {
  height: 100%;
  background: var(--primary);
  border-radius: 50px;
  text-align: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 28px;
  transition: width 0.3s ease;
  width: 0%;
}

.tool-options {
  max-width: 700px;
  margin: 24px auto;
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}

.tool-options h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--dark);
}

.option-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.option-row label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  min-width: 80px;
}

.option-row input, .option-row select {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  flex: 1;
  min-width: 120px;
}

.option-row input:focus, .option-row select:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-process {
  display: block;
  width: 100%;
  max-width: 700px;
  margin: 16px auto;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-process:hover { background: var(--primary-dark); transform: translateY(-2px); }

.btn-download {
  display: none;
  padding: 12px 28px;
  background: #2e7d32;
  color: white;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  margin: 8px auto;
  text-align: center;
}

#ocrResult {
  display: none;
  max-width: 700px;
  margin: 16px auto;
}
#ocrResult textarea {
  width: 100%;
  height: 200px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  resize: vertical;
}

.selected-files {
  max-width: 700px;
  margin: 12px auto;
  font-size: 0.88rem;
  color: var(--text-light);
}
