/* ==========================================================================
   Luna Playable Ad Network Converter — Liquid Glass Design System
   Apple-inspired VisionOS / macOS translucent materials, restrained depth,
   sophisticated specular highlights, and fluid micro-interactions.
   ========================================================================== */

/* Design Tokens & Materials */
:root, [data-theme="light"] {
  color-scheme: light;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Base Colors - Luminous Liquid Glass Canvas */
  --bg-base: #eaf2fd;
  --panel-bg: #f8fbfe;
  --card-bg: #ffffff;
  --text-main: #0c1527;
  --text-secondary: #3b4d66;
  --text-muted: #5e718d;
  --border-light: rgba(255, 255, 255, 0.7);
  --border-hover: rgba(37, 99, 235, 0.5);

  /* Primary Brand Accents */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #385ff2 45%, #6366f1 80%, #7c3aed 100%);
  --primary-gradient-hover: linear-gradient(135deg, #3273f6 0%, #476cf5 45%, #7073f8 80%, #8b5cf6 100%);
  --secondary: #3b82f6;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-glow: rgba(37, 99, 235, 0.25);
  --success: #10b981;
  --error: #ef4444;

  /* Liquid Glass Tokens (VisionOS Multilayered Material) */
  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.48) 50%, rgba(236, 246, 255, 0.65) 100%);
  --glass-bg-hover: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.65) 50%, rgba(240, 248, 255, 0.78) 100%);
  --glass-bg-subtle: rgba(255, 255, 255, 0.42);
  --glass-border: rgba(255, 255, 255, 0.92);
  --glass-border-subtle: rgba(210, 228, 252, 0.75);
  --glass-edge: rgba(45, 75, 125, 0.05);
  --glass-highlight: rgba(255, 255, 255, 1);
  --glass-shadow: 
    0 24px 60px -15px rgba(35, 75, 150, 0.08),
    0 8px 20px -4px rgba(35, 75, 150, 0.03),
    inset 0 1.5px 2px 0 var(--glass-highlight),
    inset 0 -1px 2px 0 rgba(255, 255, 255, 0.35);
  --glass-shadow-hover: 
    0 30px 70px -15px rgba(35, 75, 150, 0.12),
    0 10px 24px -4px rgba(35, 75, 150, 0.05),
    inset 0 1.5px 2px 0 var(--glass-highlight),
    inset 0 -1px 2px 0 rgba(255, 255, 255, 0.45);

  --blur-glass: 30px;
  --saturate-glass: 190%;

  /* Form Elements */
  --input-bg: rgba(255, 255, 255, 0.65);
  --input-bg-focus: rgba(255, 255, 255, 0.95);

  /* Geometry & Physics */
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 26px;
  --radius-pill: 9999px;
  --material-transition: 240ms cubic-bezier(0.22, 1, 0.36, 1);

  /* Ambient Lighting */
  --ambient-blue: rgba(135, 195, 255, 0.35);
  --ambient-cyan: rgba(120, 220, 250, 0.25);
  --ambient-violet: rgba(185, 160, 255, 0.2);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-base: #0a0f1d;
  --panel-bg: #101728;
  --card-bg: #141d32;
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-light: rgba(255, 255, 255, 0.14);
  --border-hover: rgba(59, 130, 246, 0.5);

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #6366f1 100%);
  --primary-gradient-hover: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #818cf8 100%);
  --secondary: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --accent-glow: rgba(59, 130, 246, 0.35);
  --success: #34d399;
  --error: #f87171;

  --glass-bg: linear-gradient(135deg, rgba(20, 28, 48, 0.78) 0%, rgba(16, 23, 40, 0.68) 50%, rgba(22, 32, 54, 0.75) 100%);
  --glass-bg-hover: linear-gradient(135deg, rgba(26, 36, 62, 0.85) 0%, rgba(20, 28, 50, 0.76) 50%, rgba(28, 40, 68, 0.82) 100%);
  --glass-bg-subtle: rgba(16, 24, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-border-subtle: rgba(255, 255, 255, 0.09);
  --glass-edge: rgba(0, 0, 0, 0.45);
  --glass-highlight: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.6), inset 0 1.5px 1.5px var(--glass-highlight);
  --glass-shadow-hover: 0 28px 60px -10px rgba(0, 0, 0, 0.7), inset 0 1.5px 1.5px var(--glass-highlight);

  --blur-glass: 30px;
  --saturate-glass: 170%;

  --input-bg: rgba(16, 24, 42, 0.7);
  --input-bg-focus: rgba(22, 32, 56, 0.95);

  --ambient-blue: rgba(45, 90, 180, 0.3);
  --ambient-cyan: rgba(25, 120, 160, 0.2);
  --ambient-violet: rgba(95, 70, 180, 0.22);
}

/* Global Reset & Base Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: 
    radial-gradient(circle at 50% -10%, #d8ecff 0%, #edf5ff 32%, #edf3fc 68%, #dce9fa 100%) fixed;
  color: var(--text-main);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

[data-theme="dark"] body {
  background: 
    radial-gradient(circle at 50% -10%, #15223c 0%, #0d1425 45%, #080d19 100%) fixed;
}

/* ==========================================================================
   Atmospheric Background Lighting & Translucent 3D Glass Bubbles
   ========================================================================== */
.bg-effects {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: 
    radial-gradient(circle at 12% 16%, rgba(140, 200, 255, 0.5), transparent 45%),
    radial-gradient(circle at 88% 26%, rgba(120, 230, 255, 0.42), transparent 45%),
    radial-gradient(circle at 50% 65%, rgba(190, 175, 255, 0.28), transparent 50%),
    radial-gradient(circle at 82% 90%, rgba(135, 195, 255, 0.42), transparent 45%);
}

.bg-grid {
  display: none;
}

/* Translucent 3D Liquid Glass Bubbles / Orbs */
.orb, .glass-bubble {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: none !important;
  opacity: 1 !important;
  backdrop-filter: blur(4px) saturate(180%);
  -webkit-backdrop-filter: blur(4px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  box-shadow: 
    inset 12px 16px 32px -4px rgba(255, 255, 255, 0.98),
    inset -14px -18px 40px -6px rgba(45, 130, 255, 0.46),
    inset 0 0 22px 2px rgba(255, 255, 255, 0.65),
    0 24px 60px -10px rgba(35, 85, 190, 0.18);
  transition: opacity var(--material-transition);
}

/* Primary Specular Glare (Top-Left Crescent Highlight) */
.orb::before, .glass-bubble::before {
  content: "";
  position: absolute;
  top: 11%;
  left: 14%;
  width: 46%;
  height: 28%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.65) 45%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(-38deg);
  filter: blur(0.5px);
  pointer-events: none;
}

/* Secondary Caustic Bounce (Bottom-Right Reflection) */
.orb::after, .glass-bubble::after {
  content: "";
  position: absolute;
  bottom: 12%;
  right: 14%;
  width: 36%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(145, 215, 255, 0.75) 0%, rgba(145, 215, 255, 0.25) 50%, rgba(145, 215, 255, 0) 100%);
  transform: rotate(-25deg);
  filter: blur(2px);
  pointer-events: none;
}

/* Bubble 1: Large Top Left */
.orb-1 {
  width: 340px;
  height: 340px;
  top: -40px;
  left: -80px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.25) 26%, rgba(185,225,255,0.22) 56%, rgba(125,188,255,0.46) 88%, rgba(255,255,255,0.75) 100%);
}

/* Bubble 2: Mid-Left Floating Droplet */
.orb-2 {
  width: 210px;
  height: 260px;
  top: 250px;
  left: -40px;
  border-radius: 50% 50% 50% 50% / 54% 54% 46% 46%;
  transform: rotate(-12deg);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.22) 28%, rgba(205,200,255,0.22) 58%, rgba(145,160,255,0.42) 88%, rgba(255,255,255,0.7) 100%);
}

/* Bubble 3: Bottom Left */
.orb-3, .bubble-3 {
  width: 300px;
  height: 300px;
  bottom: 40px;
  left: -80px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.22) 28%, rgba(165,220,255,0.24) 58%, rgba(115,180,255,0.45) 88%, rgba(255,255,255,0.7) 100%);
}

/* Bubble 4: Huge Crystal-Clear Sphere on Right Edge */
.bubble-4, .orb-4 {
  width: 440px;
  height: 440px;
  top: 180px;
  right: -130px;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.24) 25%, rgba(165,225,255,0.26) 56%, rgba(105,190,255,0.46) 88%, rgba(255,255,255,0.75) 100%);
}

/* Bubble 5: Top Right Behind Workflow */
.bubble-5, .orb-5 {
  width: 260px;
  height: 260px;
  top: 15px;
  right: 70px;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.2) 28%, rgba(185,210,255,0.2) 60%, rgba(135,170,255,0.42) 90%, rgba(255,255,255,0.65) 100%);
}

/* Bubble 6: Bottom Right Edge */
.bubble-6, .orb-6 {
  width: 330px;
  height: 330px;
  bottom: -40px;
  right: -60px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.2) 28%, rgba(180,215,255,0.22) 60%, rgba(130,175,255,0.44) 90%, rgba(255,255,255,0.65) 100%);
}

/* Dark Mode Bubbles (Smoked glass with subtle edge illumination) */
[data-theme="dark"] .orb,
[data-theme="dark"] .glass-bubble {
  border-color: rgba(255, 255, 255, 0.16);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.04) 30%, rgba(45,75,130,0.18) 65%, rgba(30,55,100,0.36) 90%, rgba(255,255,255,0.14) 100%);
  box-shadow: inset 0 0 24px rgba(255,255,255,0.18), inset -4px -6px 24px rgba(0,0,0,0.6), 0 20px 48px rgba(0,0,0,0.5);
}

/* ==========================================================================
   Floating Glass Navbar
   ========================================================================== */
.navbar {
  max-width: 1240px;
  width: calc(100% - 48px);
  margin: 18px auto 0;
  padding: 0 24px;
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 14px;
  z-index: 50;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow), 0 0 0 1px var(--glass-edge);
  transition: background-color var(--material-transition), border-color var(--material-transition), box-shadow var(--material-transition);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--glass-border);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.15);
  background: #000;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  color: var(--text-main);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.brand-product {
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}

.version-badge {
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-subtle);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: 4px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.local-mode {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-subtle);
}

.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--border-light);
  margin: 0 4px;
}

.nav-icon-btn {
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-subtle);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  transition: all var(--material-transition);
}

.nav-icon-btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border);
  color: var(--primary);
  transform: translateY(-1px);
}

.nav-icon-btn:active {
  transform: scale(0.96);
}

.nav-icon-btn svg {
  width: 18px;
  height: 18px;
}

.changelog-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  border: 1.5px solid var(--card-bg);
}

/* ==========================================================================
   Main Content Layout & Typography
   ========================================================================== */
.main-content {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 38px 24px 60px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 26px;
  box-sizing: border-box;
}

/* ==========================================================================
   Hero Section & Vertical Process Stepper
   ========================================================================== */
.studio-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  align-items: center;
  gap: 40px;
  padding: 8px 4px 6px;
}

.hero-text {
  text-align: left;
}

.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-text h1 {
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.14;
  letter-spacing: -1.7px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  max-width: 680px;
}

.hero-text h1 span {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

[data-theme="dark"] .hero-text h1 span {
  background-image: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #a5b4fc 100%);
}

.intro-copy {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 560px;
}

/* Process Stepper (Floating Glass Card) */
.workflow {
  display: flex;
  flex-direction: column;
  padding: 18px 22px;
  border-radius: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  border: 1.5px solid var(--glass-border);
  box-shadow: var(--glass-shadow), 0 0 0 1px var(--glass-edge);
}

.workflow-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  position: relative;
}

.workflow-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 52px;
  height: 12px;
  width: 1px;
  background: var(--border-light);
}

.workflow-symbol {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.75);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-family: var(--font-mono);
  box-shadow: inset 0 1px 1.5px #ffffff, 0 3px 10px rgba(37, 99, 235, 0.08);
}

.workflow-row strong {
  font-size: 13px;
  font-weight: 700;
  display: block;
  color: var(--text-main);
  margin-bottom: 2px;
}

.workflow-row small {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Section Header Bar */
.workspace-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 6px;
  margin-top: 6px;
  gap: 16px;
  box-sizing: border-box;
}

.workspace-top h2 {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.3px;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
}

.workspace-status {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ==========================================================================
   2-Column Conversion Workspace Grid
   ========================================================================== */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, 480px);
  gap: 24px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.source-column,
.output-column {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Master Liquid Glass Panel Cards */
.main-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  border: 1.5px solid var(--glass-border);
  box-shadow: var(--glass-shadow), 0 0 0 1px var(--glass-edge);
  transition: background-color var(--material-transition), border-color var(--material-transition), box-shadow var(--material-transition);
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-heading h2 {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.2px;
  color: var(--text-main);
  display: flex;
  align-items: center;
}

.panel-heading small {
  font-size: 11px;
  color: var(--text-muted);
}

.section-title {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.2px;
  color: var(--text-main);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
}

/* ==========================================================================
   File Drop Zone (Source Files)
   ========================================================================== */
.drop-zone {
  min-height: 295px;
  padding: 44px 20px;
  border-radius: 22px;
  background: var(--glass-bg-subtle);
  border: 1.5px dashed var(--glass-border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 1px 1px var(--glass-highlight);
  transition: all var(--material-transition);
}

.drop-zone:hover {
  background: var(--glass-bg-hover);
  border-color: var(--primary);
  box-shadow: 0 0 0 6px var(--accent-soft), inset 0 1px 1px var(--glass-highlight);
}

.drop-zone.dragover {
  background: var(--glass-bg-hover);
  border-color: var(--primary);
  transform: scale(1.008);
  box-shadow: 0 0 0 8px var(--accent-soft), 0 14px 32px var(--accent-glow), inset 0 1px 1px var(--glass-highlight);
}

.file-input {
  display: none;
}

/* Frosted Squircle Orb in Dropzone */
.upload-icon-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(220, 240, 255, 0.78) 100%);
  border: 1.5px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 20px;
  box-shadow: 
    inset 0 2px 2px #ffffff,
    0 12px 28px rgba(37, 99, 235, 0.14),
    0 0 0 10px rgba(255, 255, 255, 0.52);
  transition: transform var(--material-transition), box-shadow var(--material-transition);
}

.upload-icon-wrapper span {
  font-family: var(--font-mono);
  font-size: 24px !important;
  font-weight: 700;
  color: var(--primary);
}

.drop-zone:hover .upload-icon-wrapper {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 
    inset 0 2px 2px #ffffff,
    0 16px 32px rgba(37, 99, 235, 0.22),
    0 0 0 14px rgba(255, 255, 255, 0.65);
}

.drop-text-main {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.3px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.drop-text-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Browse Files Pill Button */
.browse-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  margin-top: 22px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 22px -2px rgba(37, 99, 235, 0.38), inset 0 1px 1px rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all var(--material-transition);
}

.drop-zone:hover .browse-label {
  filter: brightness(1.06);
  transform: translateY(-1.5px);
  box-shadow: 0 12px 28px -2px rgba(37, 99, 235, 0.48), inset 0 1px 1px rgba(255, 255, 255, 0.65);
}

.browse-label:active {
  transform: scale(0.98);
}

/* Drop Zone Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  margin-top: 4px;
}

.status-item {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

/* Informational Card Below Source Files */
.source-note {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), 0 0 0 1px var(--glass-edge);
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: start;
}

.source-note .note-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  box-shadow: inset 0 1px 1px var(--glass-highlight);
}

.source-note h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.source-note p {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Error Banner */
.error-banner {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--error);
  font-size: 13px;
  font-weight: 500;
}

.error-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ==========================================================================
   Output Settings & Ad Network Selector
   ========================================================================== */
.config-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
  width: 100%;
}

.network-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
  width: 100%;
}

.network-header-row .form-label {
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.network-count-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 10px;
  padding: 2px 7px;
  display: inline-flex;
  align-items: center;
}

.network-select-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.btn-net-action {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all var(--material-transition);
}

.btn-net-action:hover {
  background: var(--accent-soft);
}

/* 2-Column Network Selectors */
.network-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}

.network-checkbox-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(220, 232, 248, 0.85);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 3px rgba(35, 70, 130, 0.02), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  transition: all var(--material-transition);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.network-checkbox-item:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(37, 99, 235, 0.4);
}

.network-checkbox-item.checked,
.network-checkbox-item:has(input:checked) {
  background: rgba(235, 245, 255, 0.88);
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 4px 14px -2px rgba(37, 99, 235, 0.18), inset 0 1px 1px #ffffff;
}

[data-theme="dark"] .network-checkbox-item {
  background: rgba(20, 30, 52, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .network-checkbox-item:hover {
  background: rgba(26, 38, 66, 0.8);
  border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .network-checkbox-item.checked,
[data-theme="dark"] .network-checkbox-item:has(input:checked) {
  background: rgba(30, 58, 110, 0.5);
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Apple-style Custom Checkbox Control */
.network-checkbox-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 4.5px;
  border: 1.5px solid rgba(185, 205, 230, 0.85);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
  display: grid;
  place-content: center;
  transition: all 0.16s ease;
}

[data-theme="dark"] .network-checkbox-item input[type="checkbox"] {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.8);
}

.network-checkbox-item input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.5 8.5 6.5 11.5 12.5 5.5'/%3E%3C/svg%3E");
  background-size: 11px 11px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Brand SVG Icon Wrappers */
.net-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.net-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.network-checkbox-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

/* Badges for HTML / ZIP */
.network-checkbox-badge {
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-left: auto;
  background: rgba(226, 232, 240, 0.65);
  color: #64748b;
  border: 1px solid rgba(203, 213, 225, 0.5);
  transition: all var(--material-transition);
}

.network-checkbox-item.checked .badge-html,
.network-checkbox-item:has(input:checked) .badge-html {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.22);
}

.network-checkbox-item.checked .badge-zip,
.network-checkbox-item:has(input:checked) .badge-zip {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.22);
}

[data-theme="dark"] .network-checkbox-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .network-checkbox-item.checked .badge-html,
[data-theme="dark"] .network-checkbox-item:has(input:checked) .badge-html {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .network-checkbox-item.checked .badge-zip,
[data-theme="dark"] .network-checkbox-item:has(input:checked) .badge-zip {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   Store URL Form Inputs
   ========================================================================== */
.form-group {
  margin-bottom: 14px;
}

.form-label,
label.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-main);
  margin-bottom: 8px;
}

/* Filename Generator Standard Description & general paragraph form-labels */
p.form-label,
.collapsible-body p.form-label {
  display: block !important;
  width: 100% !important;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

p.form-label strong {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  background: var(--glass-bg-subtle);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  display: inline-block;
  margin: 2px 0;
  letter-spacing: -0.2px;
}

.form-control {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 12.5px;
  color: var(--text-main);
  background: var(--input-bg);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03), inset 0 1px 0 var(--glass-highlight);
  outline: none;
  transition: all var(--material-transition);
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.9;
}

.form-control:focus {
  background: var(--input-bg-focus);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 1px 0 var(--glass-highlight);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 15px;
  cursor: pointer;
}

select.form-control option {
  background: var(--panel-bg);
  color: var(--text-main);
}

/* Network Info Boxes */
.mintegral-info-box,
.tiktok-info-box {
  display: none;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-subtle);
}

.mintegral-info-box strong,
.tiktok-info-box strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--text-main);
}

.mintegral-info-box ul,
.tiktok-info-box ul {
  margin-left: 18px;
  margin-top: 6px;
  color: var(--text-muted);
}

.mintegral-info-box li,
.tiktok-info-box li {
  margin-bottom: 4px;
}

/* ==========================================================================
   Action Buttons (Apple Liquid Buttons)
   ========================================================================== */
.btn-wrapper {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: all var(--material-transition);
}

/* Main CTA: Convert & Download */
.btn-primary {
  min-height: 50px;
  background: linear-gradient(135deg, #2563eb 0%, #385ff2 40%, #6366f1 75%, #7c3aed 100%);
  color: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 28px -6px rgba(45, 90, 245, 0.48), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.45);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #3273f6 0%, #476cf5 40%, #7073f8 75%, #8b5cf6 100%);
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -4px rgba(45, 90, 245, 0.54), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.55);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
  box-shadow: none !important;
}

.btn-secondary {
  min-height: 42px;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-subtle);
  color: var(--text-secondary);
  border-radius: 14px;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--glass-bg-hover);
  color: var(--text-main);
  border-color: var(--glass-border);
}

.btn-secondary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn svg {
  width: 17px;
  height: 17px;
}

/* ==========================================================================
   Batch File List
   ========================================================================== */
.file-list {
  display: none;
}

.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
}

.file-count-badge {
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-subtle);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}

.btn-add-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-subtle);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 650;
  padding: 7px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--material-transition);
}

.btn-add-more:hover {
  background: var(--glass-bg-hover);
  border-color: var(--primary);
}

.file-item {
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  box-shadow: inset 0 1px 1px var(--glass-highlight);
  transition: all var(--material-transition);
}

.file-item:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border);
}

.file-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.file-item-icon svg {
  width: 18px;
  height: 18px;
}

.file-item-icon.error {
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.3);
}

.file-item-info {
  flex: 1;
  min-width: 0;
}

.file-item-name {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.file-item-error {
  font-size: 10.5px;
  color: var(--error);
  margin-top: 2px;
}

.file-item-state {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.file-item.done .file-item-state {
  color: var(--success);
}

.file-item-remove {
  background: transparent;
  border: 1px solid transparent;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--material-transition);
}

.file-item-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.file-progress {
  height: 3px;
  background: var(--border-light);
  margin-top: 8px;
  border-radius: 3px;
  overflow: hidden;
}

.file-progress span {
  display: block;
  height: 100%;
  background: var(--primary);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.batch-progress {
  display: none;
  margin-top: 14px;
}

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

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.2s ease;
}

.progress-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
}

/* ==========================================================================
   Playable Filename Generator
   ========================================================================== */
.generator-card {
  margin-top: 24px !important;
  border-radius: var(--radius-lg);
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 20px 24px;
  transition: background var(--material-transition);
}

.collapsible-header:hover {
  background: var(--accent-soft);
}

.collapsible-body {
  padding: 0 24px 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

#gen-drop-zone {
  min-height: 80px;
  padding: 20px !important;
  margin-top: 10px;
  margin-bottom: 20px;
  border-radius: 16px;
}

.preview-box {
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-subtle);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  margin-top: 18px;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  box-shadow: inset 0 1px 1px var(--glass-highlight);
}

.preview-box.empty {
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font-sans);
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  background: var(--glass-bg-subtle);
  border: 1px solid var(--glass-border-subtle);
  color: var(--text-secondary);
  border-radius: 14px;
  min-height: 42px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: all var(--material-transition);
  width: 100%;
}

.copy-btn:hover:not(:disabled) {
  background: var(--glass-bg-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.copy-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.copy-btn.copied {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--success);
}

/* ==========================================================================
   Result Panel, Toast & Modals
   ========================================================================== */
.result-panel {
  margin-top: 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  padding: 22px;
  box-shadow: var(--glass-shadow);
}

.result-panel h3 {
  font-size: 15px;
  color: var(--success);
  margin-bottom: 8px;
}

.result-panel p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.preview-frame {
  width: 100%;
  height: 480px;
  border: 1px solid var(--glass-border-subtle);
  border-radius: 16px;
  background: var(--glass-bg-subtle);
  margin-top: 16px;
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg-hover);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 13px 22px;
  border-radius: 16px;
  box-shadow: var(--glass-shadow), 0 20px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
}

.toast.show {
  bottom: 36px;
  opacity: 1;
}

.toast svg {
  width: 18px;
  height: 18px;
  stroke: var(--success);
}

/* Changelog Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.changelog-modal {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(var(--saturate-glass));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 520px;
  max-width: calc(100vw - 32px);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35), inset 0 1px 1px var(--glass-highlight);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .changelog-modal {
  transform: translateY(0) scale(1);
}

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.changelog-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.changelog-title {
  font-size: 15px;
  font-weight: 750;
  color: var(--text-main);
}

.changelog-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
}

.changelog-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--material-transition);
}

.changelog-close:hover {
  background: var(--glass-bg-subtle);
  color: var(--text-main);
}

.changelog-body {
  overflow-y: auto;
  padding: 18px 24px 24px;
  flex: 1;
}

.cl-entry {
  margin-bottom: 22px;
}

.cl-entry:last-child {
  margin-bottom: 0;
}

.cl-entry-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.cl-version {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--primary);
}

.cl-date {
  font-size: 11.5px;
  color: var(--text-muted);
}

.cl-badge-new {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
}

.cl-changes {
  list-style: none;
}

.cl-changes li {
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.cl-changes li:last-child {
  border-bottom: none;
}

.cl-changes li::before {
  content: '';
  width: 6px;
  height: 6px;
  min-width: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
}

.cl-changes li.fix::before {
  background: #f59e0b;
}

/* Footer */
.footer {
  padding: 24px;
  max-width: 1240px;
  width: 100%;
  margin: auto;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
}

.footer-content p {
  font-size: 11.5px;
  color: var(--text-muted);
}

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

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

/* ==========================================================================
   Responsive Design Breakpoints
   ========================================================================== */
@media (max-width: 1120px) {
  .navbar {
    width: calc(100% - 32px);
  }
  .studio-grid {
    grid-template-columns: minmax(0, 1fr) minmax(410px, 450px);
    gap: 20px;
  }
  .studio-intro {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
  }
  .hero-text h1 {
    font-size: 36px;
  }
  .main-card {
    padding: 20px;
  }
}

@media (max-width: 890px) {
  .studio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .studio-intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .navbar {
    width: calc(100% - 24px);
    margin-top: 12px;
    padding: 0 16px;
    height: 64px;
    top: 8px;
    border-radius: 18px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .brand-name {
    font-size: 17px;
  }
  .brand-product {
    font-size: 8.5px;
  }
  .version-badge {
    display: none;
  }
  .local-mode {
    font-size: 11px;
    padding: 4px 8px;
  }
  .main-content {
    padding: 24px 16px 40px;
    gap: 20px;
  }
  .studio-intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-text h1 {
    font-size: 32px;
    letter-spacing: -1.2px;
  }
  .workflow {
    flex-direction: column;
    padding: 16px;
  }
  .studio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .drop-zone {
    min-height: 260px;
    padding: 32px 16px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .footer-content {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .network-grid {
    grid-template-columns: 1fr;
  }
  .hero-text h1 {
    font-size: 28px;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .btn:active, .drop-zone.dragover, .nav-icon-btn:hover, .nav-icon-btn:active {
    transform: none !important;
  }
}

/* Unity brand mark sourced from Simple Icons, rendered locally in both themes. */
#ni-unityads .net-icon-ua { background: transparent; border: 0; color: var(--text-main); box-shadow: none; }
#ni-unityads .net-icon-ua::before { content: ''; display: block; width: 18px; height: 18px; background: currentColor; mask: url('assets/unity.svg') center / contain no-repeat; -webkit-mask: url('assets/unity.svg') center / contain no-repeat; }
