/* ==========================================================================
   The Tool Room - Modern Design System
   Aesthetic: Clean Online Tool + Elegant Handwriting Brand + Distinct Modern Typography
   Color Palette: Pure White, Warm Off-White, Charcoal, Vibrant Clideo Blue
   Typography: Satisfy / Caveat (Brand Logo), Outfit (Headings, CTAs) & Plus Jakarta Sans (UI / Body)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Courgette&family=Satisfy&family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Default Light Mode (Modern Clean Light SaaS Style) */
:root {
  /* Surface Colors */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-elevated: #FFFFFF;
  --bg-input: #FFFFFF;
  --bg-hover: #F1F5F9;
  --bg-workspace: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #F8FAFC;
  --bg-card-hover: #FFFFFF;
  --bg-subtle: #F8FAFC;

  /* Borders (Subtle Clean Slate Hairlines) */
  --border-subtle: #F1F5F9;
  --border-card: #E2E8F0;
  --border-hover: #CBD5E1;
  --border-focus: #2563EB;

  /* Typography (High Contrast Charcoal & Muted Slate) */
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-disabled: #9CA3AF;

  /* Single Restrained Accent Color (Vibrant Modern Blue) */
  --accent-primary: #2563EB;
  --accent-primary-hover: #1D4ED8;
  --accent-primary-subtle: #EFF6FF;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;

  /* Functional Status Colors */
  --accent-success: #16A34A;
  --accent-warning: #D97706;
  --accent-error: #DC2626;
  --accent-cyan: #0284C7;
  --accent-emerald: #059669;

  /* Modern Distinct Typography */
  --font-brand: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Geometry (Friendly Rounded Radii) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-btn: 14px;
  --radius-btn-sm: 10px;
  --radius-card: 16px;
  --radius-workspace: 24px;
  --radius-pill: 999px;

  /* Clideo-style Button Glowing Shadows */
  --shadow-btn-primary: 0 10px 25px -4px rgba(43, 130, 254, 0.42), 0 6px 14px -4px rgba(43, 130, 254, 0.28);
  --shadow-btn-hover: 0 14px 30px -4px rgba(43, 130, 254, 0.52), 0 8px 16px -4px rgba(43, 130, 254, 0.32);

  /* Extremely Soft, Natural Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 16px -2px rgba(17, 24, 39, 0.04), 0 0 0 1px var(--border-card);
  --shadow-elevated: 0 16px 36px -4px rgba(17, 24, 39, 0.08), 0 0 0 1px var(--border-card);
  --shadow-tool: 0 6px 24px -2px rgba(17, 24, 39, 0.05), 0 0 0 1px var(--border-card);

  /* Micro Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Palette (Clean & Restrained Dark Theme) */
[data-theme="dark"] {
  --bg-primary: #0B0F19;
  --bg-secondary: #111827;
  --bg-card: #151D30;
  --bg-card-elevated: #1B243B;
  --bg-input: #0E1424;
  --bg-hover: #1F2A44;
  --bg-workspace: #111827;
  --bg-surface: #151D30;
  --bg-surface-hover: #1F2A44;
  --bg-card-hover: #1F2A44;
  --bg-subtle: #111827;

  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-focus: #3B82F6;

  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --text-disabled: #4B5563;

  --accent-primary: #3B82F6;
  --accent-primary-hover: #60A5FA;
  --accent-primary-subtle: rgba(59, 130, 246, 0.14);
  --accent: #3B82F6;
  --accent-hover: #60A5FA;

  --accent-success: #22C55E;
  --accent-warning: #F59E0B;
  --accent-error: #EF4444;
  --accent-cyan: #06B6D4;
  --accent-emerald: #10B981;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 6px 20px -2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-card);
  --shadow-elevated: 0 16px 40px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-card);
  --shadow-tool: 0 8px 30px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-card);
}

/* ==========================================================================
   Base Reset & Clean Editorial Typography
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  width: 100%;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-primary-hover);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Header & Navigation (Lightweight, Clideo-Style Structure)
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-card);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
  width: 100%;
}

[data-theme="dark"] .navbar {
  background-color: rgba(15, 20, 28, 0.94);
}

.navbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  flex-shrink: 0;
  box-shadow: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.brand:hover .brand-icon {
  transform: scale(1.08);
  box-shadow: none;
}

.brand-name {
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap;
  display: inline-block;
}

.brand-badge {
  font-family: var(--font-brand);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border: 1px solid rgba(37, 99, 235, 0.16);
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: clamp(0.75rem, 1.8vw, 1.85rem);
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-block;
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

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

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Google Sign-in Button */
.google-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.85rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 11px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
}

.google-signin-btn:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

/* Navigation Primary Launch Button (Clean Clideo Rounded Style) */
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.52rem 1.15rem;
  border-radius: 11px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-btn-primary {
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  box-shadow: 0 6px 18px -2px rgba(43, 130, 254, 0.38),
    0 3px 8px -2px rgba(43, 130, 254, 0.22);
}

.nav-btn-primary:hover {
  background: #2578ee;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -2px rgba(43, 130, 254, 0.48),
    0 4px 10px -2px rgba(43, 130, 254, 0.28);
  text-decoration: none;
}

.nav-btn-primary:active {
  transform: translateY(0);
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 9px;
  width: 36px;
  height: 36px;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.mobile-menu-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

/* Breadcrumbs */
.breadcrumbs-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
  width: 100%;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-disabled);
  margin: 0 0.2rem;
}

/* ==========================================================================
   Hero Section (Spacious, Clear, Tool-First)
   ========================================================================== */
.hero {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 2rem;
  text-align: center;
  box-sizing: border-box;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.95rem;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  border-radius: var(--radius-pill);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.hero-highlight {
  color: var(--accent-primary);
  display: inline;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 2.4rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: 14px;
  background: #2b82fe;
  color: #FFFFFF;
  text-decoration: none;
  border: none;
  box-shadow: 0 12px 28px -4px rgba(43, 130, 254, 0.42),
    0 6px 14px -4px rgba(43, 130, 254, 0.28);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-primary:hover {
  background: #2578ee;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -4px rgba(43, 130, 254, 0.52),
    0 8px 18px -4px rgba(43, 130, 254, 0.35);
  text-decoration: none;
}

.btn-hero-primary:active {
  transform: translateY(0);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-secondary:hover {
  color: var(--accent-primary);
  border-color: rgba(43, 130, 254, 0.35);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.btn-hero-secondary:active {
  transform: translateY(0);
}

/* Trust Facts List */
.trust-facts {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.trust-fact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.trust-fact-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-success);
}

.trust-fact-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  color: #16A34A;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

/* 4-Column Trust Strip (from brand design) */
.trust-strip-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1040px;
  margin: 2.5rem auto 0;
  padding: 1.25rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.03);
}

@media (max-width: 900px) {
  .trust-strip-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .trust-strip-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
}

.trust-strip-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
}

.trust-strip-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.trust-strip-content h4 {
  font-family: var(--font-heading);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px;
  line-height: 1.2;
}

.trust-strip-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.3;
}

/* ==========================================================================
   Split Hero Layout & Visual Showcase (Professional Examples Style)
   ========================================================================== */
.hero.hero-split {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 1.75rem 2rem;
  text-align: left;
  box-sizing: border-box;
}

.hero-split-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-split-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-split-left .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius-pill);
  margin-bottom: 1.25rem;
  text-transform: none;
}

[data-theme="dark"] .hero-split-left .hero-eyebrow {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.25);
}

.hero-split-left .hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 850;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin: 0 0 1.25rem 0;
  text-align: left;
}

.hero-split-left .hero-subtitle {
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 0 1.75rem 0;
  text-align: left;
}

.hero-split-left .trust-facts {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.hero-split-left .trust-facts .trust-fact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text-primary);
}

.badge-check-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

[data-theme="dark"] .badge-check-circle {
  background: rgba(34, 197, 94, 0.22);
  color: #4ade80;
}

.hero-split-left .hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0;
  flex-wrap: wrap;
}

/* Right Column Visual Showcase */
.hero-split-right {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
}

.hero-visual-showcase {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.5rem;
  user-select: none;
}

.visual-doodle-sparkle {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.visual-doodle-sparkle.top-right {
  top: -12px;
  right: 110px;
  color: #93c5fd;
}

.visual-doodle-sparkle.left-accent {
  bottom: 24px;
  left: -20px;
  color: #cbd5e1;
}

[data-theme="dark"] .visual-doodle-sparkle.top-right {
  color: #3b82f6;
}

[data-theme="dark"] .visual-doodle-sparkle.left-accent {
  color: #475569;
}

.visual-composition {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  position: relative;
  z-index: 2;
}

/* Main Visual Card */
.visual-main-card {
  position: relative;
  width: 350px;
  height: 220px;
  border-radius: 18px;
  box-shadow: 0 20px 42px -12px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.08);
  background: #ffffff;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-main-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 52px -10px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] .visual-main-card {
  background: #1e293b;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.visual-card-img-wrap {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
}

.visual-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.visual-tag-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 7px;
  letter-spacing: 0.02em;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

/* Floating Quality Pill */
.visual-quality-pill {
  position: absolute;
  bottom: -16px;
  right: -24px;
  background: #ffffff;
  border-radius: 16px;
  padding: 0.65rem 1.15rem;
  box-shadow: 0 14px 32px -6px rgba(15, 23, 42, 0.16),
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  z-index: 4;
  white-space: nowrap;
  pointer-events: none;
  animation: visualPillFloat 4s ease-in-out infinite alternate;
}

@keyframes visualPillFloat {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-5px);
  }
}

[data-theme="dark"] .visual-quality-pill {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.quality-icon {
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

[data-theme="dark"] .quality-icon {
  color: #60a5fa;
}

.quality-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.quality-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

[data-theme="dark"] .quality-title {
  color: #f1f5f9;
}

.quality-subtitle {
  font-size: 0.8rem;
  font-weight: 800;
  color: #2563eb;
  line-height: 1.25;
}

[data-theme="dark"] .quality-subtitle {
  color: #60a5fa;
}

/* Curved Connecting Arrow */
.visual-arrow-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  flex-shrink: 0;
  color: #1e293b;
}

[data-theme="dark"] .visual-arrow-wrap {
  color: #94a3b8;
}

/* Stacked Thumbnails Column */
.visual-stack-column {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-start;
  flex-shrink: 0;
}

.visual-thumb-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(15, 23, 42, 0.08);
  background: #ffffff;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s;
  flex-shrink: 0;
}

.visual-thumb-card:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.2);
}

[data-theme="dark"] .visual-thumb-card {
  background: #1e293b;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.visual-thumb-card.thumb-sq {
  width: 84px;
  height: 84px;
}

.visual-thumb-card.thumb-land {
  width: 110px;
  height: 62px;
}

.visual-thumb-card.thumb-fmt {
  width: 95px;
  height: 56px;
}

.visual-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.02em;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Document & Vector Preview Cards (For PDF Tools) */
.doc-mockup-inner {
  width: 100%;
  height: 100%;
  padding: 1.25rem 1.4rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

[data-theme="dark"] .doc-mockup-inner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.doc-mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.2rem;
}

.doc-mock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.doc-mock-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.4rem 0 0.25rem;
}

.doc-mock-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 0.5rem;
}

.doc-mock-line {
  height: 6px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.28);
  width: 100%;
}

.doc-mock-line.short {
  width: 68%;
}

.doc-mock-line.medium {
  width: 85%;
}

.doc-mock-charts {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 48px;
  padding: 6px 10px;
  background: rgba(241, 245, 249, 0.8);
  border-radius: 8px;
}

[data-theme="dark"] .doc-mock-charts {
  background: rgba(15, 23, 42, 0.6);
}

.doc-chart-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: #2563eb;
  transition: height 0.3s;
}

.doc-chart-bar:nth-child(1) {
  height: 45%;
  opacity: 0.65;
}

.doc-chart-bar:nth-child(2) {
  height: 75%;
  opacity: 0.85;
}

.doc-chart-bar:nth-child(3) {
  height: 100%;
  opacity: 1;
  background: #3b82f6;
}

.doc-chart-bar:nth-child(4) {
  height: 60%;
  opacity: 0.75;
}

/* Slide Thumbnails */
.slide-thumb-inner {
  width: 100%;
  height: 100%;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.4rem;
  box-sizing: border-box;
}

[data-theme="dark"] .slide-thumb-inner {
  background: #0f172a;
}

.slide-thumb-text {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 14px;
}

.slide-thumb-pdf-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.slide-thumb-pdf-icon+.slide-thumb-text {
  margin-top: 4px;
}

/* Audio Player Mockup (For Audio Tools) */
.audio-mockup-inner {
  width: 100%;
  height: 100%;
  padding: 1.25rem 1.4rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  color: #ffffff;
}

.audio-mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.1rem;
}

.audio-mock-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.audio-mock-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 48px;
  padding: 0 4px;
}

.audio-wave-bar {
  flex: 1;
  border-radius: 3px;
  background: #3b82f6;
  min-height: 6px;
}

.audio-mock-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
}

/* Transcript Thumbnails */
.transcript-thumb-inner {
  width: 100%;
  height: 100%;
  padding: 0.4rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  box-sizing: border-box;
}

[data-theme="dark"] .transcript-thumb-inner {
  background: #0f172a;
}

.transcript-thumb-snippet {
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 12px;
}

/* Video Showcase Overlays & Ratio Thumbnails */
.video-play-glass-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.22) 0%, rgba(15, 23, 42, 0.52) 100%);
  pointer-events: none;
  z-index: 3;
}

.video-play-glass-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 0 2px rgba(255, 255, 255, 0.6);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s;
}

.video-play-glass-btn svg {
  margin-left: 3px;
}

[data-theme="dark"] .video-play-glass-btn {
  background: rgba(30, 41, 59, 0.9);
  color: #60a5fa;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.visual-main-card:hover .video-play-glass-btn {
  transform: scale(1.1);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35), 0 0 0 3px rgba(37, 99, 235, 0.4);
}

.video-duration-pill {
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.video-ratio-thumb-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.video-ratio-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-ratio-thumb-wrap.vertical-ratio img {
  object-fit: cover;
  object-position: center;
}

.video-ratio-thumb-wrap.square-ratio img {
  object-fit: cover;
  object-position: center;
}

.video-ratio-thumb-wrap.portrait-ratio img {
  object-fit: cover;
  object-position: center;
}

.thumb-ratio-tag {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Responsive Split Hero */
@media (max-width: 980px) {
  .hero.hero-split {
    padding: 2.75rem 1.25rem 2rem;
  }

  .hero-split-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-split-left {
    align-items: center;
    text-align: center;
  }

  .hero-split-left .hero-title {
    text-align: center;
  }

  .hero-split-left .hero-subtitle {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-split-left .trust-facts {
    justify-content: center;
  }

  .hero-split-left .hero-actions {
    justify-content: center;
  }

  .hero-split-right {
    justify-content: center;
  }
}

@media (max-width: 580px) {
  .visual-composition {
    transform: scale(0.85);
    transform-origin: center center;
  }

  .visual-doodle-sparkle {
    display: none;
  }
}

@media (max-width: 440px) {
  .visual-composition {
    transform: scale(0.72);
    transform-origin: center center;
  }

  .visual-quality-pill {
    right: -10px;
    bottom: -12px;
  }
}

/* ==========================================================================
   Main Transcription Studio (The Visual Centerpiece)
   ========================================================================== */
.workspace-container {
  max-width: 1120px;
  margin: 1.5rem auto 5rem;
  padding: 0 1.5rem;
  width: 100%;
}

/* Pill Mode Tabs (Clideo Segmented Style) */
.mode-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
  width: fit-content;
  margin: 0 auto 1.75rem;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-tab:hover {
  color: var(--text-primary);
}

.mode-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mode-tab svg {
  width: 16px;
  height: 16px;
}

/* Tab Content Panes */
.tab-content {
  width: 100%;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Dropzone (Welcoming, Modern, Compact) */
.dropzone {
  display: block;
  flex-direction: column;
  align-items: center;
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 2px dashed rgba(43, 130, 254, 0.38);
  border-radius: 20px;
  padding: 2.25rem 1.75rem 1.85rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 18px -4px rgba(43, 130, 254, 0.06);
}

.dropzone[style*="display: flex"],
.dropzone[style*="display:flex"] {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

[data-theme="dark"] .dropzone {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(43, 130, 254, 0.38);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: #2b82fe;
  background: rgba(43, 130, 254, 0.05);
  box-shadow: 0 10px 28px -4px rgba(43, 130, 254, 0.14);
}

[data-theme="dark"] .dropzone:hover,
[data-theme="dark"] .dropzone.dragover {
  border-color: #3b82f6;
  background: rgba(43, 130, 254, 0.12);
  box-shadow: 0 10px 28px -4px rgba(43, 130, 254, 0.22);
}

.dropzone-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #EFF6FF;
  color: var(--accent-primary);
  margin: 0 auto 0.75rem;
  transition: transform 0.2s ease;
}

.dropzone-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.dropzone:hover .dropzone-icon-wrap {
  transform: translateY(-2px);
}

[data-theme="dark"] .dropzone-icon-wrap {
  background: rgba(59, 130, 246, 0.18);
}

.dropzone-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.dropzone-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
}

/* ==========================================================================
   CLIDEO "CHOOSE FILE" SPLIT BUTTON & DROPDOWN
   ========================================================================== */
.clideo-upload-wrapper {
  position: relative;
  display: inline-block;
  margin: 0 auto 0.65rem;
  z-index: 20;
}

.clideo-split-btn {
  display: inline-flex;
  align-items: stretch;
  background-color: #2b82fe;
  /* Authentic Clideo electric blue */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 22px -3px rgba(43, 130, 254, 0.4),
    0 4px 10px -3px rgba(43, 130, 254, 0.25);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  user-select: none;
}

.clideo-split-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -3px rgba(43, 130, 254, 0.5),
    0 6px 14px -3px rgba(43, 130, 254, 0.32);
  background-color: #2578ee;
}

.clideo-split-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px -3px rgba(43, 130, 254, 0.35);
}

/* Main action button */
.clideo-btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px 12px 18px;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.15s ease;
  line-height: 1.2;
}

.clideo-btn-main:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* White Circle with Blue Plus Icon */
.clideo-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  background-color: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.clideo-split-btn:hover .clideo-btn-icon {
  transform: scale(1.06);
}

.clideo-btn-icon svg {
  width: 12px;
  height: 12px;
  stroke: #2b82fe;
}

.clideo-btn-text {
  color: #FFFFFF;
  white-space: nowrap;
}

/* Subtle 1px Divider */
.clideo-btn-divider {
  width: 1px;
  background-color: rgba(0, 30, 90, 0.16);
  flex-shrink: 0;
}

[data-theme="dark"] .clideo-btn-divider {
  background-color: rgba(0, 0, 0, 0.25);
}

/* Dropdown trigger button */
.clideo-btn-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  padding: 0;
  background: transparent;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.clideo-btn-trigger:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.clideo-btn-trigger[aria-expanded="true"] {
  background-color: rgba(0, 0, 0, 0.15);
}

.clideo-chevron-icon {
  width: 15px;
  height: 15px;
  stroke: #FFFFFF;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.clideo-btn-trigger[aria-expanded="true"] .clideo-chevron-icon {
  transform: rotate(180deg);
}

/* Dropdown popup menu */
.clideo-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14),
    0 6px 14px rgba(0, 0, 0, 0.06);
  padding: 8px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: clideoMenuSlideIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

.clideo-dropdown-menu[hidden] {
  display: none !important;
}

@keyframes clideoMenuSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.clideo-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.clideo-menu-item svg {
  flex-shrink: 0;
  color: var(--accent-primary);
}

.clideo-menu-item:hover,
.clideo-menu-item:focus-visible {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  outline: none;
}

/* "or drop file here" text */
.dropzone-or-text {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

/* Fallback/alias for .browse-btn */
.browse-btn {
  /* Inherits styles from .clideo-btn-main */
}

.format-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
}

.format-tag {
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.format-tag.tag-active {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border-color: rgba(37, 99, 235, 0.3);
}

.format-size-limit {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.mobile-limit-hint {
  color: var(--text-secondary);
}

/* File Preview Card */
.file-preview-card {
  display: none;
  align-items: center;
  justify-content: space-between;
  max-width: 700px;
  margin: 1.25rem auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 1rem;
  box-sizing: border-box;
}

.file-preview-card.visible {
  display: flex;
}

.file-preview-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-preview-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
}

.file-preview-details {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.file-preview-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.file-preview-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.file-preview-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-action-btn {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-btn-sm);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-icon-danger:hover {
  color: var(--accent-error);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

/* Mobile Warning */
.mobile-limit-warning {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 700px;
  margin: 1rem auto 0;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.84rem;
  color: var(--text-primary);
  width: 100%;
  box-sizing: border-box;
}

.mobile-limit-warning.visible {
  display: flex;
}

.mobile-limit-badge {
  background: #F59E0B;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* Recorder Panel */
.recorder-panel,
.recorder-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2.25rem 1.75rem;
  text-align: center;
}

.recorder-canvas-wrap,
.recorder-visualizer-wrap {
  width: 100%;
  max-width: 600px;
  height: 110px;
  margin: 0 auto 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
}

#recorderVisualizer {
  width: 100%;
  height: 100%;
  display: block;
}

.recorder-timer {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.recorder-status-text,
.recorder-hud {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.recording-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-error);
  animation: pulseRecording 1.2s infinite;
}

@keyframes pulseRecording {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
}

.recorder-controls,
.recorder-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.record-btn-main,
.btn-record-main {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 2.4rem;
  border-radius: 14px;
  background: var(--accent-error);
  color: #FFFFFF;
  border: none;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px -4px rgba(220, 38, 38, 0.42),
    0 6px 14px -4px rgba(220, 38, 38, 0.28);
}

.record-btn-main:hover,
.btn-record-main:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(220, 38, 38, 0.52),
    0 8px 16px -4px rgba(220, 38, 38, 0.32);
}

.record-btn-main:active,
.btn-record-main:active {
  transform: translateY(0);
}

.recorder-limit-note,
.recorder-mobile-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

/* ==========================================================================
   Settings Bar & Audio Execution Controls
   ========================================================================== */
.settings-bar,
.settings-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: end;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.setting-hardware {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.setting-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.setting-tradeoff {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
}

.setting-select-wrap {
  position: relative;
  width: 100%;
}

.setting-select {
  width: 100%;
  padding: 0.65rem 2rem 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition-fast);
}

.setting-select:focus {
  border-color: var(--accent-primary);
}

.select-arrow {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.english-only-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.device-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.action-footer {
  margin-top: 1.5rem;
}

.start-btn,
.btn-transcribe-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.05rem 2rem;
  border-radius: 14px;
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 28px -4px rgba(43, 130, 254, 0.42),
    0 6px 14px -4px rgba(43, 130, 254, 0.28);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.start-btn:hover:not(:disabled),
.btn-transcribe-main:hover:not(:disabled) {
  background: #2578ee;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -4px rgba(43, 130, 254, 0.52),
    0 8px 18px -4px rgba(43, 130, 254, 0.35);
}

.start-btn:active:not(:disabled),
.btn-transcribe-main:active:not(:disabled) {
  transform: translateY(0);
}

.start-btn:disabled,
.btn-transcribe-main:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.85rem;
  border-radius: 14px;
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px -4px rgba(43, 130, 254, 0.42),
    0 6px 14px -4px rgba(43, 130, 254, 0.28);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  background: #2578ee;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(43, 130, 254, 0.52),
    0 8px 16px -4px rgba(43, 130, 254, 0.32);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
  border-color: rgba(43, 130, 254, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-danger {
  color: var(--accent-error);
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.3);
  color: var(--accent-error);
}

/* ==========================================================================
   Processing & Status View
   ========================================================================== */
.processing-view {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-workspace);
  padding: 4rem 2rem;
  text-align: center;
}

.processing-view.visible {
  display: block;
}

.processing-spinner-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(37, 99, 235, 0.15);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spinRing 1s linear infinite;
}

@keyframes spinRing {
  to {
    transform: rotate(360deg);
  }
}

.spinner-core {
  color: var(--accent-primary);
}

.processing-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.processing-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.progress-bar-container {
  max-width: 540px;
  margin: 1.5rem auto;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--border-card);
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-primary);
  border-radius: var(--radius-pill);
  transition: width 200ms ease;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.progress-status {
  font-family: var(--font-sans);
  color: var(--text-secondary);
}

.progress-percent {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-primary);
}

.eta-stats-row {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 540px;
  margin: 1rem auto 0;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  text-align: center;
}

.eta-stats-row.visible {
  display: grid;
}

.eta-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.eta-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.eta-stat-val {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

@media (max-width: 520px) {
  .eta-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

.streaming-preview-box {
  max-width: 580px;
  margin: 1.5rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  text-align: left;
}

.streaming-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  margin-bottom: 0.4rem;
}

.streaming-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.processing-actions {
  margin-top: 1.5rem;
}

/* Alert / Error / No Speech View */
.alert-view {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-workspace);
  padding: 3.5rem 2rem;
  text-align: center;
}

.alert-view.visible {
  display: block;
}

.alert-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent-error);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.alert-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.alert-desc,
.alert-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 1.75rem;
}

.alert-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* ==========================================================================
   Results / Completed Studio View
   ========================================================================== */
.result-view,
.results-view {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

.result-view.visible,
.results-view.visible {
  display: flex;
}

.studio-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.studio-toolbar-left,
.studio-toolbar-center,
.studio-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.status-pill-success {
  background: rgba(22, 163, 74, 0.12);
  color: #16A34A;
}

.transcript-meta-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.85rem;
}

.search-input-wrap svg {
  color: var(--text-muted);
}

.search-input-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-primary);
  width: 170px;
}

.search-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.search-match-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.search-nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
}

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

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.action-btn:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
  border-color: rgba(43, 130, 254, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn-accent {
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  font-weight: 700;
  box-shadow: 0 6px 18px -2px rgba(43, 130, 254, 0.38);
}

.action-btn-accent:hover {
  background: #2578ee;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -2px rgba(43, 130, 254, 0.48);
}

.action-btn-accent:active {
  transform: translateY(0);
}

.dropdown-wrap {
  position: relative;
}

.dropdown-arrow {
  font-size: 0.65rem;
}

.export-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevated);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  z-index: 100;
}

.export-menu.active {
  display: flex;
}

.export-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.export-item:hover {
  background: var(--bg-hover);
}

.export-format-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
}

.export-name {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Media Player Card */
.media-player-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 0.95rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.player-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.player-play-btn:hover {
  background: var(--accent-primary-hover);
  transform: scale(1.04);
}

.player-time-display {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  min-width: 42px;
}

.player-scrubber {
  flex: 1;
  height: 6px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.player-speed-btn {
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border-card);
  background: var(--bg-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-speed-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

/* Transcript Container & Segments */
.transcript-editor-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.transcript-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 580px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.segment-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.segment-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.segment-card.segment-active {
  background: var(--accent-primary-subtle);
  border-color: var(--accent-primary);
}

.segment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.segment-time {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.segment-copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  font-size: 0.8rem;
}

.segment-copy-btn:hover {
  color: var(--text-primary);
}

.segment-text {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.search-highlight {
  background-color: #FEF08A;
  color: #854D0E;
  padding: 0.1rem 0.2rem;
  border-radius: 2px;
}

.search-current {
  background-color: #FBBF24;
  color: #78350F;
  font-weight: 700;
}

.expand-transcript-btn,
#expandTranscriptBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.expand-transcript-btn:hover,
#expandTranscriptBtn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ==========================================================================
   AEO Direct Answer Card
   ========================================================================== */
.aeo-section-wrap {
  max-width: 1120px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  width: 100%;
}

.aeo-answer-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-card);
  padding: 1.75rem 2rem;
  text-align: left;
}

.aeo-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  border-radius: var(--radius-pill);
  margin-bottom: 0.85rem;
}

.aeo-heading {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.aeo-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ==========================================================================
   Spacious Editorial Content Sections
   ========================================================================== */
.content-section {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  box-sizing: border-box;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Privacy Section */
.privacy-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-workspace);
  padding: 3rem 2rem;
}

.privacy-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.privacy-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
}

.privacy-step-num {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.privacy-step-text {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* ==========================================================================
   How It Works 3-Step Flow (Clean Horizontal Stepper Layout)
   ========================================================================== */
.how-it-works-section {
  position: relative;
}

.eyebrow-pill-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  margin-right: 0.4rem;
  box-shadow: 0 0 10px rgba(43, 130, 254, 0.9);
}

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

.step-flow-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 1.25rem;
}

.step-flow-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2.25rem 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 4px 20px -2px rgba(17, 24, 39, 0.04), 0 0 0 1px var(--border-card);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.step-flow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.25s ease;
}

.step-flow-card:hover {
  transform: translateY(-5px);
  border-color: rgba(43, 130, 254, 0.35);
  box-shadow: 0 18px 36px -4px rgba(43, 130, 254, 0.12), 0 0 0 1px rgba(43, 130, 254, 0.3);
}

.step-flow-card:hover::before {
  background: linear-gradient(90deg, #2b82fe, #60a5fa);
}

/* Featured Center Card */
.step-flow-card.step-featured {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(43, 130, 254, 0.03) 100%);
  border-color: rgba(43, 130, 254, 0.28);
  box-shadow: 0 8px 24px -2px rgba(43, 130, 254, 0.08), 0 0 0 1px rgba(43, 130, 254, 0.2);
}

.step-flow-card.step-featured::before {
  background: linear-gradient(90deg, #2b82fe, #06b6d4);
}

.step-flow-card.step-featured:hover {
  box-shadow: 0 20px 42px -4px rgba(43, 130, 254, 0.18), 0 0 0 1px rgba(43, 130, 254, 0.4);
}

/* Card Header */
.step-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}

.step-badge-accent {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border-color: rgba(43, 130, 254, 0.25);
}

.step-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(43, 130, 254, 0.08);
  color: #2b82fe;
  border: 1px solid rgba(43, 130, 254, 0.16);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, color 0.25s ease;
}

.step-flow-card:hover .step-icon-box {
  transform: scale(1.08) rotate(3deg);
  background: #2b82fe;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(43, 130, 254, 0.35);
}

.step-icon-ai {
  background: rgba(43, 130, 254, 0.12);
  color: #2b82fe;
}

/* Card Body */
.step-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.step-card-title {
  font-family: var(--font-heading);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0;
}

.step-card-desc {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Card Bottom Micro-Preview */
.step-pill-preview {
  padding-top: 1rem;
  border-top: 1px solid var(--border-card);
}

.step-format-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.step-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.step-chip-mic {
  font-family: var(--font-heading);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border-color: rgba(43, 130, 254, 0.2);
}

.step-chip-drive {
  font-family: var(--font-heading);
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.2);
}

.step-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.7rem;
  border-radius: 6px;
  background: var(--accent-primary-subtle);
  border: 1px solid rgba(43, 130, 254, 0.25);
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.step-ai-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2b82fe;
  box-shadow: 0 0 6px #2b82fe;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {

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

  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

/* Connecting Flow Arrow */
.step-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  border: 1px solid rgba(43, 130, 254, 0.2);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(43, 130, 254, 0.15);
}

/* Responsive */
@media (max-width: 959px) {
  .step-flow-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .step-flow-arrow {
    transform: rotate(90deg);
    margin: 0.25rem auto;
  }
}

/* Features Grid (Spacious 3-Column Clean Cards) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-workspace);
  padding: 2.5rem 2rem;
  transition: all var(--transition-fast);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  margin-bottom: 1.35rem;
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Use Cases Grid (Clean Clideo Card Layout - Fixes unstyled links)
   ========================================================================== */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.use-case-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.use-case-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}

.use-case-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.use-case-title span:last-child {
  color: var(--accent-primary);
  font-size: 1.1rem;
  transition: transform var(--transition-fast);
}

.use-case-card:hover .use-case-title span:last-child {
  transform: translateX(4px);
}

.use-case-desc {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
  text-decoration: none;
}

/* Formats Section */
.formats-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.format-group-card,
.format-compact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-workspace);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-sm);
}

.format-group-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.format-ext {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.format-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.format-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.format-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.format-pill-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.format-pill-link:hover {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Technical Specification Table */
.spec-table-wrap {
  margin-top: 2.5rem;
  overflow-x: auto;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.spec-table th,
.spec-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-card);
  font-size: 0.9rem;
  text-align: left;
}

.spec-table th {
  background: var(--bg-secondary);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
}

.spec-table td {
  color: var(--text-secondary);
}

/* FAQ Section (Airy, Clean Accordion/List) */
#faq {
  width: 100%;
  box-sizing: border-box;
}

.faq-list,
.faq-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  box-sizing: border-box;
}

.faq-item {
  width: 100%;
  border-bottom: 1px solid var(--border-card);
  box-sizing: border-box;
}

.faq-item:first-child {
  border-top: 1px solid var(--border-card);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  text-align: left;
  background: none;
  border: none;
  padding: 1.4rem 0;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color var(--transition-fast);
  box-sizing: border-box;
}

.faq-trigger>span:first-child {
  flex: 1;
  min-width: 0;
}

.faq-trigger:hover {
  color: var(--accent-primary);
}

.faq-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: transform 200ms ease;
  flex-shrink: 0;
}

.faq-item.open .faq-arrow,
.faq-trigger[aria-expanded="true"] .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  width: 100%;
  box-sizing: border-box;
  padding-bottom: 1.5rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-secondary);
  overflow-wrap: break-word;
  word-break: break-word;
}

.faq-answer p {
  margin-bottom: 0.75rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-item.open .faq-answer,
.faq-trigger[aria-expanded="true"]+.faq-answer {
  display: block;
}

/* Internal Links Section */
.internal-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.internal-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.6rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.internal-link-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}

.internal-link-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
}

.internal-link-title svg {
  color: var(--accent-primary);
  transition: transform var(--transition-fast);
}

.internal-link-card:hover .internal-link-title svg {
  transform: translateX(3px);
}

.internal-link-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-decoration: none;
}

/* Guides Wrap & Articles */
.guide-wrap,
.guide-article-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
}

.guide-header {
  text-align: center;
  margin-bottom: 3rem;
}

.guide-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.guide-title,
.guide-h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.guide-subtitle,
.guide-meta {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-body {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.guide-body h2 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2.75rem 0 1rem;
  letter-spacing: -0.02em;
}

.guide-body h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.guide-body p {
  margin-bottom: 1.35rem;
}

/* ==========================================================================
   Legal & Compliance Pages (Privacy Policy & Terms of Service)
   ========================================================================== */
.legal-page-wrap {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
  box-sizing: border-box;
}

.legal-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.legal-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.legal-subtitle {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 680px;
  margin: 0 auto 2rem;
}

.legal-quick-facts {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.legal-fact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.legal-fact-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-success);
}

.legal-callout {
  background: var(--accent-primary-subtle);
  border: 1px solid rgba(43, 130, 254, 0.22);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.75rem;
  box-sizing: border-box;
}

.legal-callout-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-callout p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.legal-content {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.legal-content section {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2.5rem;
  box-sizing: border-box;
}

.legal-content section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.legal-content h2 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.legal-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
}

.legal-content h3 {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.5rem 0 0.6rem;
}

.legal-content p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.legal-content ul,
.legal-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  padding: 0;
}

.legal-content li {
  margin-bottom: 0.65rem;
  line-height: 1.65;
}

.legal-grid-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 1.75rem 0;
}

@media (max-width: 640px) {
  .legal-grid-cards {
    grid-template-columns: 1fr;
  }
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.legal-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.legal-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.legal-table th,
.legal-table td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-table th {
  background: var(--bg-secondary);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.footer-legal-links {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-legal-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-legal-links a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

/* ==========================================================================
   Footer (Spacious, Light, Organized)
   ========================================================================== */
.footer,
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-card);
  padding: 5.5rem 1.5rem 3rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.footer-top,
.footer-brand {
  max-width: 500px;
  margin-bottom: 3.5rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.footer-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2.5rem 1.75rem;
  margin: 3rem 0;
  text-align: left;
}

@media (max-width: 1024px) {
  .footer-links-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.25rem 1.5rem;
  }
}

@media (max-width: 680px) {
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.25rem;
  }
}

@media (max-width: 440px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.footer-col-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.4;
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent-primary);
  text-decoration: none;
  transform: translateX(2px);
}

.footer-bottom {
  border-top: 1px solid var(--border-card);
  margin-top: 3.5rem;
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-elevated);
  padding: 0.75rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 1000;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all var(--transition-fast);
}

.toast.toast-show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==========================================================================
   Google Authentication & User Profile Component Styles (Clideo Polish)
   ========================================================================== */
.google-auth-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.google-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.google-signin-btn:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.google-signin-btn:active {
  transform: translateY(0);
}

.google-signin-btn .google-icon {
  flex-shrink: 0;
  display: block;
}

.google-user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-avatar-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--border-card);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

.user-avatar-btn:hover,
.user-avatar-btn:focus-visible {
  border-color: var(--accent-primary);
  transform: scale(1.04);
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.user-avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: var(--accent-success);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 270px;
  max-width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevated);
  padding: 1.15rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 1000;
}

.user-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.dropdown-user-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-card);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.user-dropdown-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.user-dropdown-name {
  font-family: var(--font-heading);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-email {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.user-dropdown-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  margin-top: 0.4rem;
  width: fit-content;
}

.badge-verified {
  background: rgba(22, 163, 74, 0.12);
  color: #16A34A;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.badge-demo {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-card);
  margin: 0.95rem -1.15rem;
}

.user-dropdown-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.user-dropdown-item:hover {
  background: var(--bg-hover);
}

.user-dropdown-signout {
  color: var(--accent-error);
}

.user-dropdown-signout:hover {
  background: rgba(220, 38, 38, 0.08);
  color: var(--accent-error);
}

/* Google Setup Modal */
.google-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.google-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.google-modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-workspace);
  box-shadow: var(--shadow-elevated);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from {
    transform: scale(0.96) translateY(8px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.google-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.google-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.google-modal-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.google-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.google-modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.google-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.google-modal-intro {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.auth-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg-secondary);
  padding: 1.1rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.auth-feature-item svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.google-modal-guide {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg-secondary);
  padding: 1.1rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.86rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.guide-step a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

.guide-step a:hover {
  text-decoration: underline;
}

.guide-step code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border-card);
}

.guide-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.google-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.google-input-label {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.google-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.google-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-subtle);
}

.google-input-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.google-modal-footer {
  padding: 1.15rem 1.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.btn-demo-login {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-demo-login:hover {
  border-color: rgba(43, 130, 254, 0.35);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-save-clientid {
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px -2px rgba(43, 130, 254, 0.38);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-save-clientid:hover {
  background: #2578ee;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -2px rgba(43, 130, 254, 0.48);
}

.btn-save-clientid:active {
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1140px) {
  .brand-badge {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-card);
    padding: 1.25rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    box-shadow: var(--shadow-elevated);
    z-index: 999;
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .nav-link {
    display: block;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 3.5rem 1.5rem 1.5rem;
  }

  .content-section {
    padding: 4.5rem 1.5rem;
  }

  .use-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dropzone {
    padding: 1.75rem 1.15rem 1.5rem;
  }

  .settings-bar,
  .settings-panel {
    grid-template-columns: 1fr;
  }

  .studio-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .use-cases-grid {
    grid-template-columns: 1fr;
  }

  .formats-compact-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .navbar-inner {
    padding: 0.65rem 1rem;
    gap: 0.5rem;
  }

  .google-signin-btn .google-signin-text,
  .google-signin-text {
    display: none;
  }

  .google-signin-btn {
    padding: 0.48rem 0.55rem;
    border-radius: 10px;
  }

  .user-dropdown-menu {
    right: -40px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    justify-content: center;
  }

  .nav-btn {
    padding: 0.48rem 0.85rem;
    font-size: 0.82rem;
  }

  .brand-name {
    font-size: 1.35rem;
  }
}

/* ==========================================================================
   YouTube Title Tester Component Styles
   ========================================================================== */
.yt-hero-logo {
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}

.hero-title:hover .yt-hero-logo {
  transform: scale(1.08);
  filter: drop-shadow(0 6px 16px rgba(255, 0, 0, 0.42)) !important;
}

.yt-tester-container {
  max-width: 920px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

.yt-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-workspace);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-tool);
  transition: border-color var(--transition-fast);
}

.yt-input-card:focus-within {
  border-color: var(--border-hover);
}

.yt-input-label-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.yt-input-label {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.yt-limit-indicator {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.yt-title-input {
  width: 100%;
  box-sizing: border-box;
  padding: 1.1rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  resize: none;
  min-height: 95px;
  outline: none;
  transition: all var(--transition-fast);
}

.yt-title-input:focus {
  border-color: var(--accent-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-primary-subtle);
}

.yt-progress-container {
  width: 100%;
  height: 6px;
  background: var(--border-card);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 0.85rem 0 0.5rem;
  position: relative;
}

.yt-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-primary);
  border-radius: var(--radius-pill);
  transition: width 150ms ease, background 150ms ease;
}

.yt-input-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.yt-counter-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.yt-counter-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.yt-input-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.yt-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.95rem;
  border-radius: var(--radius-btn-sm);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.yt-tool-btn:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
  border-color: rgba(43, 130, 254, 0.35);
  transform: translateY(-1px);
}

.yt-tool-btn:active {
  transform: translateY(0);
}

.yt-samples-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-card);
}

.yt-samples-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.yt-sample-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.yt-sample-btn:hover {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border-color: rgba(43, 130, 254, 0.35);
  transform: translateY(-1px);
}

.yt-cutoff-warning {
  margin-top: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.5;
  background: rgba(217, 119, 6, 0.09);
  border: 1px solid rgba(217, 119, 6, 0.25);
  color: var(--text-primary);
}

/* 4-Column Scorecard Visual Summary */
.yt-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 980px) {
  .yt-summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }
}

@media (max-width: 520px) {
  .yt-summary-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.yt-score-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.35rem 1.35rem 1.45rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.yt-score-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-card);
  transition: background 0.25s ease;
}

.yt-score-card.status-good::before {
  background: #16A34A;
}

.yt-score-card.status-moderate::before {
  background: #D97706;
}

.yt-score-card.status-warning::before {
  background: #DC2626;
}

.yt-score-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.08);
}

.yt-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.yt-score-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.25;
}

.yt-score-title svg {
  color: var(--accent-primary, #2b82fe);
  flex-shrink: 0;
}

.yt-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  text-transform: capitalize;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.yt-status-badge.badge-neutral {
  background: var(--bg-hover, #F3F4F6);
  color: var(--text-muted, #6B7280);
  border: 1px solid var(--border-card, #E5E7EB);
}

.yt-status-badge.badge-good {
  background: rgba(22, 163, 74, 0.12);
  color: #16A34A;
  border: 1px solid rgba(22, 163, 74, 0.28);
}

.yt-status-badge.badge-moderate {
  background: rgba(217, 119, 6, 0.12);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.28);
}

.yt-status-badge.badge-warning {
  background: rgba(220, 38, 38, 0.12);
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.28);
}

[data-theme="dark"] .yt-status-badge.badge-neutral {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .yt-status-badge.badge-good {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}

[data-theme="dark"] .yt-status-badge.badge-moderate {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .yt-status-badge.badge-warning {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.yt-score-desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* Improve Your Title Section */
.yt-suggestions-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-workspace);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-sm);
}

.yt-suggestions-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.yt-suggestions-title svg {
  color: var(--accent-primary);
}

.yt-suggestions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.yt-suggestions-list li {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-primary);
  padding: 0.85rem 1.15rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  position: relative;
}

/* YouTube Realistic Preview Card */
.yt-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-workspace);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-sm);
}

.yt-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.yt-preview-heading {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.yt-preview-heading svg {
  color: #FF0000;
}

.yt-preview-toggle-wrap {
  display: inline-flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.25rem;
  gap: 0.2rem;
}

.yt-preview-toggle-btn {
  border: none;
  background: none;
  padding: 0.38rem 0.85rem;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.yt-preview-toggle-btn.active {
  background: var(--bg-card);
  color: var(--accent-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.yt-preview-mockup-wrap {
  display: flex;
  justify-content: center;
  padding: 2.25rem 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-card);
}

.yt-video-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: max-width 220ms ease;
}

.yt-video-card.mobile-view {
  max-width: 320px;
}

.yt-thumbnail-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.yt-thumb-play-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.9);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.yt-thumb-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.82);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.yt-video-info-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.yt-channel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.yt-video-details {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow: hidden;
  flex: 1;
}

.yt-preview-video-title {
  font-family: Roboto, 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.yt-preview-channel-name {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.yt-channel-verified-badge {
  display: inline-flex;
  color: var(--text-muted);
}

.yt-preview-video-meta {
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 768px) {

  .yt-input-card,
  .yt-suggestions-card,
  .yt-preview-card {
    padding: 1.5rem;
  }

  .yt-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   URL Cleaner Tool Styles
   ========================================================================== */

.url-cleaner-container {
  max-width: 840px;
  margin: 0 auto 4rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.url-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.url-input-card:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-subtle);
}

.url-input-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.url-input-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.url-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #16A34A;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.2);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

[data-theme="dark"] .url-privacy-badge {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.25);
}

.url-privacy-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.url-textarea {
  width: 100%;
  padding: 1rem 1.15rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  resize: vertical;
  min-height: 96px;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.url-textarea:focus {
  border-color: var(--accent-primary);
  background: var(--bg-card);
}

.url-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.url-action-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-clean-url {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px -4px rgba(43, 130, 254, 0.42),
    0 6px 14px -4px rgba(43, 130, 254, 0.28);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-clean-url:hover {
  background: #2578ee;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(43, 130, 254, 0.52),
    0 8px 16px -4px rgba(43, 130, 254, 0.32);
}

.btn-clean-url:active {
  transform: translateY(0);
}

.btn-clear-url {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-heading);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-clear-url:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.btn-clear-url:active {
  transform: translateY(0);
}

.url-samples-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-card);
}

.url-samples-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.url-sample-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.url-sample-btn:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(43, 130, 254, 0.35);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Advanced Cleaning Drawer */
.url-advanced-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.url-advanced-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.url-advanced-toggle-btn:hover {
  background: var(--bg-surface);
}

.url-advanced-heading-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.url-advanced-heading-wrap svg {
  color: var(--accent-primary);
}

.url-advanced-drawer {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border-card);
  background: var(--bg-surface);
  flex-direction: column;
  gap: 1rem;
}

.url-advanced-drawer.open {
  display: flex;
}

.url-advanced-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.75rem;
}

.url-custom-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.86rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  outline: none;
}

.url-custom-input:focus {
  border-color: var(--accent-primary);
}

.url-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Results Cards */
.url-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.url-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.url-result-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.url-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-clean {
  background: rgba(22, 163, 74, 0.1);
  color: #16A34A;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.badge-modified {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.badge-invalid {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.url-removed-summary {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.url-removed-summary.has-removed {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.url-removed-summary.is-clean {
  background: rgba(22, 163, 74, 0.08);
  color: #16A34A;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.url-display-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.url-display-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.url-clean-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.url-clean-text {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.95rem;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.5;
  user-select: all;
}

.btn-copy-clean {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px -3px rgba(43, 130, 254, 0.38),
    0 4px 10px -2px rgba(43, 130, 254, 0.22);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-copy-clean:hover {
  background: #2578ee;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -3px rgba(43, 130, 254, 0.48),
    0 6px 12px -2px rgba(43, 130, 254, 0.28);
}

.btn-copy-clean:active {
  transform: translateY(0);
}

.url-original-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.5;
}

/* Removed parameters tags */
.url-removed-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-card);
}

.url-removed-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.url-removed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.url-param-tag {
  display: inline-flex;
  align-items: center;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #DC2626;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .url-param-tag {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Batch Results */
.url-batch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.url-batch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.url-batch-summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.btn-copy-all-clean {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.45rem;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px -3px rgba(43, 130, 254, 0.38),
    0 4px 10px -2px rgba(43, 130, 254, 0.22);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-copy-all-clean:hover {
  background: #2578ee;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -3px rgba(43, 130, 254, 0.48),
    0 6px 12px -2px rgba(43, 130, 254, 0.28);
}

.btn-copy-all-clean:active {
  transform: translateY(0);
}

.url-batch-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.batch-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.batch-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.batch-item-num {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.batch-urls-flow {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.batch-url-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.4;
}

.batch-url-label {
  font-weight: 700;
  color: var(--text-muted);
  min-width: 60px;
  flex-shrink: 0;
}

.batch-original-url-text {
  color: var(--text-muted);
  word-break: break-all;
}

.batch-clean-row {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  align-items: center;
}

.batch-clean-url-text {
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-all;
  flex: 1;
}

.btn-copy-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-copy-sm:hover {
  background: var(--accent-primary);
  color: #FFFFFF;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.btn-copy-sm:active {
  transform: translateY(0);
}

.batch-item-error {
  font-size: 0.85rem;
  color: #DC2626;
  font-weight: 500;
}

/* Error Card */
.url-error-card {
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.url-error-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.url-error-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.url-error-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #DC2626;
}

[data-theme="dark"] .url-error-heading {
  color: #f87171;
}

.url-error-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Empty State */
.url-empty-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-xl);
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.url-empty-icon {
  color: var(--accent-primary);
  opacity: 0.75;
}

.url-empty-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.url-empty-desc {
  font-size: 0.88rem;
  max-width: 440px;
  line-height: 1.5;
}

/* Toast */
.url-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  z-index: 10000;
}

.url-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {

  .url-input-card,
  .url-result-card,
  .url-batch-card {
    padding: 1.5rem;
  }

  .url-action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .url-action-buttons {
    width: 100%;
  }

  .btn-clean-url,
  .btn-clear-url {
    flex: 1;
    justify-content: center;
  }

  .batch-url-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   TECHNICAL GUIDE & ANATOMY SECTION STYLING
   ========================================================================== */
.technical-content {
  max-width: 960px;
  margin: 0 auto;
}

.anatomy-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Lead intro statement */
.anatomy-lead-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-lg, 14px);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.anatomy-lead-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: var(--accent-primary-subtle, rgba(43, 130, 254, 0.1));
  color: var(--accent-primary);
  margin-top: 2px;
}

.anatomy-lead-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.anatomy-lead-tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
}

.anatomy-lead-text {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0;
}

/* 2x2 Bento Cards Grid */
.anatomy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.anatomy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.anatomy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  border-color: rgba(43, 130, 254, 0.35);
}

.anatomy-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.anatomy-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anatomy-card-icon.icon-blue {
  background: rgba(43, 130, 254, 0.12);
  color: #2b82fe;
}

.anatomy-card-icon.icon-green {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.anatomy-card-icon.icon-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.anatomy-card-icon.icon-red {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.anatomy-card-icon.icon-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.anatomy-card-tag {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill, 9999px);
}

.tag-blue {
  background: rgba(43, 130, 254, 0.1);
  color: #2b82fe;
}

.tag-green {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.tag-amber {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.tag-red {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.tag-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.anatomy-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.anatomy-card-desc {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 1.35rem;
  flex-grow: 1;
}

.anatomy-card-desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

.anatomy-card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border-card);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.anatomy-footer-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.anatomy-footer-value {
  color: var(--text-primary);
  font-weight: 700;
}

/* Bottom Summary Banner */
.anatomy-summary-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(43, 130, 254, 0.08) 0%, rgba(43, 130, 254, 0.02) 100%);
  border: 1px solid rgba(43, 130, 254, 0.22);
  border-radius: 14px;
  padding: 1.25rem 1.75rem;
}

.anatomy-summary-badge {
  background: #2b82fe;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  flex-shrink: 0;
}

.anatomy-summary-text {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .anatomy-grid {
    grid-template-columns: 1fr;
  }

  .anatomy-lead-card {
    flex-direction: column;
    padding: 1.25rem;
  }

  .anatomy-summary-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 1.25rem;
  }
}

/* ==========================================================================
   YouTube Script Timer Component Styles
   ========================================================================== */
.timer-container {
  max-width: 960px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.timer-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  transition: border-color var(--transition-fast);
}

.timer-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timer-input-label {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.timer-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timer-textarea {
  width: 100%;
  min-height: 200px;
  padding: 1.15rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-card);
  border-radius: 14px;
  resize: vertical;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.timer-textarea:focus {
  border-color: #2b82fe;
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(43, 130, 254, 0.15);
}

.timer-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.timer-counter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.timer-counter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.timer-pill-accent {
  background: rgba(43, 130, 254, 0.1);
  border-color: rgba(43, 130, 254, 0.25);
  color: #2b82fe;
  font-weight: 700;
}

.timer-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timer-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.timer-tool-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.timer-btn-clear:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--accent-error);
  border-color: rgba(239, 68, 68, 0.25);
}

/* Results Section */
.timer-results-section {
  margin-bottom: 2.5rem;
}

.timer-section-header {
  margin-bottom: 1.25rem;
}

.timer-section-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.timer-section-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Speeds Grid */
.timer-speeds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.timer-speed-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.timer-speed-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(43, 130, 254, 0.3);
}

.timer-speed-card.featured {
  border-color: rgba(43, 130, 254, 0.4);
  background: linear-gradient(180deg, rgba(43, 130, 254, 0.04) 0%, var(--bg-card) 100%);
  box-shadow: 0 8px 24px -4px rgba(43, 130, 254, 0.15);
}

.timer-featured-tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: #2b82fe;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(43, 130, 254, 0.4);
  white-space: nowrap;
}

.timer-speed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.timer-speed-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timer-speed-badge {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.badge-slow {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.badge-normal {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.badge-fast {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.timer-speed-value {
  font-family: var(--font-mono);
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.timer-speed-verbose {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.timer-speed-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  margin-top: auto;
}

/* Custom WPM Card */
.timer-custom-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.timer-custom-left {
  flex: 1;
  min-width: 280px;
}

.timer-custom-right {
  text-align: right;
  min-width: 160px;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border-card);
}

.timer-custom-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.timer-custom-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timer-custom-badge {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(43, 130, 254, 0.1);
  color: #2b82fe;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.timer-custom-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 0.85rem;
}

.timer-custom-input-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.timer-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  accent-color: #2b82fe;
  cursor: pointer;
}

.timer-num-input-wrap {
  display: inline-flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  gap: 0.25rem;
}

.timer-num-input {
  width: 55px;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  outline: none;
}

.timer-unit {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.timer-custom-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.timer-custom-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: #2b82fe;
  line-height: 1;
}

.timer-custom-verbose {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Video-Length Targets */
.timer-targets-section {
  margin-bottom: 2.5rem;
}

.timer-targets-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.target-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.target-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.target-btn.active {
  background: #2b82fe;
  color: #FFFFFF;
  border-color: #2b82fe;
  box-shadow: 0 4px 12px rgba(43, 130, 254, 0.35);
  font-weight: 700;
}

.timer-target-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(43, 130, 254, 0.08) 0%, rgba(43, 130, 254, 0.02) 100%);
  border: 1.5px solid rgba(43, 130, 254, 0.3);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
}

.target-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #2b82fe;
  color: #FFFFFF;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.35);
}

.target-banner-label {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.target-banner-val {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0.15rem 0;
}

.target-banner-detail {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Stats Section */
.timer-stats-section {
  margin-bottom: 2.5rem;
}

.timer-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.timer-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.timer-stat-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.timer-stat-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Notice Card */
.timer-notice-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}

.timer-notice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  flex-shrink: 0;
  margin-top: 2px;
}

.timer-notice-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}

.timer-notice-text {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.guide-subheading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0.85rem;
  line-height: 1.25;
}

.timer-table th,
.timer-table td {
  padding: 0.75rem 1rem;
}

@media (max-width: 900px) {
  .timer-speeds-grid {
    grid-template-columns: 1fr;
  }

  .timer-custom-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .timer-custom-right {
    text-align: left;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border-card);
    padding-top: 1rem;
  }

  .timer-target-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Video Aspect Ratio Converter Component Styles
   ========================================================================== */
.aspect-container {
  max-width: 1040px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.video-dropzone {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 2px dashed rgba(43, 130, 254, 0.38);
  border-radius: 20px;
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 18px -4px rgba(43, 130, 254, 0.06);
}

[data-theme="dark"] .video-dropzone {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(43, 130, 254, 0.38);
}

.video-dropzone:hover,
.video-dropzone.dragover {
  border-color: #2b82fe;
  background: rgba(43, 130, 254, 0.05);
  box-shadow: 0 10px 28px -4px rgba(43, 130, 254, 0.14);
}

.video-dropzone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #EFF6FF;
  color: #2b82fe;
  margin: 0 auto 1rem;
}

[data-theme="dark"] .video-dropzone-icon {
  background: rgba(59, 130, 246, 0.18);
}

.video-dropzone-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.video-dropzone-sub {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.35rem;
}

.video-btn-browse {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.35);
  transition: all 0.2s ease;
}

.video-btn-browse:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 130, 254, 0.45);
  background: #2578ee;
}

.video-formats-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

.video-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

/* Video Info Bar */
.video-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.video-info-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.video-info-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.video-meta-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  color: var(--text-secondary);
}

/* Converter Studio Grid */
.converter-studio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.studio-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.studio-panel-header {
  margin-bottom: 1.25rem;
}

.studio-panel-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.studio-panel-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Preview Canvas Wrap */
.aspect-canvas-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090d16;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.5rem;
  min-height: 340px;
  overflow: hidden;
}

.aspect-preview-canvas {
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.aspect-flow-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.flow-pill {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
}

.flow-pill.target {
  background: rgba(43, 130, 254, 0.1);
  color: #2b82fe;
  border-color: rgba(43, 130, 254, 0.25);
  font-weight: 700;
}

/* Preset Groups */
.preset-section-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1rem 0 0.45rem;
}

.preset-section-label:first-of-type {
  margin-top: 0;
}

.preset-buttons-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.preset-btn {
  padding: 0.45rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.preset-btn.active {
  background: #2b82fe;
  color: #FFFFFF;
  border-color: #2b82fe;
  box-shadow: 0 4px 12px rgba(43, 130, 254, 0.3);
  font-weight: 700;
}

/* Custom Dimensions Row */
.custom-dim-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  flex-wrap: wrap;
}

.custom-dim-input {
  width: 75px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-primary);
  text-align: right;
}

.custom-dim-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Conversion Modes Tabs */
.mode-tabs-wrap {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  margin-top: 0.5rem;
}

.mode-tab-btn {
  flex: 1;
  padding: 0.45rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.mode-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

/* Position Buttons */
.position-buttons-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.position-btn {
  padding: 0.35rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.position-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.position-btn.active {
  background: rgba(43, 130, 254, 0.15);
  color: #2b82fe;
  border-color: rgba(43, 130, 254, 0.35);
  font-weight: 700;
}

/* Alerts */
.stretch-warning-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding: 0.5rem 0.85rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #b45309;
}

[data-theme="dark"] .stretch-warning-alert {
  color: #fbbf24;
}

/* Output Settings */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settings-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
}

.settings-select:focus {
  border-color: #2b82fe;
}

/* Action Button */
.btn-convert-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1.5rem;
  box-shadow: 0 4px 16px rgba(43, 130, 254, 0.4);
  transition: all 0.2s ease;
}

.btn-convert-action:hover {
  background: #2578ee;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(43, 130, 254, 0.5);
}

/* Progress Section */
.aspect-progress-card {
  max-width: 650px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.progress-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.progress-status-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2b82fe, #38bdf8);
  border-radius: var(--radius-pill);
  transition: width 0.15s ease;
}

.progress-percent {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
  margin-bottom: 1.5rem;
}

.btn-cancel-action {
  padding: 0.5rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel-action:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--accent-error);
  border-color: rgba(239, 68, 68, 0.25);
}

/* Result Section */
.aspect-result-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.result-heading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
}

.result-video-preview {
  max-width: 100%;
  max-height: 380px;
  border-radius: 12px;
  background: #000000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  margin-bottom: 1.5rem;
}

.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.result-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.result-stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.result-stat-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-download-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  background: #2b82fe;
  color: #FFFFFF;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(43, 130, 254, 0.4);
  transition: all 0.2s ease;
}

.btn-download-action:hover {
  background: #2578ee;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(43, 130, 254, 0.5);
  text-decoration: none;
  color: #FFFFFF;
}

.btn-reset-action {
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-action:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .converter-studio {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PDF Size Reducer to Target Component Styles
   ========================================================================== */
.pdf-container {
  max-width: 860px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.25rem;
}

/* Dropzone */
.pdf-dropzone {
  position: relative;
  background: var(--bg-secondary);
  border: 2px dashed rgba(43, 130, 254, 0.38);
  border-radius: 20px;
  padding: 2.75rem 2rem 2.25rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 18px -4px rgba(43, 130, 254, 0.06);
}

[data-theme="dark"] .pdf-dropzone {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(43, 130, 254, 0.38);
}

.pdf-dropzone:hover,
.pdf-dropzone.dragover {
  border-color: #2b82fe;
  background: rgba(43, 130, 254, 0.05);
  box-shadow: 0 10px 28px -4px rgba(43, 130, 254, 0.14);
}

.pdf-dropzone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #EFF6FF;
  color: #2b82fe;
  margin: 0 auto 1rem;
}

[data-theme="dark"] .pdf-dropzone-icon {
  background: rgba(59, 130, 246, 0.18);
}

.pdf-dropzone-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.pdf-dropzone-sub {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.35rem;
}

.pdf-btn-browse {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.35);
  transition: all 0.2s ease;
}

.pdf-btn-browse:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 130, 254, 0.45);
  background: #2578ee;
}

.pdf-formats-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

.pdf-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

/* Config Section & File Bar */
.pdf-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.pdf-file-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.pdf-file-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pdf-meta-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  color: var(--text-secondary);
}

.pdf-config-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.config-card-header {
  margin-bottom: 1.5rem;
}

.config-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}

.config-card-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Preset Buttons Grid */
.pdf-section-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.25rem 0 0.55rem;
}

.pdf-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
}

.target-preset-btn {
  padding: 0.65rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.target-preset-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.target-preset-btn.active {
  background: #2b82fe;
  color: #FFFFFF;
  border-color: #2b82fe;
  box-shadow: 0 4px 12px rgba(43, 130, 254, 0.3);
  font-weight: 700;
}

/* Custom Target Row */
.custom-target-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
}

.custom-target-input {
  width: 90px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-card);
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-primary);
  text-align: right;
  outline: none;
}

.custom-unit-select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-card);
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
}

.target-badge-pill {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  background: rgba(43, 130, 254, 0.12);
  color: #2b82fe;
  border: 1px solid rgba(43, 130, 254, 0.28);
  border-radius: var(--radius-pill);
}

/* Compression Modes */
.comp-modes-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
}

.comp-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.75rem 0.95rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.comp-mode-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.comp-mode-btn.active {
  background: rgba(43, 130, 254, 0.08);
  border-color: #2b82fe;
  box-shadow: 0 2px 8px rgba(43, 130, 254, 0.15);
}

.mode-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.comp-mode-btn.active .mode-name {
  color: #2b82fe;
}

.mode-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Primary Reduce Button */
.btn-reduce-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: #2b82fe;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1.75rem;
  box-shadow: 0 4px 16px rgba(43, 130, 254, 0.4);
  transition: all 0.2s ease;
}

.btn-reduce-action:hover {
  background: #2578ee;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(43, 130, 254, 0.5);
}

/* Progress Card */
.pdf-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.prog-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
  margin: 1.5rem 0;
}

/* Result Card */
.pdf-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.result-notice-box {
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: left;
}

.result-notice-box.notice-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065f46;
}

[data-theme="dark"] .result-notice-box.notice-success {
  color: #34d399;
}

.result-notice-box.notice-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #92400e;
}

[data-theme="dark"] .result-notice-box.notice-warning {
  color: #fbbf24;
}

.result-status-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.result-status-badge.status-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.result-status-badge.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

@media (max-width: 600px) {
  .pdf-container {
    padding: 0 0.75rem;
  }

  .pdf-config-card {
    padding: 1.25rem;
  }

  .custom-target-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .target-badge-pill {
    margin-left: 0;
  }
}

/* ==========================================================================
   Character Counter Workspace Styles
   ========================================================================== */
.char-counter-container {
  max-width: 1000px;
  margin: 0 auto 3.5rem auto;
  padding: 0 1rem;
}

.char-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: rgba(43, 130, 254, 0.08);
  border: 1px solid rgba(43, 130, 254, 0.22);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .char-privacy-pill {
  background: rgba(43, 130, 254, 0.15);
  border-color: rgba(43, 130, 254, 0.35);
  color: #60a5fa;
}

/* Toolbar & Utility Actions */
.char-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.char-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.char-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.char-tool-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.char-tool-btn:active {
  transform: translateY(0);
}

.char-tool-btn.btn-copy-action {
  background: var(--accent-primary, #2b82fe);
  border-color: var(--accent-primary, #2b82fe);
  color: #ffffff;
}

.char-tool-btn.btn-copy-action:hover {
  background: var(--accent-primary-hover, #2578ee);
  border-color: var(--accent-primary-hover, #2578ee);
  color: #ffffff;
}

.char-tool-btn.btn-copy-action.copied {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.char-tool-btn.btn-clear-action:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* Central Input Area */
.char-input-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.char-textarea {
  width: 100%;
  min-height: 250px;
  max-height: 600px;
  padding: 1.25rem 1.35rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-card);
  font-family: var(--font-sans);
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--text-primary);
  resize: vertical;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

.char-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(43, 130, 254, 0.15);
}

.char-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

/* Primary Statistics Grid */
.char-primary-stats-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.char-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 0.95rem 0.65rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.char-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(43, 130, 254, 0.35);
}

.char-stat-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.char-stat-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.char-stat-card.featured-stat {
  border-color: rgba(43, 130, 254, 0.4);
  background: linear-gradient(180deg, rgba(43, 130, 254, 0.04) 0%, var(--bg-card) 100%);
}

.char-stat-card.featured-stat .char-stat-val {
  color: var(--accent);
}

/* Reading & Speaking Time Dual Card */
.char-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.char-time-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.char-time-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.char-time-info {
  display: flex;
  flex-direction: column;
}

.char-time-val {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.char-time-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Character Limit Mode Card */
.char-limit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.char-limit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.char-limit-title-wrap {
  display: flex;
  flex-direction: column;
}

.char-limit-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.char-limit-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0.15rem 0 0 0;
}

.char-preset-dropdown {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.char-preset-dropdown:focus {
  border-color: var(--accent);
}

/* Preset Quick Pill Buttons */
.preset-pills-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.preset-pill-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-pill-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}

.preset-pill-btn.active {
  background: rgba(43, 130, 254, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.custom-limit-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.custom-limit-input {
  width: 110px;
  padding: 0.45rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
}

.custom-limit-input:focus {
  border-color: var(--accent);
}

/* Limit Meter Summary */
.limit-meter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.15rem;
  background: var(--bg-secondary);
  border-radius: 10px;
  margin-bottom: 1rem;
}

.limit-stat-box {
  display: flex;
  flex-direction: column;
}

.limit-stat-num {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.limit-stat-title {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.limit-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.limit-status-badge.badge-neutral {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.limit-status-badge.badge-success {
  background: rgba(22, 163, 74, 0.14);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.28);
}

[data-theme="dark"] .limit-status-badge.badge-success {
  color: #4ade80;
}

.limit-status-badge.badge-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.32);
}

[data-theme="dark"] .limit-status-badge.badge-danger {
  color: #f87171;
}

/* Progress Bar */
.limit-progress-track {
  width: 100%;
  height: 8px;
  background: var(--border-card);
  border-radius: 4px;
  overflow: hidden;
}

.limit-progress-fill {
  height: 100%;
  width: 0%;
  transition: width 0.2s ease, background-color 0.2s ease;
  border-radius: 4px;
}

.limit-progress-fill.fill-success {
  background-color: var(--accent);
}

.limit-progress-fill.fill-warning {
  background-color: #f59e0b;
}

.limit-progress-fill.fill-danger {
  background-color: #ef4444;
}

/* Advanced Stats Accordion */
.char-advanced-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.char-advanced-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.35rem;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.char-advanced-toggle:hover {
  background: var(--bg-secondary);
}

.accordion-arrow {
  transition: transform var(--transition-fast);
}

.char-advanced-content {
  padding: 1.25rem 1.35rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.advanced-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.adv-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 1rem;
}

.adv-stat-val {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.adv-stat-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.35rem;
}

.adv-stat-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* Floating Toast Feedback */
.char-copy-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #111827;
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
}

.char-copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Reference Table Styling for Educational Section */
.limits-reference-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.limits-reference-table th,
.limits-reference-table td {
  padding: 0.85rem 1.15rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.limits-reference-table th {
  background: var(--bg-secondary);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.limits-reference-table tr:last-child td {
  border-bottom: none;
}

.limits-reference-table tr:hover td {
  background: rgba(43, 130, 254, 0.03);
}

/* Responsive Media Queries */
@media (max-width: 860px) {
  .char-primary-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .advanced-stats-grid {
    grid-template-columns: 1fr;
  }

  .limit-meter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .char-counter-container {
    padding: 0 0.5rem;
  }

  .char-primary-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .char-time-row {
    grid-template-columns: 1fr;
  }

  .char-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .char-toolbar-group {
    justify-content: center;
  }

  .limit-meter-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ==========================================================================
   Image Resizer Workspace Styles
   ========================================================================== */
.resizer-container {
  max-width: 960px;
  margin: 0 auto 3.5rem auto;
  padding: 0 1rem;
}

.resizer-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: rgba(43, 130, 254, 0.08);
  border: 1px solid rgba(43, 130, 254, 0.22);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .resizer-privacy-pill {
  background: rgba(43, 130, 254, 0.15);
  border-color: rgba(43, 130, 254, 0.35);
  color: #60a5fa;
}

/* Dropzone Upload */
.resizer-dropzone {
  background: #F8FAFC;
  border: 2px dashed rgba(59, 130, 246, 0.45);
  border-radius: 20px;
  padding: 3.5rem 2rem 3rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.04);
}

[data-theme="dark"] .resizer-dropzone {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(59, 130, 246, 0.4);
}

.resizer-dropzone:hover,
.resizer-dropzone.dragover {
  border-color: #2563EB;
  background: rgba(37, 99, 235, 0.04);
  box-shadow: 0 10px 28px -4px rgba(37, 99, 235, 0.12);
}

.resizer-dropzone-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.25rem auto;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563EB;
  transition: transform 0.2s ease;
}

.resizer-dropzone:hover .resizer-dropzone-icon {
  transform: translateY(-2px);
}

.resizer-dropzone-heading {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  letter-spacing: -0.02em;
}

.resizer-dropzone-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.btn-resizer-browse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: #2563EB;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 2.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px -2px rgba(37, 99, 235, 0.38);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-resizer-browse:hover {
  background: #1D4ED8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -2px rgba(37, 99, 235, 0.48);
}

.resizer-formats-hint {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Resizer Workspace Panel */
.resizer-workspace-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.resizer-mode-tabs {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.3rem;
  margin-bottom: 1.5rem;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.resize-mode-tab {
  flex: 1;
  min-width: 130px;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.resize-mode-tab:hover {
  color: var(--text-primary);
}

.resize-mode-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* Dimension Inputs Row */
.resizer-inputs-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.resizer-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 140px;
}

.resizer-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.resizer-input-field {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
  box-sizing: border-box;
}

.resizer-input-field:focus {
  border-color: var(--accent);
}

.resizer-input-field:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.aspect-lock-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg-secondary);
  font-size: 1.1rem;
  margin-top: 1.4rem;
  color: var(--accent);
}

/* Toggles Row */
.resizer-toggles-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.resizer-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.resizer-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Presets Row */
.dim-presets-section {
  margin-bottom: 1.5rem;
}

.dim-presets-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.dim-presets-grid {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dim-preset-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dim-preset-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}

/* Advanced Options Accordion */
.resizer-advanced-card {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.resizer-advanced-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.25rem 0;
}

.resizer-advanced-content {
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-radius: 10px;
}

.adv-grid-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.resizer-select-field {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
}

/* Image Queue List */
.resizer-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.resizer-queue-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.resizer-items-queue {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  max-height: 420px;
  overflow-y: auto;
}

.resizer-item-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: border-color var(--transition-fast);
}

.resizer-item-thumb-wrap {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.resizer-item-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.resizer-item-details {
  flex: 1;
  min-width: 0;
}

.resizer-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.resizer-item-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 0.74rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-card);
  border-radius: 4px;
  color: var(--text-secondary);
}

.meta-tag.target-dim-tag {
  color: var(--accent);
  font-weight: 600;
}

.resizer-item-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.resizer-item-remove-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Primary Action Buttons */
.resizer-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-resize-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.35);
  transition: all var(--transition-fast);
}

.btn-resize-primary:hover {
  background: var(--accent-primary-hover, #2578ee);
  transform: translateY(-1px);
}

.btn-resize-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Results Card */
.resizer-results-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.results-heading {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.results-summary-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.resizer-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.resizer-result-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.result-thumb-wrap {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.result-details {
  flex: 1;
  min-width: 0;
}

.result-file-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.35rem;
}

.result-stats-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.result-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  background: var(--bg-card);
  border-radius: 6px;
  color: var(--text-secondary);
}

.result-badge.reduction-badge {
  color: var(--text-muted);
}

.btn-download-single {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-download-single:hover {
  background: var(--accent-primary-hover, #2578ee);
}

.resizer-results-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-download-all-main {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #16a34a;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  transition: all var(--transition-fast);
}

.btn-download-all-main:hover {
  background: #15803d;
  transform: translateY(-1px);
}

/* Spinner Icon */
.spin-icon {
  animation: spinAnimation 1s linear infinite;
}

@keyframes spinAnimation {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .adv-grid-row {
    grid-template-columns: 1fr;
  }

  .resizer-inputs-row {
    flex-direction: column;
    align-items: stretch;
  }

  .aspect-lock-indicator {
    align-self: center;
    margin-top: 0;
  }

  .resizer-result-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .resizer-result-card .result-actions {
    width: 100%;
    margin-top: 0.75rem;
  }

  .resizer-result-card .btn-download-single {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   PDF Merger Tool Styles (/merge-pdf)
   Clean, modern, minimalist utility aesthetic. Zero gradients or glassmorphism.
   ========================================================================== */

.pdf-merger-container {
  max-width: 860px;
  margin: 0 auto 3.5rem auto;
  padding: 0 1rem;
}

/* Privacy Statement Pill */
.merger-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.merger-privacy-pill svg {
  color: #16a34a;
  flex-shrink: 0;
}

/* Error Alert */
.merger-error-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .merger-error-alert {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Dropzone Upload Area */
.merger-dropzone {
  background: var(--bg-card);
  border: 2px dashed var(--border-card);
  border-radius: var(--radius-card);
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.merger-dropzone:hover,
.merger-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(43, 130, 254, 0.03);
}

[data-theme="dark"] .merger-dropzone:hover,
[data-theme="dark"] .merger-dropzone.dragover {
  background: rgba(43, 130, 254, 0.08);
}

.merger-dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem auto;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.merger-dropzone-heading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.merger-dropzone-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn-merger-browse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: #2563EB;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 2.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px -2px rgba(37, 99, 235, 0.38);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-merger-browse:hover {
  background: #1D4ED8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -2px rgba(37, 99, 235, 0.48);
}

.merger-dropzone-hint {
  margin-top: 1.25rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

/* File Management Workspace */
.merger-workspace-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.merger-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.merger-queue-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.merger-queue-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.merger-queue-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.merger-stat-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
}

/* File List & Cards */
.merger-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.merger-file-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.merger-file-card.dragging {
  opacity: 0.45;
  background: var(--bg-card);
  border-style: dashed;
}

.merger-file-card.drag-over-top {
  border-top: 2px solid var(--accent);
}

.merger-file-card.drag-over-bottom {
  border-bottom: 2px solid var(--accent);
}

.merger-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.merger-card-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.merger-drag-handle {
  cursor: grab;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0.35rem 0.2rem;
  user-select: none;
  border-radius: 4px;
}

.merger-drag-handle:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}

.merger-order-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 24px;
}

.merger-pdf-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.merger-file-details {
  flex: 1;
  min-width: 0;
}

.merger-file-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.merger-file-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.merger-meta-pill {
  font-weight: 600;
  color: var(--text-primary);
}

.merger-meta-dot {
  color: var(--text-muted);
}

.merger-meta-size {
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.merger-card-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Reorder Buttons (Up / Down) */
.merger-reorder-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-order-move {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  width: 26px;
  height: 18px;
  font-size: 0.65rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition-fast);
}

.btn-order-move:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-order-move:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Page Preview Toggle */
.btn-preview-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-preview-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Remove File Button */
.btn-remove-file {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-remove-file:hover {
  background: #fee2e2;
  color: #ef4444;
}

[data-theme="dark"] .btn-remove-file:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Page Preview Drawer (Optional inspection) */
.merger-preview-drawer {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-subtle);
}

.preview-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.preview-header-title {
  font-weight: 600;
  color: var(--text-primary);
}

.preview-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.preview-loading-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

.preview-pages-grid {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem;
}

.page-thumb-card {
  flex-shrink: 0;
  width: 72px;
  cursor: pointer;
  border-radius: 6px;
  border: 2px solid var(--border-subtle);
  background: var(--bg-card);
  padding: 0.25rem;
  transition: all var(--transition-fast);
  text-align: center;
  position: relative;
}

.page-thumb-card.page-active {
  border-color: var(--accent);
}

.page-thumb-card.page-excluded {
  border-color: var(--border-subtle);
  opacity: 0.45;
  filter: grayscale(1);
}

.page-thumb-preview {
  width: 100%;
  height: 94px;
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.page-thumb-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.thumb-page-placeholder {
  font-size: 0.7rem;
  color: #64748b;
}

.page-status-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-thumb-card.page-excluded .page-status-badge {
  background: #ef4444;
}

.page-thumb-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Merger Actions Bar */
.merger-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.merger-actions-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-add-more-files {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.65rem 1.15rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-add-more-files:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-merger-clear {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.btn-merger-clear:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.btn-execute-merge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 2.25rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.35);
  transition: all var(--transition-fast);
}

.btn-execute-merge:hover:not(:disabled) {
  background: var(--accent-primary-hover, #2578ee);
  transform: translateY(-1px);
}

.btn-execute-merge:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Merger & Utility Tool Primary Buttons */
.btn-merger-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0.85rem 2.25rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.35);
  transition: all var(--transition-fast);
}

.btn-merger-primary:hover:not(:disabled) {
  background: var(--accent-primary-hover, #2578ee);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(43, 130, 254, 0.45);
}

.btn-merger-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-merger-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Merger & Utility Tool Secondary Buttons (e.g. Change Image, Adjust Crop, Start Over) */
.btn-merger-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 10px;
  padding: 0.6rem 1.15rem;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.btn-merger-secondary:hover:not(:disabled) {
  background: var(--bg-hover, #f8fafc);
  border-color: var(--accent-primary, #2b82fe);
  color: var(--accent-primary, #2b82fe);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-merger-secondary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-merger-secondary svg {
  flex-shrink: 0;
}

[data-theme="dark"] .btn-merger-secondary {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .btn-merger-secondary:hover:not(:disabled) {
  background: #334155;
  border-color: #60a5fa;
  color: #60a5fa;
}

/* Merger & Utility Tool Small Toolbar Buttons (e.g. Rotate Left/Right, Flip, Circle Crop, Presets) */
.btn-merger-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle, #cbd5e1);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.2;
}

.btn-merger-sm:hover:not(:disabled) {
  background: var(--bg-hover, #f1f5f9);
  border-color: var(--accent-primary, #2b82fe);
  color: var(--accent-primary, #2b82fe);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(43, 130, 254, 0.15);
}

.btn-merger-sm:active:not(:disabled) {
  transform: translateY(0);
}

.btn-merger-sm.active {
  background: #eff6ff;
  border-color: var(--accent-primary, #2b82fe);
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: inset 0 1px 3px rgba(37, 99, 235, 0.18);
}

[data-theme="dark"] .btn-merger-sm {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .btn-merger-sm:hover:not(:disabled) {
  background: #334155;
  border-color: #60a5fa;
  color: #60a5fa;
}

[data-theme="dark"] .btn-merger-sm.active {
  background: rgba(59, 130, 246, 0.25);
  border-color: #60a5fa;
  color: #93c5fd;
}

/* Modal Action Buttons */
.btn-modal-clear {
  padding: 0.55rem 1rem;
  background: transparent;
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-modal-clear:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: #ef4444;
  color: #ef4444;
}

.btn-modal-save {
  padding: 0.55rem 1.3rem;
  background: var(--accent-primary, #2b82fe);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(43, 130, 254, 0.3);
  transition: all var(--transition-fast);
}

.btn-modal-save:hover {
  background: var(--accent-primary-hover, #2578ee);
  transform: translateY(-1px);
}

/* Completion Result Card */
.merger-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.merger-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .merger-result-badge {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.merger-result-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.merger-result-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2rem auto;
}

.merger-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 560px;
  margin: 0 auto 2.25rem auto;
}

.merger-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.merger-stat-val {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.merger-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.merger-result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-download-merged-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #16a34a;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 2.25rem;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  transition: all var(--transition-fast);
}

.btn-download-merged-pdf:hover {
  background: #15803d;
  transform: translateY(-1px);
}

.btn-merge-more-pdfs {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-merge-more-pdfs:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .merger-dropzone {
    padding: 2.5rem 1.25rem;
  }

  .merger-card-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .merger-card-right {
    width: 100%;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
  }

  .merger-stats-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .merger-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .merger-actions-left {
    width: 100%;
    justify-content: space-between;
  }

  .btn-execute-merge,
  .btn-download-merged-pdf,
  .btn-merge-more-pdfs {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   JPG to PNG Converter — Focused Minimalist Utility Tool
   ========================================================================== */

/* Free Badge for Hero / H1 */
.badge-free {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--accent-primary, #2b82fe);
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 0.5rem;
  box-shadow: 0 2px 6px rgba(43, 130, 254, 0.25);
}

.jpg-png-container {
  max-width: 880px;
  margin: 0 auto 3.5rem auto;
  padding: 0 1.25rem;
}

.jpg-png-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.jpg-png-error-alert {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* Upload Dropzone */
.jpg-png-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 2rem;
  background: var(--bg-card);
  border: 2px dashed var(--border-card);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.jpg-png-dropzone:hover,
.jpg-png-dropzone:focus-visible,
.jpg-png-dropzone.dragover {
  border-color: var(--accent-primary, #2b82fe);
  background: #fafcff;
}

.jpg-png-dropzone-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #eff6ff;
  color: var(--accent-primary, #2b82fe);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.jpg-png-dropzone-heading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.4rem 0;
}

.jpg-png-dropzone-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.btn-jpg-browse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.85rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(43, 130, 254, 0.35);
  transition: all 0.2s ease;
}

.btn-jpg-browse:hover {
  background: var(--accent-primary-hover, #2578ee);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -4px rgba(43, 130, 254, 0.42);
}

.jpg-png-dropzone-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

/* Workspace Card & Queue List */
.jpg-png-workspace-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1.75rem;
}

.jpg-png-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
}

.queue-badges-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.queue-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}

.queue-pill.primary {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.queue-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-secondary-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-tool:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-secondary-tool.danger:hover {
  color: var(--accent-error);
  border-color: #fecaca;
  background: #fef2f2;
}

/* File Queue Grid/List */
.jpg-png-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.jpg-png-file-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.jpg-png-card-thumb-wrap {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jpg-png-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jpg-png-card-details {
  flex: 1;
  min-width: 0;
}

.jpg-png-card-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.jpg-png-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.meta-pill.size {
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.meta-pill.format {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #dbeafe;
}

.btn-remove-queue-item {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-remove-queue-item:hover {
  background: #fef2f2;
  color: var(--accent-error);
}

/* Primary Convert Bar */
.jpg-png-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-execute-convert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(43, 130, 254, 0.35);
  transition: all 0.2s ease;
}

.btn-execute-convert:hover:not(:disabled) {
  background: var(--accent-primary-hover, #2578ee);
  transform: translateY(-1px);
}

.btn-execute-convert:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Progress Card */
.jpg-png-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
}

.jpg-png-progress-bar-track {
  width: 100%;
  height: 10px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  margin: 1.25rem 0 0.75rem 0;
  border: 1px solid var(--border-subtle);
}

.jpg-png-progress-bar-fill {
  height: 100%;
  background: var(--accent-primary, #2b82fe);
  border-radius: 999px;
  width: 0%;
  transition: width 0.2s ease;
}

/* Result Section */
.jpg-png-result-card-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2rem;
}

.results-header-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.results-batch-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-download-batch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px -3px rgba(43, 130, 254, 0.35);
  transition: all 0.2s ease;
}

.btn-download-batch:hover {
  background: var(--accent-primary-hover, #2578ee);
  transform: translateY(-1px);
}

.btn-download-batch.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  box-shadow: none;
}

.btn-download-batch.secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
}

.jpg-png-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.jpg-png-result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 14px;
}

.result-thumb-wrap {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #0000000a;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-info {
  flex: 1;
  min-width: 0;
}

.result-filename {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.3rem;
}

.result-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.meta-tag.format {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.meta-tag.dimensions,
.meta-tag.size {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.meta-tag.error {
  background: #fef2f2;
  color: var(--accent-error);
}

.btn-download-single {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-download-single:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.results-footer-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-convert-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-convert-more:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .jpg-png-dropzone {
    padding: 2.5rem 1.25rem;
  }

  .jpg-png-dropzone-heading {
    font-size: 1.25rem;
  }

  .jpg-png-file-card,
  .jpg-png-result-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-action {
    width: 100%;
    margin-top: 0.5rem;
  }

  .btn-download-single {
    width: 100%;
    justify-content: center;
  }

  .results-header-summary,
  .jpg-png-action-bar,
  .results-footer-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-execute-convert,
  .btn-download-batch,
  .btn-convert-more {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================================================
   IMAGE COMPRESSOR TOOL STYLES (/compress-image & /image-compressor)
   Minimalist, fast, premium aesthetic matching The Toolroom
============================================================================= */

.img-comp-container {
  max-width: 880px;
  margin: 0 auto 3.5rem auto;
  padding: 0 1.25rem;
}

.img-comp-privacy-wrap {
  text-align: center;
  margin-bottom: 1.5rem;
}

.img-comp-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}

[data-theme="dark"] .img-comp-privacy-pill {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
}

.img-comp-privacy-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Upload Dropzone */
.img-comp-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 2rem;
  background: var(--bg-card);
  border: 2px dashed var(--border-card);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.img-comp-dropzone:hover,
.img-comp-dropzone:focus-visible,
.img-comp-dropzone.dragover {
  border-color: var(--accent-primary, #2b82fe);
  background: var(--bg-card-hover, rgba(43, 130, 254, 0.03));
}

.img-comp-dropzone-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #eff6ff;
  color: var(--accent-primary, #2b82fe);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .img-comp-dropzone-icon {
  background: rgba(43, 130, 254, 0.15);
}

.img-comp-dropzone-heading {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.4rem 0;
}

.img-comp-dropzone-or {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.9rem;
}

.btn-comp-browse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.3);
  transition: all 0.2s ease;
  margin-bottom: 1.25rem;
}

.btn-comp-browse:hover {
  background: #1e6fe0;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(43, 130, 254, 0.4);
}

.img-comp-dropzone-hint {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Workspace Card */
.img-comp-workspace-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Controls Header */
.img-comp-controls-panel {
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

[data-theme="dark"] .img-comp-controls-panel {
  background: rgba(255, 255, 255, 0.02);
}

/* Mode Selection Tabs */
.img-comp-mode-tabs {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 1.25rem;
}

.img-comp-mode-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.img-comp-mode-tab:hover {
  color: var(--text-primary);
}

.img-comp-mode-tab.active {
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(43, 130, 254, 0.25);
}

/* Quality Slider Controls */
.slider-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.slider-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.slider-value-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.88rem;
  font-weight: 700;
  background: #eff6ff;
  color: var(--accent-primary, #2b82fe);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

[data-theme="dark"] .slider-value-badge {
  background: rgba(43, 130, 254, 0.15);
}

.slider-track-wrap {
  margin: 0.5rem 0;
}

.comp-range-input {
  width: 100%;
  accent-color: var(--accent-primary, #2b82fe);
  cursor: pointer;
}

.slider-labels-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.4rem;
}

.controls-explanation-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0.4rem 0 0 0;
}

/* Target Size Controls */
.target-presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.65rem 0;
}

.preset-chip {
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.preset-chip.active {
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  border-color: var(--accent-primary, #2b82fe);
}

.custom-size-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.custom-size-input {
  width: 120px;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
}

.custom-size-select {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Output Format Select Row */
.output-format-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-card);
  padding-top: 1rem;
  margin-top: 1rem;
}

.format-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.format-select {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

/* Queue Header */
.img-comp-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-card);
}

.queue-badges-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.queue-pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--text-secondary);
}

.queue-pill.primary {
  background: #eff6ff;
  color: var(--accent-primary, #2b82fe);
}

[data-theme="dark"] .queue-pill.primary {
  background: rgba(43, 130, 254, 0.15);
}

.queue-header-actions {
  display: flex;
  gap: 0.5rem;
}

/* Queued File Cards */
.img-comp-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-height: 480px;
  overflow-y: auto;
}

.img-comp-file-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  transition: all 0.15s ease;
}

.img-comp-file-card:hover {
  border-color: var(--border-hover);
}

.file-card-thumb-wrap {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .file-card-thumb-wrap {
  background: #1e293b;
}

.file-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-card-meta {
  flex: 1;
  min-width: 0;
}

.file-card-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.file-card-sizes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.file-orig-size {
  color: var(--text-secondary);
}

.file-comp-size {
  font-weight: 600;
  color: var(--text-primary);
}

.comp-reduction-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
}

.comp-reduction-pill.success {
  background: #dcfce7;
  color: #15803d;
}

[data-theme="dark"] .comp-reduction-pill.success {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.comp-reduction-pill.neutral {
  background: #f1f5f9;
  color: var(--text-secondary);
}

.file-card-status {
  margin-top: 0.25rem;
}

.badge-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.badge-status.ready {
  background: #f1f5f9;
  color: var(--text-secondary);
}

.badge-status.compressing {
  background: #fef3c7;
  color: #b45309;
}

.badge-status.compressed {
  background: #dcfce7;
  color: #15803d;
}

.badge-status.error {
  background: #fee2e2;
  color: #b91c1c;
}

.file-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-card-compare,
.btn-card-download,
.btn-res-compare,
.btn-res-download {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-compare:hover,
.btn-res-compare:hover {
  background: var(--bg-card-hover, rgba(0, 0, 0, 0.03));
  border-color: var(--border-hover);
}

.btn-card-download,
.btn-res-download {
  background: var(--accent-primary, #2b82fe);
  border-color: var(--accent-primary, #2b82fe);
  color: #ffffff;
}

.btn-card-download:hover,
.btn-res-download:hover {
  background: #1e6fe0;
}

.btn-card-remove {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 0.45rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-card-remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* Primary Execution Bar */
.img-comp-action-bar {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

.btn-execute-compress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 380px;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.9rem 2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.35);
  transition: all 0.2s ease;
}

.btn-execute-compress:hover:not(:disabled) {
  background: #1e6fe0;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(43, 130, 254, 0.45);
}

.btn-execute-compress:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Progress Card */
.img-comp-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin-top: 1.5rem;
}

.comp-progress-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle, #e2e8f0);
  border-radius: 999px;
  overflow: hidden;
  margin: 1.25rem 0 0.5rem 0;
}

.comp-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-primary, #2b82fe);
  border-radius: 999px;
  transition: width 0.15s ease;
}

/* Results Section */
.img-comp-result-card-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Before / After Stats Card */
.comp-before-after-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.25rem 2rem;
  margin: 1rem 0 1.5rem 0;
}

[data-theme="dark"] .comp-before-after-card {
  background: rgba(255, 255, 255, 0.02);
}

.comp-stat-col {
  text-align: center;
}

.comp-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.comp-stat-val {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.comp-stat-val.highlight {
  color: #15803d;
}

[data-theme="dark"] .comp-stat-val.highlight {
  color: #4ade80;
}

.comp-arrow-divider {
  font-size: 1.5rem;
  color: var(--accent-primary, #2b82fe);
  font-weight: 800;
}

.comp-results-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.btn-download-comp-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.35);
  transition: all 0.2s ease;
}

.btn-download-comp-all:hover {
  background: #1e6fe0;
  transform: translateY(-1px);
}

.btn-download-comp-zip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-download-comp-zip:hover {
  background: var(--bg-card-hover, rgba(0, 0, 0, 0.03));
  border-color: var(--border-hover);
}

/* Result Rows */
.img-comp-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.img-comp-result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
}

.result-thumb-wrap {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
}

.result-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-meta {
  flex: 1;
  min-width: 0;
}

.result-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.3rem;
}

.result-comparison-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.comp-val.before {
  color: var(--text-secondary);
}

.comp-val.after {
  color: #15803d;
}

[data-theme="dark"] .comp-val.after {
  color: #4ade80;
}

.comp-arrow {
  color: var(--text-muted);
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Footer reset button */
.img-comp-footer-bar {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-card);
}

.btn-comp-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-comp-more:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Interactive Comparison Modal */
.comp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
}

.comp-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.comp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-card);
}

.comp-modal-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  line-height: 1;
}

.comp-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.comp-modal-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.preview-col {
  display: flex;
  flex-direction: column;
}

.preview-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preview-img-frame {
  height: 320px;
  background: #f1f5f9;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .preview-img-frame {
  background: #0f172a;
}

.preview-img-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-col-meta {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.preview-col-meta.success {
  color: #15803d;
}

[data-theme="dark"] .preview-col-meta.success {
  color: #4ade80;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .img-comp-dropzone {
    padding: 2.5rem 1.25rem;
  }

  .img-comp-dropzone-heading {
    font-size: 1.25rem;
  }

  .img-comp-file-card,
  .img-comp-result-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-card-actions,
  .result-actions {
    width: 100%;
    margin-top: 0.5rem;
  }

  .btn-card-compare,
  .btn-card-download,
  .btn-res-compare,
  .btn-res-download {
    flex: 1;
    justify-content: center;
  }

  .comp-before-after-card {
    gap: 0.75rem;
    padding: 1rem;
  }

  .comp-stat-val {
    font-size: 1.15rem;
  }

  .comp-results-actions,
  .img-comp-action-bar,
  .img-comp-footer-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-execute-compress,
  .btn-download-comp-all,
  .btn-download-comp-zip,
  .btn-comp-more {
    width: 100%;
    justify-content: center;
  }

  .comp-modal-preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-img-frame {
    height: 220px;
  }
}

/* ==========================================================================
   Content & Technical Educational Guides (Modern Card & Bento Design)
   Replaces crowded plain-text dumps with modern step cards, benefit grids,
   bento containers, and elegant typography.
   ========================================================================== */

.content-section {
  width: 100%;
  max-width: 960px;
  margin: 4.5rem auto 3rem;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.content-section .section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.75rem;
}

.content-section .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.85rem;
}

.content-section .section-title,
.content-section .section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.35rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.content-section .section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 auto;
}

/* Technical Content Typography & Flow */
.technical-content {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Highlight Lead Card */
.technical-content .tool-intro-lead,
.technical-content>p:first-of-type {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--accent-primary) !important;
  border-radius: var(--radius-card);
  padding: 1.5rem 1.75rem !important;
  font-size: 1.05rem !important;
  line-height: 1.75 !important;
  color: var(--text-primary) !important;
  margin-bottom: 2.75rem !important;
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* Section Headings */
.technical-content h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-top: 3.25rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.technical-content h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.15em;
  background: var(--accent-primary);
  border-radius: 4px;
  flex-shrink: 0;
}

.technical-content h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.65rem;
}

.technical-content p {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Step-by-Step Numbered Lists (Transformed into Modern Step Cards) */
.technical-content ol {
  list-style: none !important;
  counter-reset: tech-step-counter;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  padding: 0 !important;
  margin: 1.5rem 0 2.75rem !important;
}

.technical-content ol li {
  counter-increment: tech-step-counter;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.5rem !important;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  line-height: 1.65 !important;
  color: var(--text-secondary) !important;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.technical-content ol li:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.technical-content ol li::before {
  content: "Step " counter(tech-step-counter, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.85rem;
  width: fit-content;
}

.technical-content ol li strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  display: block;
}

/* Benefit & Feature Lists (Transformed into 2-Column Bento Benefit Cards) */
.technical-content ul {
  list-style: none !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  padding: 0 !important;
  margin: 1.5rem 0 2.75rem !important;
}

.technical-content ul li {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.4rem 1.25rem 3.25rem !important;
  box-shadow: var(--shadow-sm);
  position: relative;
  line-height: 1.65 !important;
  color: var(--text-secondary) !important;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.technical-content ul li:hover {
  border-color: var(--border-hover);
}

.technical-content ul li::before {
  content: '✓';
  position: absolute;
  left: 1.25rem;
  top: 1.25rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.technical-content ul li strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

/* Tables inside Technical Content */
.technical-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0 2.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.technical-content th {
  background: var(--bg-secondary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 0.9rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border-card);
}

.technical-content td {
  padding: 0.9rem 1.2rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-card);
}

.technical-content tr:last-child td {
  border-bottom: none;
}

/* Anatomy System (for tools using .anatomy-* classes) */
.anatomy-container {
  max-width: 960px;
  margin: 0 auto;
}

.anatomy-lead-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.anatomy-lead-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.anatomy-lead-content {
  flex: 1;
}

.anatomy-lead-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  margin-bottom: 0.35rem;
}

.anatomy-lead-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

.guide-subheading {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.25rem 0 0.5rem;
}

.anatomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.anatomy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.anatomy-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.anatomy-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.anatomy-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.anatomy-card-icon.icon-blue {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
}

.anatomy-card-icon.icon-green {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.anatomy-card-icon.icon-purple {
  background: rgba(168, 85, 247, 0.12);
  color: #9333ea;
}

.anatomy-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.tag-blue {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
}

.tag-green {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.tag-purple {
  background: rgba(168, 85, 247, 0.12);
  color: #9333ea;
}

.anatomy-card-title {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.anatomy-card-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
  flex: 1;
  margin: 0;
}

.anatomy-card-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.anatomy-footer-value {
  color: var(--accent-primary);
  word-break: break-all;
}

/* Privacy Callout Box */
.tech-privacy-callout {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(43, 130, 254, 0.05) 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  margin: 2.5rem 0;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.tech-privacy-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(34, 197, 94, 0.14);
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tech-privacy-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tech-privacy-content p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Mobile Responsiveness for Content Sections */
@media (max-width: 768px) {
  .content-section {
    margin: 3rem auto 2rem;
    padding: 0 1rem;
  }

  .technical-content ol {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .technical-content ul {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .anatomy-lead-card {
    flex-direction: column;
    padding: 1.25rem;
  }

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

/* ==========================================================================
   PDF Page Extractor — Interactive Thumbnail Grid & Extraction Controls
   ========================================================================== */

/* File Summary Bar */
.extractor-file-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.extractor-file-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.extractor-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(43, 130, 254, 0.1);
  color: var(--accent-primary, #2b82fe);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.extractor-file-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.extractor-file-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.btn-extractor-change {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-extractor-change:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--accent);
}

/* Extraction Controls Card */
.extractor-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.extractor-mode-selector {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.extractor-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  flex: 1;
  min-width: 200px;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.extractor-mode-option:has(input:checked) {
  border-color: var(--accent-primary, #2b82fe);
  background: rgba(43, 130, 254, 0.05);
}

.extractor-mode-option input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent-primary, #2b82fe);
}

.extractor-mode-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.extractor-mode-label strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.extractor-mode-label span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Range Input Row */
.extractor-range-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.extractor-range-field {
  flex: 1;
  min-width: 200px;
}

.extractor-range-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.extractor-range-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.9rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  outline: none;
  transition: border-color var(--transition-fast);
  box-sizing: border-box;
}

.extractor-range-input:focus {
  border-color: var(--accent-primary, #2b82fe);
  box-shadow: 0 0 0 3px rgba(43, 130, 254, 0.12);
}

.extractor-range-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Quick Action Buttons */
.extractor-quick-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: flex-end;
  padding-top: 1.3rem;
}

.btn-range-action {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.79rem;
  font-weight: 600;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
  border-radius: 7px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-range-action:hover {
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  border-color: var(--accent-primary, #2b82fe);
}

/* Interactive Pages Grid */
.extractor-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.extractor-page-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  transition: all var(--transition-fast);
  background: var(--bg-card);
  user-select: none;
}

.extractor-page-card:hover {
  border-color: var(--accent-primary, #2b82fe);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 130, 254, 0.15);
}

.extractor-page-card.selected {
  border-color: var(--accent-primary, #2b82fe);
  background: rgba(43, 130, 254, 0.05);
}

.extractor-card-thumb-wrap {
  position: relative;
  width: 100%;
  min-height: 80px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.extractor-thumb-canvas {
  max-width: 100%;
  max-height: 120px;
  display: block;
}

.extractor-check-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all var(--transition-fast);
}

.extractor-page-card.selected .extractor-check-indicator {
  opacity: 1;
  transform: scale(1);
}

.extractor-card-footer {
  padding: 0.4rem 0.55rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.extractor-page-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.extractor-page-card.selected .extractor-page-num {
  color: var(--accent-primary, #2b82fe);
}

.extractor-footer-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   Images to PDF Converter — Settings Grid & Queue List
   ========================================================================== */

/* Settings row grid */
.img2pdf-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

@media (max-width: 680px) {
  .img2pdf-settings-grid {
    grid-template-columns: 1fr;
  }
}

.img2pdf-setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.img2pdf-setting-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.img2pdf-select,
.img2pdf-input {
  padding: 0.6rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  outline: none;
  transition: border-color var(--transition-fast);
  width: 100%;
  box-sizing: border-box;
}

.img2pdf-select:focus,
.img2pdf-input:focus {
  border-color: var(--accent-primary, #2b82fe);
  box-shadow: 0 0 0 3px rgba(43, 130, 254, 0.1);
}

/* Queue Item Row */
.img2pdf-queue-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.img2pdf-queue-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.img2pdf-queue-item:hover {
  border-color: var(--border-subtle);
  background: var(--bg-secondary);
}

.img2pdf-item-seq {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.img2pdf-thumb-wrap {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.img2pdf-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img2pdf-item-info {
  flex: 1;
  min-width: 0;
}

.img2pdf-item-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.img2pdf-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.img2pdf-item-actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.btn-queue-arrow,
.btn-queue-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-queue-arrow:hover {
  background: var(--bg-secondary);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-queue-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-queue-remove:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   PDF to Image Converter — Progress Bar & Gallery Grid
   ========================================================================== */

/* Progress Bar */
.pdf2img-progress-bar-wrap {
  flex: 1;
  min-width: 120px;
  max-width: 280px;
  height: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  overflow: hidden;
}

.pdf2img-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary, #2b82fe), #5ba0ff);
  border-radius: 100px;
  transition: width 0.25s ease-out;
}

.pdf2img-progress-status {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Gallery Header */
.pdf2img-gallery-header {
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.pdf2img-gallery-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Gallery Grid */
.pdf2img-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.pdf2img-gallery-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.pdf2img-gallery-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pdf2img-card-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf2img-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pdf2img-card-details {
  padding: 0.7rem 0.85rem;
}

.pdf2img-card-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.pdf2img-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.btn-download-single-image {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  border-radius: 7px;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.btn-download-single-image:hover {
  background: var(--accent-primary-hover, #2578ee);
}

/* Mobile Responsiveness for new PDF tools */
@media (max-width: 640px) {
  .extractor-pages-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }

  .extractor-mode-selector {
    flex-direction: column;
  }

  .extractor-range-row {
    flex-direction: column;
  }

  .extractor-quick-actions {
    padding-top: 0;
  }

  .pdf2img-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .img2pdf-settings-grid {
    grid-template-columns: 1fr;
  }

  .extractor-file-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   YouTube Keyword Research Tool
   Modern Creator Analytics & Clean TheToolRoom Aesthetic
   ========================================================================== */

.yt-research-container {
  max-width: 1240px;
  margin: 0 auto 3rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.yt-research-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-card, 16px);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.04));
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.yt-research-search-card {
  padding: 1.75rem 2rem;
  border-top: 3px solid var(--accent-primary, #2b82fe);
}

.yt-search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.yt-search-main-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.yt-search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.yt-title-with-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.yt-hero-logo {
  filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.45));
  transition: transform var(--transition-fast), filter var(--transition-fast);
  display: inline-block;
  vertical-align: middle;
}

.yt-hero-logo:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.75));
}

.yt-eyebrow-logo {
  vertical-align: -1.5px;
  margin-right: 6px;
  display: inline-block;
  filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.4));
}

.yt-search-icon,
.yt-input-logo {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.42));
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.yt-search-input-wrap:focus-within .yt-input-logo {
  transform: translateY(-50%) scale(1.1);
  filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.75));
}

.yt-search-input {
  width: 100%;
  padding: 0.95rem 2.8rem 0.95rem 3.25rem;
  font-family: var(--font-sans, inherit);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary, #111827);
  background: var(--bg-input, #f9fafb);
  border: 1.5px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.yt-search-input:focus {
  background: var(--bg-primary, #ffffff);
  border-color: var(--accent-primary, #2b82fe);
  box-shadow: 0 0 0 4px rgba(43, 130, 254, 0.12);
}

.btn-input-clear {
  position: absolute;
  right: 0.85rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-hover, #f3f4f6);
  color: var(--text-muted, #6b7280);
  font-size: 1.25rem;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-input-clear:hover {
  background: var(--border-hover, #d1d5db);
  color: var(--text-primary, #111827);
}

.btn-research-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.85rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-family: var(--font-heading, inherit);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-btn, 14px);
  cursor: pointer;
  box-shadow: var(--shadow-btn-primary);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-research-submit:hover:not(:disabled) {
  background: var(--accent-primary-hover, #2578ee);
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-1px);
}

.btn-research-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.yt-search-options-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
  border-top: 1px dashed var(--border-card, #e5e7eb);
}

.yt-search-select-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.yt-select-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #4b5563);
}

.yt-select-field {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-family: var(--font-sans, inherit);
  color: var(--text-primary, #111827);
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.yt-select-field:focus {
  border-color: var(--accent-primary, #2b82fe);
}

.yt-search-tools-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.api-status-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill, 999px);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.api-status-badge.status-configured,
.api-status-badge.status-active {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.api-status-badge.status-sample {
  background: rgba(43, 130, 254, 0.12);
  color: #1d4ed8;
}

.api-status-badge.status-empty {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.btn-api-config {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  color: var(--text-secondary, #4b5563);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-api-config:hover {
  background: var(--bg-hover, #f3f4f6);
  color: var(--text-primary, #111827);
  border-color: var(--border-hover, #d1d5db);
}

/* Sample notice banner */
.yt-sample-notice-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md, 12px);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .yt-sample-notice-banner {
  background: rgba(30, 58, 138, 0.25);
  border-color: rgba(96, 165, 250, 0.3);
}

.sample-notice-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.sample-pill-badge {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill, 999px);
  text-transform: uppercase;
}

.sample-notice-text {
  font-size: 0.87rem;
  color: #1e3a8a;
  line-height: 1.4;
}

[data-theme="dark"] .sample-notice-text {
  color: #93c5fd;
}

/* Alert Error */
.yt-research-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md, 12px);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.yt-research-alert.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

[data-theme="dark"] .yt-research-alert.alert-error {
  background: rgba(153, 27, 27, 0.25);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

/* Loading View */
.yt-research-loading-view {
  text-align: center;
  padding: 3.5rem 2rem;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-card, 16px);
}

.yt-loading-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(43, 130, 254, 0.18);
  border-top-color: var(--accent-primary, #2b82fe);
  border-radius: 50%;
  margin: 0 auto 1.25rem auto;
  animation: ytSpin 0.9s linear infinite;
}

@keyframes ytSpin {
  to {
    transform: rotate(360deg);
  }
}

.yt-loading-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin-bottom: 0.4rem;
}

.yt-loading-desc {
  font-size: 0.92rem;
  color: var(--text-muted, #6b7280);
  max-width: 520px;
  margin: 0 auto;
}

/* Overview Banner */
.yt-result-overview-banner {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-card, 16px);
  padding: 1.4rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.overview-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-primary, #2b82fe);
  margin-bottom: 0.25rem;
}

.overview-keyword-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary, #111827);
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
}

.overview-badges-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.overview-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-pill, 999px);
  color: var(--text-secondary, #4b5563);
}

.overview-badge-verified {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  background: #dcfce7;
  color: #166534;
  border-radius: var(--radius-pill, 999px);
}

[data-theme="dark"] .overview-badge-verified {
  background: rgba(22, 101, 52, 0.35);
  color: #86efac;
}

.overview-right-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-overview-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-btn-sm, 10px);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-overview-action:hover {
  background: var(--bg-hover, #f3f4f6);
  border-color: var(--border-hover, #d1d5db);
}

/* Metrics Grid */
/* Metrics Grid — 3x3 Balanced Matrix for 9 Cards */
.yt-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .yt-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .yt-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.yt-metric-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-card, 16px);
  padding: 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.yt-metric-card:hover {
  border-color: var(--border-hover, #cbd5e1);
  box-shadow: var(--shadow-card);
}

.yt-metric-card.featured-metric {
  border-color: #93c5fd;
  background: #f8faff;
}

[data-theme="dark"] .yt-metric-card.featured-metric {
  background: rgba(30, 58, 138, 0.2);
  border-color: rgba(96, 165, 250, 0.3);
}

.yt-metric-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-metric-val {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 800;
  color: var(--text-primary, #111827);
  line-height: 1.25;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.yt-metric-hint {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dual Grid: Competition & Opportunity */
.yt-analysis-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin: 0 0 0.25rem 0;
}

.card-subtitle {
  font-size: 0.83rem;
  color: var(--text-muted, #6b7280);
  margin: 0;
  line-height: 1.4;
}

.btn-card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #4b5563);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-card-action:hover {
  background: var(--bg-hover, #f3f4f6);
  color: var(--text-primary, #111827);
}

/* Competition Indicator styles */
.comp-level-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill, 999px);
  text-transform: uppercase;
  white-space: nowrap;
}

.comp-level-badge.comp-low {
  background: #dcfce7;
  color: #15803d;
}

.comp-level-badge.comp-moderate {
  background: #fef3c7;
  color: #b45309;
}

.comp-level-badge.comp-high {
  background: #fee2e2;
  color: #b91c1c;
}

[data-theme="dark"] .comp-level-badge.comp-low {
  background: rgba(21, 128, 61, 0.35);
  color: #86efac;
}

[data-theme="dark"] .comp-level-badge.comp-moderate {
  background: rgba(180, 83, 9, 0.35);
  color: #fde68a;
}

[data-theme="dark"] .comp-level-badge.comp-high {
  background: rgba(185, 28, 28, 0.35);
  color: #fca5a5;
}

.comp-score-display {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.comp-score-big {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-primary, #111827);
  line-height: 1;
}

.comp-score-denom {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
}

.comp-meter-track {
  width: 100%;
  height: 10px;
  background: var(--bg-hover, #f3f4f6);
  border-radius: var(--radius-pill, 999px);
  overflow: hidden;
  margin-bottom: 1rem;
}

.comp-meter-fill {
  height: 100%;
  border-radius: var(--radius-pill, 999px);
  transition: width 0.4s ease;
}

.comp-meter-fill.comp-low {
  background: #22c55e;
}

.comp-meter-fill.comp-moderate {
  background: #f59e0b;
}

.comp-meter-fill.comp-high {
  background: #ef4444;
}

.comp-explanation-box {
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary, #4b5563);
  margin-bottom: 0.95rem;
}

.comp-legal-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.45;
  border-top: 1px dashed var(--border-card, #e5e7eb);
  padding-top: 0.75rem;
}

/* Search Result Opportunity Tiers */
.opp-tiers-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.opp-tier-row {
  display: grid;
  grid-template-columns: 105px 1fr 75px;
  align-items: center;
  gap: 0.75rem;
}

.opp-tier-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary, #4b5563);
}

.opp-tier-track {
  height: 8px;
  background: var(--bg-hover, #f3f4f6);
  border-radius: var(--radius-pill, 999px);
  overflow: hidden;
}

.opp-tier-fill {
  height: 100%;
  background: var(--accent-primary, #2b82fe);
  border-radius: var(--radius-pill, 999px);
  transition: width 0.3s ease;
}

.opp-tier-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  text-align: right;
}

.opp-stats-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.opp-stat-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-pill, 999px);
  color: var(--text-secondary, #4b5563);
}

.opp-factual-note {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted, #6b7280);
  margin: 0;
}

/* Related Keywords Chips Grid */
.related-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.85rem;
}

.keyword-chip-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-md, 14px);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.keyword-chip-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 6px 18px rgba(43, 130, 254, 0.1);
}

.keyword-chip-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.keyword-chip-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
  line-height: 1.35;
  word-break: break-word;
}

.keyword-chip-freq {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill, 999px);
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.keyword-chip-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-chip-research {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.52rem 0.85rem;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm, 9px);
  color: #1d4ed8;
  font-family: var(--font-sans, inherit);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.05);
  transition: all var(--transition-fast);
}

.btn-chip-research svg {
  color: #2563eb;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.btn-chip-research:hover {
  background: var(--accent-primary, #2b82fe);
  border-color: var(--accent-primary, #2b82fe);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.28);
  transform: translateY(-1px);
}

.btn-chip-research:hover svg {
  color: #ffffff;
  transform: scale(1.12);
}

.btn-chip-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  padding: 0;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-sm, 9px);
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.btn-chip-copy:hover {
  background: var(--bg-hover, #f3f4f6);
  border-color: var(--border-hover, #d1d5db);
  color: var(--text-primary, #111827);
  transform: translateY(-1px);
}

.btn-chip-copy:active,
.btn-chip-research:active {
  transform: translateY(0);
}

/* Tables & Responsive Wrap */
.table-responsive-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.yt-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.yt-data-table thead th {
  background: var(--bg-secondary, #f9fafb);
  color: var(--text-secondary, #4b5563);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.9rem;
  border-bottom: 1.5px solid var(--border-card, #e5e7eb);
  white-space: nowrap;
}

.yt-data-table tbody td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border-card, #e5e7eb);
  color: var(--text-primary, #111827);
  vertical-align: middle;
}

.yt-data-table tbody tr:hover {
  background: var(--bg-hover, #f3f4f6);
}

/* Content Gap specific */
.content-gap-topic {
  display: flex;
  flex-direction: column;
}

.content-gap-topic strong {
  font-size: 0.92rem;
  color: var(--text-primary, #111827);
}

.content-gap-topic small {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
}

.opp-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill, 999px);
  text-transform: uppercase;
  white-space: nowrap;
}

.opp-tag.opp-tag-high {
  background: #dcfce7;
  color: #15803d;
}

.opp-tag.opp-tag-medium {
  background: #eff6ff;
  color: #1d4ed8;
}

.opp-tag.opp-tag-low {
  background: #f3f4f6;
  color: #6b7280;
}

/* Title Analyzer Stats Grid */
.title-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.title-stat-box {
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
}

.title-stat-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.title-stat-val {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary, #111827);
}

.title-patterns-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin: 0 0 0.75rem 0;
}

.title-patterns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.title-pattern-card {
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pattern-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pattern-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
}

.pattern-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill, 999px);
}

.pattern-examples {
  font-size: 0.78rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.4;
}

/* Top Channels Section */
.channel-concentration-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-pill, 999px);
  color: var(--text-secondary, #4b5563);
}

.top-channel-link {
  color: var(--text-primary, #111827);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.top-channel-link:hover {
  color: var(--accent-primary, #2b82fe);
}

/* Filters Toolbar */
.yt-filters-toolbar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  margin-bottom: 1.1rem;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #4b5563);
  white-space: nowrap;
}

.filter-input-num {
  width: 95px;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  color: var(--text-primary, #111827);
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: 6px;
  outline: none;
}

.filter-input-num:focus {
  border-color: var(--accent-primary, #2b82fe);
}

.filter-select {
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  color: var(--text-primary, #111827);
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--accent-primary, #2b82fe);
}

.btn-filter-reset {
  margin-left: auto;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: 6px;
  color: var(--text-secondary, #4b5563);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-filter-reset:hover {
  background: var(--bg-hover, #f3f4f6);
  color: var(--text-primary, #111827);
}

/* Video Results Table */
.video-rank-col {
  font-weight: 700;
  color: var(--text-muted, #6b7280);
  text-align: center;
}

.video-thumb-col {
  padding: 0.5rem 0.75rem !important;
}

.yt-thumb-wrapper {
  position: relative;
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  background: #000000;
  display: block;
}

.yt-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-fast);
}

.yt-thumb-wrapper:hover .yt-video-thumb {
  transform: scale(1.05);
}

.video-duration-pill {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-family: var(--font-mono);
}

.video-title-col {
  max-width: 320px;
}

.video-title-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.video-title-link:hover {
  color: var(--accent-primary, #2b82fe);
}

.video-channel-sub {
  font-size: 0.8rem;
  color: var(--text-secondary, #4b5563);
  margin-top: 0.25rem;
  display: block;
}

.video-num-col {
  font-family: var(--font-mono);
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
}

.video-date-col {
  font-size: 0.78rem;
  color: var(--text-muted, #6b7280);
  white-space: nowrap;
}

/* Modal */
.yt-key-modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.yt-key-modal.is-open {
  display: flex;
}

.yt-modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-card, 16px);
  box-shadow: var(--shadow-elevated, 0 20px 40px rgba(0, 0, 0, 0.15));
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.yt-modal-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-card, #e5e7eb);
}

.yt-modal-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
}

.btn-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-hover, #f3f4f6);
  color: var(--text-muted, #6b7280);
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-modal-close:hover {
  background: var(--border-hover, #d1d5db);
  color: var(--text-primary, #111827);
}

.yt-modal-body {
  padding: 1.35rem 1.5rem;
}

.yt-modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary, #4b5563);
  line-height: 1.5;
  margin: 0 0 1.15rem 0;
}

.yt-modal-steps {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  padding: 0.85rem 1rem;
}

.modal-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.84rem;
  color: var(--text-secondary, #4b5563);
}

.modal-step a {
  color: var(--accent-primary, #2b82fe);
  text-decoration: underline;
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.yt-key-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.yt-key-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
}

.yt-key-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-primary, #111827);
  background: var(--bg-input, #f9fafb);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  outline: none;
}

.yt-key-input:focus {
  border-color: var(--accent-primary, #2b82fe);
  box-shadow: 0 0 0 3px rgba(43, 130, 254, 0.12);
}

.yt-key-hint {
  font-size: 0.74rem;
  color: var(--text-muted, #6b7280);
}

.yt-modal-footer {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-card, #e5e7eb);
  background: var(--bg-secondary, #f9fafb);
}

.btn-modal-secondary {
  padding: 0.55rem 1rem;
  background: transparent;
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #4b5563);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-modal-secondary:hover {
  background: var(--bg-hover, #f3f4f6);
  color: var(--accent-error, #dc2626);
  border-color: #fca5a5;
}

.btn-modal-primary {
  padding: 0.55rem 1.3rem;
  background: var(--accent-primary, #2b82fe);
  border: none;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(43, 130, 254, 0.25);
  transition: all var(--transition-fast);
}

.btn-modal-primary:hover {
  background: var(--accent-primary-hover, #2578ee);
}

/* YouTube Keyword Research - 7-Step Workflow Grid (Spacious, Responsive, Never Squished) */
.yt-workflow-container {
  max-width: 1200px;
  margin: 1.5rem auto 2.5rem auto;
}

.yt-workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.yt-workflow-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e5e7eb);
  border-radius: var(--radius-card, 16px);
  padding: 1.65rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.04));
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.yt-workflow-card:hover {
  transform: translateY(-3px);
  border-color: rgba(43, 130, 254, 0.35);
  box-shadow: 0 10px 25px -4px rgba(43, 130, 254, 0.1);
}

.yt-workflow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background var(--transition-fast);
}

.yt-workflow-card:hover::before {
  background: linear-gradient(90deg, #2b82fe, #60a5fa);
}

.yt-workflow-top {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.yt-workflow-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-primary, #2b82fe);
  background: rgba(43, 130, 254, 0.09);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill, 999px);
  width: fit-content;
}

.yt-workflow-title {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin: 0;
  line-height: 1.35;
}

.yt-workflow-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary, #4b5563);
  margin: 0;
}

/* Video Results Table Expansion Row */
.table-footer-expand-row {
  display: flex;
  justify-content: center;
  padding: 1.25rem 1rem 0.5rem 1rem;
  border-top: 1px dashed var(--border-card, #e5e7eb);
  margin-top: 0.75rem;
}

.btn-table-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-primary, #2b82fe);
  background: rgba(43, 130, 254, 0.08);
  border: 1px solid rgba(43, 130, 254, 0.25);
  border-radius: var(--radius-btn-sm, 10px);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-table-expand:hover {
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(43, 130, 254, 0.25);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .yt-analysis-dual-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .yt-search-main-row {
    flex-direction: column;
  }

  .btn-research-submit {
    width: 100%;
  }

  .yt-search-options-row {
    flex-direction: column;
    align-items: stretch;
  }

  .yt-search-select-group {
    justify-content: space-between;
  }

  .yt-search-tools-right {
    margin-left: 0;
    justify-content: space-between;
  }

  .yt-filters-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-item {
    justify-content: space-between;
  }

  .btn-filter-reset {
    margin-left: 0;
    width: 100%;
  }
}

/* ==========================================================================
   Ad Blocker Detection Modal Overlay
   ========================================================================== */

.adblock-locked {
  overflow: hidden !important;
  height: 100vh !important;
}

.adblock-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.adblock-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.adblock-modal-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-card, #e2e8f0);
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
  max-width: 540px;
  width: 100%;
  padding: 2.25rem 2rem;
  text-align: center;
  animation: adblockCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes adblockCardIn {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(14px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.adblock-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem auto;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.25);
  animation: adblockPulse 2.5s infinite;
}

@keyframes adblockPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.45);
  }
}

.adblock-modal-title {
  font-family: var(--font-heading, inherit);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.02em;
}

.adblock-modal-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary, #475569);
  margin: 0 0 1.5rem 0;
}

.adblock-steps-box {
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border-card, #e2e8f0);
  border-radius: var(--radius-md, 14px);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.75rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.adblock-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-primary, #1e293b);
}

.adblock-step-badge {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.adblock-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-adblock-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-family: var(--font-heading, inherit);
  font-size: 1.02rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-btn, 12px);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.35);
  transition: all var(--transition-fast, 0.15s ease);
}

.btn-adblock-primary:hover {
  background: var(--accent-primary-hover, #1d4ed8);
  box-shadow: 0 6px 20px rgba(43, 130, 254, 0.5);
  transform: translateY(-1px);
}

.btn-adblock-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.65rem 1rem;
  background: transparent;
  color: var(--text-secondary, #64748b);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast, 0.15s ease);
}

.btn-adblock-secondary:hover {
  color: var(--text-primary, #0f172a);
}

.adblock-footer-note {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 0.85rem;
}

[data-theme="dark"] .adblock-modal-card,
body.dark-mode .adblock-modal-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .adblock-steps-box,
body.dark-mode .adblock-steps-box {
  background: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .adblock-step-item,
body.dark-mode .adblock-step-item {
  color: #e2e8f0;
}

/* 4-Column Tools Grid & Expanded Layout */
.section-wrap {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 1.5rem 4.5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1200px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
  }
}

@media (max-width: 860px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

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

.tool-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 18px;
  padding: 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s, border-color 0.22s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.03);
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -4px rgba(37, 99, 235, 0.12);
  border-color: var(--accent-primary);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--tc-accent, var(--accent-primary));
  border-radius: 3px 3px 0 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tc-bg, var(--accent-primary-subtle));
  color: var(--tc-accent, var(--accent-primary));
  flex-shrink: 0;
  transition: transform 0.2s;
}

.tool-card:hover .tool-icon-wrap {
  transform: scale(1.08);
}

.tool-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.tool-desc {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ==========================================================================
   JSON Formatter & Validator - Component Styling
   ========================================================================== */
.json-workspace-container {
  max-width: 1150px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
}

.json-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.03);
}

.json-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.json-toolbar-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.json-select {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-card);
  background: var(--bg-hover);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.json-select:focus {
  border-color: var(--accent-primary);
}

.json-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.json-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.json-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .json-editor-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.json-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s;
}

.json-panel:focus-within {
  border-color: var(--accent-primary);
}

.json-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.65rem;
}

.json-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.json-panel-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
}

.json-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.btn-json-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-json-tool:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-json-tool.active {
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  border-color: rgba(37, 99, 235, 0.3);
}

.btn-json-tool.btn-copied {
  background: rgba(34, 197, 94, 0.12);
  color: #16A34A;
  border-color: rgba(34, 197, 94, 0.3);
}

.json-textarea {
  width: 100%;
  min-height: 420px;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-primary);
  background: transparent;
  border: none;
  resize: vertical;
  outline: none;
  tab-size: 2;
  box-sizing: border-box;
}

.json-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.json-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.json-primary-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-json-primary {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-pill);
  background: var(--accent-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
}

.btn-json-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.btn-json-secondary {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-json-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.json-shortcuts-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Output Area */
.json-output-area {
  position: relative;
  min-height: 420px;
  max-height: 580px;
  overflow: auto;
  box-sizing: border-box;
}

.json-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 420px;
  padding: 2rem;
  color: var(--text-muted);
}

.json-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.json-empty-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.json-empty-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.45;
}

.json-code-pre {
  margin: 0;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}

/* Syntax Highlighting */
.json-key {
  color: #2563EB;
  font-weight: 600;
}

.json-string {
  color: #059669;
}

.json-number {
  color: #7C3AED;
}

.json-boolean {
  color: #D97706;
  font-weight: 600;
}

.json-null {
  color: #64748B;
  font-weight: 600;
}

.json-bracket,
.json-comma {
  color: #475569;
}

[data-theme="dark"] .json-key {
  color: #60A5FA;
}

[data-theme="dark"] .json-string {
  color: #34D399;
}

[data-theme="dark"] .json-number {
  color: #A78BFA;
}

[data-theme="dark"] .json-boolean {
  color: #FBBF24;
}

[data-theme="dark"] .json-null {
  color: #9CA3AF;
}

[data-theme="dark"] .json-bracket,
[data-theme="dark"] .json-comma {
  color: #94A3B8;
}

/* Tree View */
.json-tree-container {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
}

.json-tree-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
}

.json-tree-node {
  margin: 2px 0;
}

.json-tree-toggle {
  display: inline-block;
  width: 14px;
  cursor: pointer;
  user-select: none;
  font-size: 9px;
  color: var(--text-muted);
  vertical-align: 1px;
}

.json-tree-toggle:hover {
  color: var(--accent-primary);
}

.json-tree-children {
  padding-left: 1.2rem;
  border-left: 1px dashed rgba(0, 0, 0, 0.12);
  margin-left: 6px;
}

[data-theme="dark"] .json-tree-children {
  border-left-color: rgba(255, 255, 255, 0.14);
}

.json-tree-row {
  margin: 1px 0;
}

.json-tree-index {
  color: var(--text-muted);
  font-size: 0.8rem;
  user-select: none;
}

.json-item-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 4px;
}

/* Search Box */
.json-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.15rem 0.5rem;
}

.json-search-input {
  border: none;
  background: transparent;
  font-size: 0.8rem;
  color: var(--text-primary);
  outline: none;
  width: 110px;
}

.json-search-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-search-nav {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.btn-search-nav:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

mark.json-search-match {
  background: #FEF08A;
  color: #854D0E;
  border-radius: 2px;
  padding: 0 1px;
}

mark.json-search-current {
  background: #F97316;
  color: #FFFFFF;
  font-weight: 700;
}

/* Status Alert */
.json-status-alert {
  display: none;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.json-status-alert.status-success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #15803D;
}

.json-status-alert.status-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #B91C1C;
}

.json-status-alert.status-info {
  background: var(--accent-primary-subtle);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--accent-primary);
}

/* Error Details Box */
.json-error-box {
  display: none;
  background: rgba(220, 38, 38, 0.04);
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.json-error-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.json-error-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: #DC2626;
}

.json-error-loc-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(220, 38, 38, 0.12);
  color: #B91C1C;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.json-error-msg {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.json-error-snippet {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.05);
  border-left: 3px solid #DC2626;
  padding: 0.5rem 0.75rem;
  border-radius: 0 6px 6px 0;
  color: #991B1B;
  overflow-x: auto;
}

/* Stats Bar */
.json-stats-bar {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.03);
  margin-bottom: 2rem;
}

.json-stats-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .json-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 550px) {
  .json-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.json-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.65rem 0.5rem;
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.json-stat-val {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.json-stat-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

.json-minify-bar {
  display: none;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: #15803D;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

/* Local Privacy Statement Callout */
.json-privacy-callout {
  max-width: 1150px;
  margin: 0 auto 3rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.03);
}

.json-privacy-callout h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.json-privacy-callout p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* =========================================================================
   Guide Article Layout & Non-Interactive Studio Mockup
   ========================================================================= */

.guide-article-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.guide-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.guide-h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.22;
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
}

.guide-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Studio Mockup Wrapper */
.studio-mockup-wrapper {
  margin: 0 auto 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.studio-mockup-wrapper:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 14px 38px -8px rgba(37, 99, 235, 0.12);
}

[data-theme="dark"] .studio-mockup-wrapper {
  box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .studio-mockup-wrapper:hover {
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 14px 40px -8px rgba(0, 0, 0, 0.65);
}

.studio-mockup-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.95rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.mockup-header-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.mockup-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: #2563EB;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .mockup-badge {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.35);
  color: #60A5FA;
}

.mockup-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563EB;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  animation: mockupDotPulse 2s infinite;
}

[data-theme="dark"] .mockup-pulse-dot {
  background: #60A5FA;
  box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.7);
}

@keyframes mockupDotPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.mockup-subtitle {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.btn-try-live-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFFFFF !important;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-try-live-tool:hover {
  background: linear-gradient(135deg, #1D4ED8, #1E40AF);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.4);
}

/* Mockup Canvas */
.studio-mockup-canvas {
  padding: 2rem 2.25rem;
  user-select: none;
  opacity: 0.96;
}

@media (max-width: 640px) {
  .studio-mockup-canvas {
    padding: 1.25rem 1rem;
  }
}

.mockup-mode-tabs {
  display: inline-flex;
  background: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  gap: 0.25rem;
  pointer-events: none;
}

.mockup-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 9px;
  cursor: default;
}

.mockup-tab-active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.mockup-dropzone {
  border: 2px dashed rgba(37, 99, 235, 0.35);
  border-radius: 16px;
  padding: 2.75rem 1.5rem;
  text-align: center;
  background: rgba(37, 99, 235, 0.02);
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.studio-mockup-wrapper:hover .mockup-dropzone {
  border-color: rgba(37, 99, 235, 0.6);
  background: rgba(37, 99, 235, 0.04);
}

[data-theme="dark"] .mockup-dropzone {
  background: rgba(59, 130, 246, 0.03);
  border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .studio-mockup-wrapper:hover .mockup-dropzone {
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(59, 130, 246, 0.06);
}

.mockup-btn-main {
  cursor: pointer !important;
}

.mockup-btn-trigger {
  cursor: pointer !important;
}

.mockup-select-wrap {
  pointer-events: none;
}

.mockup-select {
  cursor: default !important;
}

.mockup-start-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mockup-start-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Bottom Ribbon */
.studio-mockup-bottom-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 0.85rem 1.5rem;
  background: rgba(37, 99, 235, 0.04);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.86rem;
}

[data-theme="dark"] .studio-mockup-bottom-ribbon {
  background: rgba(59, 130, 246, 0.06);
}

.ribbon-text {
  color: var(--text-secondary);
}

.ribbon-text strong {
  color: var(--text-primary);
}

.ribbon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #2563EB;
  text-decoration: none;
}

[data-theme="dark"] .ribbon-link {
  color: #60A5FA;
}

.ribbon-link:hover {
  text-decoration: underline;
}

/* Guide Body Typography */
.guide-body {
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.guide-body h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.015em;
}

.guide-body h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.75rem 0 0.75rem;
}

.guide-body p {
  margin-bottom: 1.25rem;
}

.guide-body ul,
.guide-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.guide-body li {
  margin-bottom: 0.5rem;
}

.guide-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-secondary);
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
}

/* =============================================================================
   PNG to JPG & HEIC to JPG Dedicated Workspace Styles
   ============================================================================= */
.png-jpg-settings-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.settings-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.settings-label {
  display: flex;
  flex-direction: column;
}

.settings-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.settings-val-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #2563EB;
  background: rgba(37, 99, 235, 0.1);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
}

.color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.color-picker-input {
  width: 38px;
  height: 38px;
  border: 2px solid var(--border-card);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  background: transparent;
}

.color-picker-hex {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.quality-range-slider {
  width: 140px;
  accent-color: #2563EB;
  cursor: pointer;
}

.heic-quality-select {
  padding: 0.55rem 0.95rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  outline: none;
  cursor: pointer;
}

.file-meta-pill.png-pill {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  font-weight: 700;
}

.file-meta-pill.heic-pill {
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
  font-weight: 700;
}

.heic-preview-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  color: #8B5CF6;
  border-radius: 8px;
}

/* =============================================================================
   Online Voice Recorder Dedicated Workspace Styles
   ============================================================================= */
.voice-recorder-container {
  max-width: 820px;
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
}

.voice-recorder-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563EB;
}

[data-theme="dark"] .voice-recorder-privacy-pill {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: #60A5FA;
}

.voice-record-error-alert {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  color: #DC2626;
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.voice-studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 2.25rem 2rem;
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.voice-studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.voice-status-badge {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.voice-status-badge.idle {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.voice-status-badge.recording {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
  animation: pulse-red 1.5s infinite;
}

.voice-status-badge.paused {
  background: rgba(245, 158, 11, 0.12);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.voice-status-badge.finished {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

@keyframes pulse-red {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

.voice-timer-display {
  font-family: var(--font-mono);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

.voice-visualizer-wrap {
  width: 100%;
  height: 140px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.voice-waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.voice-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-voice-record {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.95rem 2rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.btn-voice-record.start {
  background: #2563EB;
  color: #FFFFFF;
}

.btn-voice-record.start:hover {
  background: #1D4ED8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-voice-record.pause {
  background: #F59E0B;
  color: #FFFFFF;
}

.btn-voice-record.pause:hover {
  background: #D97706;
}

.btn-voice-record.resume {
  background: #2563EB;
  color: #FFFFFF;
}

.btn-voice-record.resume:hover {
  background: #1D4ED8;
}

.btn-voice-record.stop {
  background: #DC2626;
  color: #FFFFFF;
}

.btn-voice-record.stop:hover {
  background: #B91C1C;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
}

.btn-voice-record.reset {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}

.btn-voice-record.reset:hover {
  background: var(--bg-hover);
}

.voice-player-section {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

.voice-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.voice-player-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.voice-player-stats {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.voice-audio-element {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  outline: none;
  margin-bottom: 1.25rem;
}

.voice-export-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn-voice-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-voice-download.wav {
  background: #10B981;
  color: #FFFFFF;
}

.btn-voice-download.wav:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-voice-download.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-card);
}

.btn-voice-download.secondary:hover {
  background: var(--bg-hover);
}

.btn-voice-transcribe {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.75rem 1.45rem;
  border-radius: var(--radius-md);
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s ease;
}

.btn-voice-transcribe:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* =============================================================================
   Rotate PDF Dedicated Workspace Styles
   ============================================================================= */
.rotate-pdf-container {
  max-width: 1040px;
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
}

.rotate-pdf-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563EB;
}

[data-theme="dark"] .rotate-pdf-privacy-pill {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: #60A5FA;
}

.rotate-pdf-error-alert {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  color: #DC2626;
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.rotate-pdf-dropzone {
  border: 2px dashed rgba(37, 99, 235, 0.3);
  background: var(--bg-card);
  border-radius: 20px;
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.03);
}

.rotate-pdf-dropzone:hover,
.rotate-pdf-dropzone.dragover {
  border-color: #2563EB;
  background: rgba(37, 99, 235, 0.03);
  transform: translateY(-2px);
}

.rotate-pdf-dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rotate-pdf-dropzone-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.rotate-pdf-dropzone-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.btn-rotate-browse {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-pill);
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-rotate-browse:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
}

.rotate-pdf-dropzone-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

.rotate-pdf-workspace-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.04);
}

.rotate-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
}

.rotate-doc-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.doc-meta-pill {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.doc-meta-pill.primary {
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
  border-color: rgba(37, 99, 235, 0.2);
  font-weight: 700;
}

.btn-change-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-btn-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.btn-change-pdf:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.rotate-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.rotate-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-toolbar-rot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-btn-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toolbar-rot:hover {
  border-color: #2563EB;
  color: #2563EB;
  transform: translateY(-1px);
}

.btn-toolbar-rot.secondary {
  color: var(--text-secondary);
}

.btn-toolbar-rot.danger {
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.2);
}

.btn-toolbar-rot.danger:hover {
  background: rgba(220, 38, 38, 0.08);
}

.rotate-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.rotate-page-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
  position: relative;
}

.rotate-page-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.rotate-thumb-container {
  width: 140px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.rotate-page-canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.rotate-overlay-actions {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rotate-page-card:hover .rotate-overlay-actions {
  opacity: 1;
}

.btn-page-rot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #1E293B;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}

.btn-page-rot:hover {
  transform: scale(1.1);
  color: #2563EB;
}

.rotate-card-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rotate-page-num {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
}

.rotate-angle-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.rotate-angle-badge.active {
  background: rgba(37, 99, 235, 0.12);
  color: #2563EB;
  border-color: rgba(37, 99, 235, 0.3);
}

.rotate-action-bar {
  display: flex;
  justify-content: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-apply-rotate {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.95rem 2.25rem;
  border-radius: var(--radius-pill);
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.btn-apply-rotate:hover {
  background: #1D4ED8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.rotate-results-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.04);
}

.results-check-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 auto;
}

.rotate-results-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}


/* ==========================================================================
   Google AdSense Zero-Empty-Slot & Auto Ads Optimization System
   ========================================================================== */

/* Universal Ad Slot Wrapper:
   Default State: Completely collapsed with 0 height, 0 margins, 0 padding, 0 borders, 0 background.
   Guarantees zero blank rectangles, zero gray boxes, and zero empty gaps when no ad is loaded. */
.ad-slot-wrapper {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  min-height: 0;
  height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  clear: both;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  transition: opacity 0.35s ease, margin 0.35s ease;
}

/* Subtle disclosure label (AdSense compliant):
   Hidden by default when slot is empty. Appears ONLY when ad is actively filled. */
.ad-slot-label {
  display: none !important;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 0.4rem;
  user-select: none;
  pointer-events: none;
}

[data-theme="dark"] .ad-slot-label {
  color: #64748b;
}

/* Ad Box Container:
   Zero minimum height, transparent, borderless, zero whitespace. */
.ad-slot-container {
  width: 100%;
  max-width: 100%;
  min-height: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md, 12px);
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  box-sizing: border-box;
  overflow: hidden;
}

/* Active Loading State:
   Allows AdSense to calculate container width and initialize creative without
   displaying premature blank rectangles, gray boxes, borders, or whitespace gaps. */
.ad-slot-wrapper.ad-loading {
  display: block;
  width: 100%;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Filled & Rendered Ad States:
   Activates strictly when ad is confirmed filled by AdSense or ad-manager.js
   ========================================================================== */

.ad-slot-wrapper.ad-filled,
.ad-slot-wrapper:has(ins.adsbygoogle[data-ad-status="filled"]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
}

.ad-slot-wrapper.ad-filled .ad-slot-label,
.ad-slot-wrapper:has(ins.adsbygoogle[data-ad-status="filled"]) .ad-slot-label {
  display: block !important;
}

/* Responsive Slot Placements & Natural Margins (ONLY applied when ad is filled) */
.ad-slot-wrapper.ad-slot-top-banner.ad-filled,
.ad-slot-wrapper.ad-slot-top-banner:has(ins.adsbygoogle[data-ad-status="filled"]) {
  max-width: 970px;
  margin: 1.25rem auto 1.75rem;
  padding: 0 1rem;
}

.ad-slot-wrapper.ad-slot-content.ad-filled,
.ad-slot-wrapper.ad-slot-content:has(ins.adsbygoogle[data-ad-status="filled"]) {
  max-width: 860px;
  margin: 2.75rem auto;
  padding: 0 1.25rem;
}

.ad-slot-wrapper.ad-slot-bottom.ad-filled,
.ad-slot-wrapper.ad-slot-bottom:has(ins.adsbygoogle[data-ad-status="filled"]) {
  max-width: 970px;
  margin: 3rem auto 1.5rem;
  padding: 0 1rem;
}

.ad-slot-wrapper.ad-slot-sidebar.ad-filled,
.ad-slot-wrapper.ad-slot-sidebar:has(ins.adsbygoogle[data-ad-status="filled"]) {
  width: 300px;
  max-width: 300px;
  margin: 0 0 2rem 0;
  position: sticky;
  top: 90px;
  z-index: 10;
}

.ad-slot-wrapper.ad-slot-mobile.ad-filled,
.ad-slot-wrapper.ad-slot-mobile:has(ins.adsbygoogle[data-ad-status="filled"]) {
  max-width: 336px;
  margin: 1.25rem auto;
  padding: 0 0.5rem;
}

/* Hide desktop sidebar ad on tablets and mobile screens to prevent squishing tools */
@media (max-width: 1199px) {
  .ad-slot-wrapper.ad-slot-sidebar {
    display: none !important;
  }
}

/* Unfilled Ad State Handling (Strict, Instant Total Collapse) */
ins.adsbygoogle[data-ad-status="unfilled"],
.ad-slot-wrapper:has(ins.adsbygoogle[data-ad-status="unfilled"]),
.ad-slot-wrapper.ad-unfilled {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

/* Mobile Responsiveness: Clean spacing without overflow or horizontal scroll */
@media (max-width: 768px) {

  .ad-slot-wrapper.ad-filled,
  .ad-slot-wrapper:has(ins.adsbygoogle[data-ad-status="filled"]) {
    margin: 1.25rem auto;
    padding: 0 0.75rem;
  }

  .ad-slot-wrapper.ad-slot-top-banner.ad-filled,
  .ad-slot-wrapper.ad-slot-top-banner:has(ins.adsbygoogle[data-ad-status="filled"]) {
    margin: 0.75rem auto 1rem;
  }

  .ad-slot-wrapper.ad-slot-content.ad-filled,
  .ad-slot-wrapper.ad-slot-content:has(ins.adsbygoogle[data-ad-status="filled"]) {
    margin: 1.75rem auto;
  }

  .ad-slot-wrapper.ad-slot-bottom.ad-filled,
  .ad-slot-wrapper.ad-slot-bottom:has(ins.adsbygoogle[data-ad-status="filled"]) {
    margin: 1.75rem auto 1rem;
  }

  .ad-slot-wrapper.ad-slot-mobile.ad-filled,
  .ad-slot-wrapper.ad-slot-mobile:has(ins.adsbygoogle[data-ad-status="filled"]) {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }
}

/* ==========================================================================
   Comprehensive Mobile UI/UX & Responsive Optimization System
   Designed for all mobile screen sizes (320px - 768px, iPhones, Android phones, tablets)
   ========================================================================== */

/* Keyframe for sleek mobile menu slide-down */
@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 1. Global Touch-Friendly Controls & Mobile Typography */
@media (max-width: 768px) {

  /* Prevent iOS Safari automatic page zoom on input focus */
  input[type="text"],
  input[type="number"],
  input[type="search"],
  input[type="url"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Universal Touch Target Minimum (WCAG 2.5.5 - 44px min height) */
  .theme-toggle-btn,
  .mobile-menu-toggle,
  .user-avatar-btn,
  .btn-merger-browse,
  .btn-merger-primary,
  .btn-resizer-browse,
  .btn-resize-primary,
  .btn-download-single,
  .btn-download-all-main,
  .btn-download-all,
  .btn-start-transcribe,
  .btn-process-action,
  .btn-reset-action,
  .btn-action-primary,
  .btn-action-secondary,
  .btn-export-main,
  .btn-hero-primary,
  .btn-hero-secondary,
  .btn-demo-login,
  .resize-mode-tab,
  .dim-preset-btn,
  .ratio-preset-btn,
  .aspect-preset-btn,
  .stage-toolbar button,
  .faq-trigger {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* Accessible crop handles on mobile: enlarged invisible touch hit-box */
  .crop-handle {
    width: 14px !important;
    height: 14px !important;
  }

  .crop-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    pointer-events: auto;
  }

  /* Mobile Navbar Navigation Overlay */
  .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .navbar-inner {
    padding: 0.65rem 1rem;
    gap: 0.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-card);
    padding: 1rem 1.25rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
    z-index: 999;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  [data-theme="dark"] .nav-links {
    background: #0f172a;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  }

  .nav-links.mobile-open {
    display: flex;
    animation: navSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
  }

  .mobile-menu-toggle:active {
    transform: scale(0.95);
    background: var(--bg-hover);
  }

  .nav-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.15rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
  }

  .nav-link:hover,
  .nav-link:active {
    background: var(--accent-primary-subtle);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
  }

  /* Compact Theme Toggle Button on Mobile */
  .theme-toggle-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 10px;
  }

  /* Google Sign-in on Mobile */
  .google-signin-btn {
    height: 42px;
    padding: 0 0.85rem;
    border-radius: 10px;
  }

  .google-signin-text {
    display: none;
  }

  /* 2. Hero Visual Showcase on Mobile: Prevent Overflow & Scale Gracefully */
  .hero-visual-showcase {
    overflow: hidden;
    max-width: 100%;
    padding: 1rem 0;
  }

  .visual-composition {
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    align-items: center;
    transform: none !important;
  }

  .visual-main-card {
    width: 100% !important;
    max-width: 330px !important;
    height: auto !important;
    aspect-ratio: 16 / 10;
    box-sizing: border-box;
  }

  .visual-arrow-wrap {
    transform: rotate(90deg);
    width: 32px;
    height: 32px;
  }

  .visual-stack-column {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
  }

  .visual-quality-pill {
    right: 8px;
    bottom: -8px;
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
  }

  /* 3. Dropzones & Upload Areas: Mobile Ergonomics */
  .dropzone,
  .merger-dropzone,
  .resizer-dropzone,
  .cropper-dropzone {
    padding: 1.75rem 1rem !important;
    border-radius: 14px !important;
  }

  .dropzone-heading,
  .merger-dropzone-heading,
  .resizer-dropzone-heading {
    font-size: 1.25rem !important;
  }

  .dropzone-sub,
  .merger-dropzone-sub,
  .resizer-dropzone-sub {
    font-size: 0.88rem !important;
    margin-bottom: 1.15rem !important;
  }

  .dropzone-icon,
  .merger-dropzone-icon,
  .resizer-dropzone-icon {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 0.85rem !important;
  }

  /* 4. Tool Workspace Cards & Grids on Mobile */
  .workspace-container,
  .resizer-container,
  .pdf-merger-container,
  .yt-tester-container,
  .url-cleaner-container {
    padding: 0 0.85rem;
  }

  .workspace-card,
  .resizer-workspace-card,
  .merger-workspace-card,
  .resizer-results-card,
  .studio-workspace-card,
  .yt-input-card {
    padding: 1.25rem 1rem !important;
    border-radius: 14px !important;
  }

  /* Mode selection tabs on mobile (2x2 grid for easy thumb reach) */
  .resizer-mode-tabs,
  .mode-tabs-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.35rem !important;
    width: 100% !important;
  }

  .resize-mode-tab {
    min-width: 0 !important;
    padding: 0.65rem 0.5rem !important;
    font-size: 0.82rem !important;
    text-align: center !important;
  }

  /* Dimension inputs on mobile */
  .resizer-inputs-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .aspect-lock-indicator {
    align-self: center !important;
    margin: 0.25rem 0 !important;
    font-size: 1.25rem !important;
    padding: 0.4rem 0.85rem !important;
    background: var(--bg-secondary) !important;
    border-radius: 8px !important;
  }

  /* Dimension presets grid on mobile */
  .dim-presets-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.45rem !important;
    width: 100% !important;
  }

  .dim-preset-btn {
    text-align: center !important;
    padding: 0.55rem 0.45rem !important;
    font-size: 0.78rem !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  /* Action buttons: Stack full width on mobile for accessible tapping */
  .resizer-actions-bar,
  .merger-actions-bar,
  .resizer-results-actions,
  .studio-toolbar-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 0.65rem !important;
  }

  .resizer-actions-bar>button,
  .merger-actions-bar>button,
  .resizer-results-actions>button,
  .studio-toolbar-actions>button,
  .btn-resize-primary,
  .btn-merger-primary,
  .btn-download-all-main {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Image Cropper Stage & Toolbar on Mobile */
  .cropper-stage-wrapper {
    margin-top: 1rem !important;
  }

  .stage-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .stage-toolbar button {
    font-size: 0.8rem !important;
    padding: 0.55rem 0.4rem !important;
    text-align: center !important;
  }

  #cropStage {
    min-height: 280px !important;
    max-height: 380px !important;
  }

  /* Result cards on mobile */
  .resizer-result-card,
  .merger-result-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 1rem !important;
    gap: 0.85rem !important;
  }

  .resizer-result-card .result-thumb-wrap {
    width: 100% !important;
    height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .resizer-result-card .result-details {
    width: 100% !important;
  }

  .resizer-result-card .result-actions {
    width: 100% !important;
    margin-top: 0.25rem !important;
  }

  .resizer-result-card .btn-download-single {
    width: 100% !important;
    justify-content: center !important;
  }

  /* 5. Mobile Data Tables & Code Snippets */
  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  pre,
  code {
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  /* 6. FAQ Accordion Mobile Touch Ergonomics */
  .faq-trigger {
    padding: 1.15rem 1rem !important;
    font-size: 0.98rem !important;
  }

  .faq-answer {
    padding: 0 1rem 1.15rem !important;
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
  }

  /* 7. Footer on Mobile */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.85rem !important;
  }

  .footer-legal-links {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.85rem !important;
  }
}

/* 8. Super-Compact Mobile (iPhone SE, Small Android <= 380px) */
@media (max-width: 380px) {
  .brand-name {
    font-size: 1.1rem !important;
  }

  .brand-icon,
  .brand-icon svg,
  .brand-icon img {
    width: 26px !important;
    height: 26px !important;
  }

  .navbar-inner {
    padding: 0.5rem 0.65rem !important;
  }

  .theme-toggle-btn,
  .mobile-menu-toggle {
    width: 38px !important;
    height: 38px !important;
  }

  .dim-presets-grid {
    grid-template-columns: 1fr !important;
  }

  .stage-toolbar {
    grid-template-columns: 1fr !important;
  }

  .hero-title {
    font-size: 1.65rem !important;
  }
}

/* ==========================================================================
   THE TOOL ROOM — GUIDES LIBRARY EDITORIAL STYLES
   ========================================================================== */

.guides-library-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* 1. Hero Section */
.guides-hero {
  padding: 3.5rem 1rem 2.5rem;
  text-align: center;
}

.guides-hero-inner {
  max-width: 780px;
  margin: 0 auto;
}

.guides-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 1.25rem;
}

.guides-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 1.15rem;
  letter-spacing: -0.02em;
}

.guides-hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 auto;
  max-width: 660px;
}

/* 2. Search Section */
.guides-search-section {
  margin: 0 auto 2.25rem;
  max-width: 780px;
}

.guides-search-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guides-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.guides-search-box:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.guides-search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
}

.guides-search-input {
  width: 100%;
  padding: 1.05rem 3rem 1.05rem 3.25rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
}

.guides-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.guides-search-clear {
  position: absolute;
  right: 1.1rem;
  width: 26px;
  height: 26px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--border-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.guides-search-clear:hover {
  background: var(--accent-error);
  color: #FFFFFF;
}

.guides-suggest-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.guides-suggest-label {
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 0.25rem;
}

.guide-suggest-pill {
  border: 1px solid var(--border-card);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.guide-suggest-pill:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
}

/* 3. Category Navigation */
.guides-category-section {
  margin: 0 auto 3rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.guides-category-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 0.75rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.guides-category-scroll::-webkit-scrollbar {
  display: none;
}

.guide-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-card);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.guide-cat-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.guide-cat-pill.active {
  background: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
}

[data-theme="dark"] .guide-cat-pill.active {
  background: #FFFFFF;
  color: #111827;
  border-color: #FFFFFF;
}

.guide-cat-count {
  display: inline-block;
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.guide-cat-pill.active .guide-cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

[data-theme="dark"] .guide-cat-pill.active .guide-cat-count {
  background: rgba(0, 0, 0, 0.15);
  color: #111827;
}

/* 4. Featured Guides Section */
.guides-featured-section {
  margin-bottom: 4rem;
}

.guides-section-header {
  margin-bottom: 1.75rem;
}

.guides-section-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.35rem;
}

.guides-section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.guides-section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0.35rem 0 0;
}

.guides-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.guide-featured-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.guide-featured-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.07);
}

.guide-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 0.85rem;
}

.guide-featured-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.guide-featured-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}

.guide-featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.guide-featured-action {
  font-weight: 700;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 5. All Guides Library Section */
.guides-library-section {
  margin-bottom: 4.5rem;
}

.guides-library-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.guides-library-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.guides-count-display {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.guide-sort-select {
  padding: 0.45rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.guide-sort-select:focus {
  border-color: var(--accent-primary);
}

/* 6. Guide Cards Grid */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.guide-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.guide-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.06);
}

.guide-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.guide-card-category {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  padding: 2px 8px;
  border-radius: 4px;
}

.guide-card-readtime {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.guide-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0 0 0.6rem;
}

.guide-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 1rem;
  flex-grow: 1;
}

/* Tool Integration Link inside Card */
.guide-card-tool-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.65rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.guide-tool-label {
  color: var(--text-muted);
  font-weight: 500;
}

.guide-tool-link {
  color: var(--accent-primary);
  font-weight: 700;
}

.guide-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.guide-card-action {
  font-weight: 700;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Empty State */
.guides-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.guides-empty-icon {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
}

.guides-empty-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.guides-empty-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

/* Load More Button Wrapper */
.guides-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* 7. Category Showcase Blocks */
.guides-showcase-section {
  margin-bottom: 4rem;
}

.guides-showcase-block {
  margin-bottom: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.guides-showcase-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.guides-showcase-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.guides-showcase-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0;
}

.guides-showcase-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.guides-showcase-link:hover {
  text-decoration: underline;
}

/* 8. Tool Callout Section */
.guides-tool-callout-section {
  margin: 4rem auto 1rem;
}

.guides-tool-callout-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.guides-callout-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.guides-callout-content {
  flex: 1;
  min-width: 280px;
}

.guides-callout-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.4rem;
}

.guides-callout-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.guides-callout-action {
  white-space: nowrap;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .guides-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .guides-library-wrapper {
    padding: 0 1rem 3.5rem;
  }

  .guides-hero {
    padding: 2.5rem 0.5rem 1.75rem;
  }

  .guides-hero-title {
    font-size: 1.85rem;
  }

  .guides-hero-subtitle {
    font-size: 0.95rem;
  }

  .guides-search-input {
    font-size: 0.98rem;
    padding: 0.9rem 2.8rem 0.9rem 2.8rem;
  }

  .guides-search-icon {
    left: 1rem;
  }

  .guides-featured-grid {
    grid-template-columns: 1fr;
  }

  .guide-featured-card {
    padding: 1.5rem;
  }

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

  .guides-library-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .guides-library-controls {
    width: 100%;
    justify-content: space-between;
  }

  .guides-tool-callout-card {
    padding: 1.75rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .guides-callout-action {
    width: 100%;
  }

  .guides-callout-action .btn-hero-primary {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================================================
   Base64 Encoder & Decoder Dedicated Workspace Styles
   ============================================================================= */
.b64-workspace-container {
  max-width: 1150px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
}

.b64-alert {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md, 10px);
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
}

.b64-alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.b64-alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.b64-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-sm);
}

.b64-mode-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border-subtle);
}

.b64-mode-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm, 6px);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.b64-mode-btn.active {
  background: var(--accent-primary, #2563EB);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.b64-options-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.b64-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.b64-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-b64-tool {
  padding: 0.45rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-b64-tool:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.b64-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm, 6px);
  border: 1px dashed var(--border-card);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.b64-file-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.b64-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .b64-editor-grid {
    grid-template-columns: 1fr;
  }
}

.b64-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.b64-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.b64-panel-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.b64-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.b64-textarea {
  width: 100%;
  min-height: 280px;
  padding: 1rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono, monospace);
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
}

.b64-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg, 16px);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.b64-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.b64-stat-label {
  font-weight: 500;
}

.b64-stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   TYPING SPEED TEST — MODERN EDITORIAL & TOOL STYLING
   ========================================================================== */

.typing-test-container {
  max-width: 980px;
  margin: 1.5rem auto 3.5rem auto;
  padding: 0 1rem;
}

/* Top Privacy / Notification Banner */
.typing-privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Controls Bar */
.typing-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg, 16px);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.typing-control-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.typing-control-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.typing-segmented-group {
  display: inline-flex;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid var(--border-subtle);
}

.btn-seg {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
}

.btn-seg:hover {
  color: var(--text-primary);
}

.btn-seg.active {
  background: var(--bg-card);
  color: var(--accent-primary, #2b82fe);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.typing-pills-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.typing-pill-btn {
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: var(--font-mono, monospace);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
}

.typing-pill-btn:hover {
  border-color: var(--border-card);
  color: var(--text-primary);
}

.typing-pill-btn.active {
  background: var(--accent-primary, #2b82fe);
  border-color: var(--accent-primary, #2b82fe);
  color: #ffffff;
}

.typing-category-select {
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
}

/* Live Stats Bar */
.typing-live-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.live-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg, 16px);
  padding: 0.75rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.live-stat-card.featured-stat {
  border-color: var(--accent-primary, #2b82fe);
  background: linear-gradient(180deg, rgba(43, 130, 254, 0.05) 0%, var(--bg-card) 100%);
}

.live-stat-num {
  font-family: var(--font-mono, monospace);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}

.live-stat-card.featured-stat .live-stat-num {
  color: var(--accent-primary, #2b82fe);
}

.live-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Typing Area Box */
.typing-area-box {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-lg, 20px);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-md, 0 8px 30px rgba(0, 0, 0, 0.04));
  cursor: text;
  user-select: none;
  -webkit-user-select: none;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color var(--transition-fast, 0.15s ease);
}

.typing-area-box.is-focused {
  border-color: var(--accent-primary, #2b82fe);
  box-shadow: 0 0 0 4px rgba(43, 130, 254, 0.12);
}

/* Hidden Accessible Keystroke Input */
.typing-hidden-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: text;
  z-index: 2;
  border: none;
  background: transparent;
  outline: none;
}

/* Text Display & Characters */
.typing-text-display {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  max-height: 160px;
  overflow-y: hidden;
  font-family: var(--font-mono, "SF Mono", "Fira Code", monospace);
  font-size: 1.42rem;
  line-height: 1.8;
  color: #94a3b8;
  word-break: break-word;
  transition: all 0.2s ease;
}

.typing-word {
  display: inline-flex;
  position: relative;
  margin-right: 0.25em;
  border-bottom: 2px solid transparent;
}

.typing-word.word-has-errors {
  border-bottom-color: rgba(239, 68, 68, 0.45);
}

.typing-space {
  display: inline-block;
  opacity: 0.4;
}

.typing-char {
  position: relative;
  transition: color 0.05s ease, background-color 0.05s ease;
  border-radius: 3px;
}

.typing-char.is-correct {
  color: var(--text-primary, #0f172a);
}

.typing-char.is-incorrect {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
}

.typing-char-extra {
  opacity: 0.85;
}

/* Caret Cursor */
.typing-char.active-caret::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 15%;
  height: 70%;
  width: 2.5px;
  background: var(--accent-primary, #2b82fe);
  border-radius: 2px;
  animation: typingCaretPulse 1s infinite;
}

.typing-word.active-caret-end::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 15%;
  height: 70%;
  width: 2.5px;
  background: var(--accent-primary, #2b82fe);
  border-radius: 2px;
  animation: typingCaretPulse 1s infinite;
}

@keyframes typingCaretPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Restart & Focus Bar */
.typing-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding: 0 0.5rem;
}

.btn-restart-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
}

.btn-restart-action:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary, #2b82fe);
  color: var(--accent-primary, #2b82fe);
}

.typing-shortcut-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.typing-shortcut-hint kbd {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* Daily Practice Streak Badge */
.typing-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(234, 88, 12, 0.05) 100%);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 9999px;
  padding: 0.45rem 1.15rem;
  font-size: 0.88rem;
  color: #ea580c;
  margin: 1.25rem auto 0 auto;
}

/* ==========================================================================
   RESULTS SCREEN OVERLAY & CARDS
   ========================================================================== */

.typing-results-modal {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg, 24px);
  padding: 2.25rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-lg, 0 16px 40px rgba(0, 0, 0, 0.06));
  animation: fadeInModal 0.25s ease-out;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.results-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.results-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Personal Best Trophy Banner */
.personal-best-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 14px;
  padding: 0.85rem 1.5rem;
  color: #92400e;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.75rem;
}

.pb-badge-label {
  background: #f59e0b;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Main Two Hero Scores */
.results-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.res-hero-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 16px);
  padding: 1.5rem;
  text-align: center;
}

.res-hero-val {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent-primary, #2b82fe);
}

.res-hero-card.accuracy-card .res-hero-val {
  color: #10b981;
}

.res-hero-label {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Secondary Detailed Metrics Grid */
.results-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.res-detail-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  text-align: center;
}

.res-detail-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.res-detail-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Canvas WPM Over Time */
.results-chart-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.25rem 1.25rem 0.75rem 1.25rem;
  margin-bottom: 2rem;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.chart-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.net-wpm {
  background: #2b82fe;
}

.legend-dot.raw-wpm {
  background: #94a3b8;
}

#wpmTrendCanvas {
  width: 100%;
  height: 180px;
  display: block;
}

/* Error Analysis: Missed Keys */
.missed-keys-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.missed-keys-header {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.missed-keys-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.missed-key-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
}

.key-badge {
  background: #fee2e2;
  color: #ef4444;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 2px 7px;
  border-radius: 5px;
}

.key-mistakes {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-missed-keys {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #10b981;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Results Actions Buttons */
.results-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-result-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-primary, #2b82fe);
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.75rem 1.85rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
}

.btn-result-primary:hover {
  background: var(--accent-primary-hover, #2578ee);
  transform: translateY(-1px);
}

.btn-result-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.75rem 1.35rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
}

.btn-result-secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary, #2b82fe);
  color: var(--accent-primary, #2b82fe);
}

/* ==========================================================================
   SHARE MODAL
   ========================================================================== */

.share-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.share-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 1.75rem;
  max-width: 660px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.share-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.share-canvas-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

#sharePreviewCanvas {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.share-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================================
   HISTORY & PROGRESS SECTION
   ========================================================================== */

.typing-history-section {
  margin-top: 3.5rem;
}

.history-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.history-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
}

.history-stat-num {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
}

.history-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.history-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.typing-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.typing-history-table th {
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.typing-history-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.typing-history-table tr:last-child td {
  border-bottom: none;
}

.col-wpm strong {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--accent-primary, #2b82fe);
}

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

.mode-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.btn-delete-row {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color var(--transition-fast);
}

.btn-delete-row:hover {
  color: #ef4444;
}

.history-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.history-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.history-filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  outline: none;
}

.btn-clear-history {
  background: transparent;
  border: none;
  font-size: 0.84rem;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-clear-history:hover {
  color: #ef4444;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */

@media (max-width: 768px) {
  .typing-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .typing-control-group {
    justify-content: space-between;
  }

  .typing-text-display {
    font-size: 1.15rem;
    line-height: 1.6;
    max-height: 140px;
  }

  .typing-area-box {
    padding: 1.25rem 1rem;
    min-height: 180px;
  }

  .results-hero-grid {
    grid-template-columns: 1fr;
  }

  .res-hero-val {
    font-size: 2.75rem;
  }

  .results-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}