/* ============================================================
   ZerovianTools - Design System
   Dark glassmorphism + vibrant gradient aesthetics
   ============================================================ */

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

:root {
  --bg: #0a0a0f;
  --bg2: #0f0f1a;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-h: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.10);
  --border-h: rgba(255, 255, 255, 0.20);
  --text: #e8e8f0;
  --text-muted: #7878a0;
  --accent1: #6c63ff;
  --accent2: #ff6b9d;
  --accent3: #00d8b4;
  --accent4: #ffd93d;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  --font: 'Inter', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

html.i18n-pending body {
  visibility: hidden;
}

html.i18n-ready body {
  visibility: visible;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Background Orbs ── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: drift 20s ease-in-out infinite alternate;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--accent1);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent2);
  bottom: -150px;
  right: -100px;
  animation-delay: -7s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: var(--accent3);
  top: 40%;
  left: 50%;
  animation-delay: -14s;
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(60px, 40px) scale(1.15);
  }
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.6rem;
}

.logo-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-icon-svg {
  width: 30px;
  height: 30px;
  display: inline-block;
  flex: 0 0 auto;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.logo-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: 48px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color .2s;
}

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

.app-download-drawer {
  position: absolute;
  top: 100%;
  left: 210px;
  /* Aligned roughly below the shifted nav-links */
  width: auto;
  z-index: 101;
  padding: 10px 0 0;
}

.app-download-drawer__inner {
  width: fit-content;
  margin-left: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(20, 22, 34, 0.98), rgba(14, 16, 26, 0.96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

/* ── Nav Controls (Mobile/Capacitor) ── */
.nav-ctrl-btn {
  background: linear-gradient(180deg, rgba(40, 43, 61, 0.95), rgba(20, 22, 34, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s, transform .12s, box-shadow .2s;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-ctrl-btn:active {
  transform: scale(0.92);
}

.nav-ctrl-btn:hover {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

.nav-ctrl-btn.exit-btn {
  color: #ff9ca7;
  border-color: rgba(255, 110, 120, 0.34);
}

.nav-ctrl-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav-controls {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(19, 22, 37, 0.78), rgba(8, 10, 18, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

@media (max-width: 768px) {
  .logo-badge {
    display: none;
  }

  .bottom-nav-controls {
    gap: 12px;
    padding: 10px 12px;
    border-radius: 22px;
  }

  .nav-ctrl-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }
}

/* ── Language Switcher ── */
.lang-switcher {
  position: relative;
  margin-left: auto;
}

.nav-links+.lang-switcher {
  margin-left: 24px;
}

.lang-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: border-color .2s, background .2s;
}

.lang-btn:hover {
  border-color: var(--border-h);
  background: var(--surface-h);
}

.lang-caret {
  font-size: 0.65rem;
  opacity: .7;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 120px;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
}

.lang-dropdown.open {
  display: flex;
}

.lang-option {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.lang-option:hover,
.lang-option.active {
  background: rgba(108, 99, 255, 0.12);
  color: var(--text);
}

.lang-option.active {
  font-weight: 700;
}

.category-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 40px 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.95);
}

.section-category {
  margin-bottom: 60px;
}


.cookie-consent {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1500;
  display: flex;
  justify-content: center;
}

.cookie-consent__content {
  width: min(980px, 100%);
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(12, 14, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
}

.cookie-consent__text strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.cookie-consent__text p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.cookie-consent__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 140px;
}

.cookie-consent__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  color: var(--accent3);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
}

.cookie-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  cursor: pointer;
  min-height: 42px;
  line-height: 1.2;
}

.cookie-consent__btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
}

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 30px;
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.3);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent3);
  width: fit-content;
  box-shadow: 0 0 20px rgba(0, 216, 180, 0.15);
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent1) 0%, var(--accent2) 50%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(108, 99, 255, 0.4);
  transition: transform .2s, box-shadow .2s;
  width: fit-content;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(108, 99, 255, 0.55);
}

.btn-arrow {
  font-size: 1.1rem;
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(4px)
  }
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.center-blob {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent1) 0%, var(--accent2) 50%, var(--accent3) 100%);
  opacity: 0.25;
  filter: blur(40px);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: .25
  }

  50% {
    transform: scale(1.2);
    opacity: .35
  }
}

.floating-card {
  position: absolute;
  padding: 10px 18px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}

.fc-1 {
  top: 20px;
  left: 10%;
  animation-delay: 0s;
}

.fc-2 {
  top: 20px;
  right: 10%;
  animation-delay: -1.5s;
}

.fc-3 {
  bottom: 20px;
  left: 10%;
  animation-delay: -3s;
}

.fc-4 {
  bottom: 20px;
  right: 10%;
  animation-delay: -4.5s;
}

.fc-5 {
  top: 50%;
  left: 5%;
  animation-delay: -1s;
}

.fc-6 {
  top: 50%;
  right: 5%;
  animation-delay: -2.5s;
}

.fc-7 {
  top: 15%;
  left: 35%;
  animation-delay: -4s;
}

.fc-8 {
  bottom: 15%;
  right: 35%;
  animation-delay: -5.5s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-12px)
  }
}

/* ── Ad Slots & Sidebar Layout ── */
.page-outer {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr) 350px;
  gap: 0 16px;
  max-width: 1460px;
  margin: 0 auto;
  align-items: start;
}

.page-outer--single {
  display: block;
  max-width: 980px;
}

.sidebar-col {
  min-width: 0;
  width: 350px;
  padding-top: 40px;
}

.ad-sidebar-sticky {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 350px;
}

/* Horizontal banner (between sections) */
.adsense-h {
  max-width: 750px;
  margin: 20px auto;
  padding: 0 24px;
  min-height: 100px;
  overflow: hidden;
}

.adsense-h--tools {
  margin: 28px auto 0;
}

/* Legacy placeholder (dev only) */
.ad-slot {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 0 24px;
}

.ad-placeholder {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 1300px) {
  .page-outer {
    display: block;
  }

  .sidebar-col {
    display: none;
  }

  .adsense-h {
    width: min(350px, calc(100vw - 32px));
    max-width: 350px;
    min-height: 350px;
    padding: 0;
  }
}


/* ── Tools Section ── */
.tools-section {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-muted);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.tool-card {
  position: relative;
  overflow: hidden;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  cursor: pointer;
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-h);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.tool-card-glow {
  position: absolute;
  inset: -60px;
  border-radius: 50%;
  opacity: 0;
  filter: blur(60px);
  transition: opacity .4s;
  pointer-events: none;
}

.tool-card:hover .tool-card-glow {
  opacity: 0.12;
}

#card-audio .tool-card-glow {
  background: var(--accent1);
}

#card-transcribe .tool-card-glow {
  background: var(--accent2);
}

#card-gif .tool-card-glow {
  background: var(--accent3);
}

#card-frames .tool-card-glow {
  background: var(--accent4);
}

.tool-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.ic-audio {
  background: linear-gradient(135deg, rgba(108, 99, 255, .3), rgba(108, 99, 255, .1));
  border: 1px solid rgba(108, 99, 255, .3);
}

.ic-text {
  background: linear-gradient(135deg, rgba(255, 107, 157, .3), rgba(255, 107, 157, .1));
  border: 1px solid rgba(255, 107, 157, .3);
}

.ic-gif {
  background: linear-gradient(135deg, rgba(0, 216, 180, .3), rgba(0, 216, 180, .1));
  border: 1px solid rgba(0, 216, 180, .3);
}

.ic-frame {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  border: 1px solid rgba(255, 217, 61, .3);
}

.ic-devtools {
  background: linear-gradient(135deg, #475569, #1e293b);
}

.ic-emulators {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.tool-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tool-arrow {
  font-size: 1.2rem;
  font-weight: 700;
  align-self: flex-end;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .25s, transform .25s;
}

.tool-card:hover .tool-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Features ── */
.features-section {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 60px 24px;
}

.features-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.feature-item {
  text-align: center;
}

.fi-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.feature-item h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── FAQ ── */
.faq-section {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px;
}

.faq-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  overflow: hidden;
  transition: border-color .2s;
}

.faq-item[open] {
  border-color: var(--border-h);
}

.faq-item summary {
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--text-muted);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  padding: 0 20px 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.footer p {
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color .2s;
}

.footer-links a:hover {
  color: var(--text);
}

/* ============================================================
   Tool Pages - Shared
   ============================================================ */
.tool-page {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

body.platform-native .tool-page {
  padding-bottom: 130px;
}

.page-header {
  margin-bottom: 40px;
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 20px;
  transition: color .2s;
}

.page-back:hover {
  color: var(--text);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-icon-svg {
  width: 34px;
  height: 34px;
  display: inline-block;
  flex: 0 0 auto;
}

.page-header p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Drop Zone */
.drop-zone {
  display: block;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--surface);
  position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent1);
  background: rgba(108, 99, 255, 0.06);
}

.dz-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}

.dz-icon-svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: block;
}

.dz-label {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.dz-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dz-input {
  display: none;
}

/* Control Panel */
.controls-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.control-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.control-group input[type="number"],
.control-group input[type="text"],
.control-group select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color .2s;
}

.control-group input:focus,
.control-group select:focus {
  border-color: var(--accent1);
}

.control-group select option {
  background: #1a1a2e;
}

.control-group input[type="range"] {
  width: 100%;
  accent-color: var(--accent1);
  cursor: pointer;
}

/* Buttons */
.btn-primary {
  padding: 14px 32px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.35);
  transition: transform .2s, box-shadow .2s, opacity .2s;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(108, 99, 255, 0.5);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 12px 24px;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.btn-secondary:hover {
  border-color: var(--border-h);
  background: var(--surface-h);
}

/* Progress */
.progress-wrap {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: none;
}

.progress-wrap.show {
  display: block;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.progress-bar-bg {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  width: 0%;
  transition: width .4s ease;
  animation: shimmer 1.5s linear infinite;
  background-size: 200%;
}

@keyframes shimmer {
  0% {
    background-position: 200% center;
  }

  100% {
    background-position: -200% center;
  }
}

/* Result */
.result-area {
  margin-top: 24px;
  display: none;
}

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

.result-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.result-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent3), var(--accent1));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  width: fit-content;
  transition: transform .2s;
}

.result-download:hover {
  transform: translateY(-2px);
}

.result-download.is-saving {
  opacity: 0.72;
  pointer-events: none;
}

/* Transcript */
.transcript-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.6; /* Adjusted for better mono readability */
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #fff;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

.copy-btn {
  align-self: flex-start;
  padding: 8px 18px;
  border-radius: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background .2s;
}

.copy-btn:hover {
  background: var(--surface-h);
}

/* Frame canvas area */
.frame-preview-wrap {
  margin-top: 20px;
  display: none;
}

.frame-preview-wrap.show {
  display: block;
}

.video-hidden {
  display: none;
}

#frameCanvas {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #000;
}

.time-display {
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 10px;
  background: var(--surface);
  border-radius: var(--radius-sm);
}

/* GIF preview */
.gif-preview-img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.file-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 8px 0;
}

/* Warning banner */
.warning-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255, 217, 61, 0.08);
  border: 1px solid rgba(255, 217, 61, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.83rem;
  color: #ffe066;
  line-height: 1.6;
}

.warning-banner span:first-child {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Status message */
.status-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  min-height: 1.2em;
}

.status-msg.error {
  color: #ff6b6b;
}

.status-msg.success {
  color: var(--accent3);
}

.recent-outputs-panel {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: none;
}

.recent-output-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.recent-output-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.recent-output-title {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 4px;
}

.recent-output-detail {
  color: #c0c0d4;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.recent-output-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
  word-break: break-all;
}

.app-download-grid {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  justify-content: end;
  gap: 10px;
}

.app-download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 8px 10px;
  min-width: 88px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.app-download-card__qr {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 10%, transparent 10%, transparent 20%, rgba(255, 255, 255, 0.06) 20%, rgba(255, 255, 255, 0.06) 30%, transparent 30%, transparent 40%, rgba(255, 255, 255, 0.06) 40%, rgba(255, 255, 255, 0.06) 50%, transparent 50%, transparent 60%, rgba(255, 255, 255, 0.06) 60%, rgba(255, 255, 255, 0.06) 70%, transparent 70%, transparent 80%, rgba(255, 255, 255, 0.06) 80%),
    linear-gradient(rgba(255, 255, 255, 0.06) 10%, transparent 10%, transparent 20%, rgba(255, 255, 255, 0.06) 20%, rgba(255, 255, 255, 0.06) 30%, transparent 30%, transparent 40%, rgba(255, 255, 255, 0.06) 40%, rgba(255, 255, 255, 0.06) 50%, transparent 50%, transparent 60%, rgba(255, 255, 255, 0.06) 60%, rgba(255, 255, 255, 0.06) 70%, transparent 70%, transparent 80%, rgba(255, 255, 255, 0.06) 80%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.app-download-card strong {
  font-size: 0.72rem;
  line-height: 1.15;
}

.app-download-card span {
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.15;
}

.app-download-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent1);
  box-shadow: 0 10px 30px rgba(108, 99, 255, 0.16);
}

.app-download-disabled {
  opacity: 0.72;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 60px 16px 40px;
    gap: 40px;
  }

  .hero-visual {
    height: 240px;
  }

  .floating-card {
    font-size: 0.75rem;
    padding: 8px 14px;
  }

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

  .features-inner {
    grid-template-columns: 1fr 1fr;
  }

  .nav-links {
    display: none;
  }

  .app-download-drawer {
    top: 64px;
    left: 12px;
    right: 12px;
    transform: none;
    padding: 8px 0 0;
  }

  .app-download-drawer__inner {
    width: 100%;
    margin-left: 0;
  }

  .app-download-grid {
    grid-template-columns: repeat(3, 1fr);
    justify-content: stretch;
  }

  .cookie-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .cookie-consent__content {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .features-inner {
    grid-template-columns: 1fr;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .comp-label {
    margin-bottom: 8px;
  }
  
  .comp-item {
    padding: 12px;
  }
  
  .comp-item img,
  .comp-item canvas,
  .processed-wrap img,
  .processed-wrap canvas {
    max-height: 40vh;
  }
}

/* ============================================================
   Comparison Grid - Image Result Display
   ============================================================ */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.comp-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.comp-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.comp-item img,
.comp-item canvas {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.processed-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.processed-wrap img,
.processed-wrap canvas {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Disabled UI States */
.drop-zone.disabled {
  opacity: 0.6;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.1);
}

input:disabled,
button:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}
