/* ================================================================
   FULLCLIPVN — Community Design System v2.0
   "The Fastest Universal Media Downloader."
   Founded by Vinamilk Night Club
   ================================================================ */

/* ── Google Fonts fallback ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  /* Colors */
  --primary:     #c8f;
  --secondary:   #0ff;
  --accent:      #f80;
  --danger:      #f44;
  --success:     #0f8;
  --warning:     #fa0;

  /* Backgrounds */
  --bg-deep:     #060610;
  --bg-card:     rgba(12, 10, 30, 0.88);
  --bg-glass:    rgba(200, 128, 255, 0.05);
  --bg-input:    rgba(0, 0, 0, 0.35);

  /* Borders */
  --border:      rgba(200, 128, 255, 0.18);
  --border-glow: rgba(200, 128, 255, 0.55);
  --border-hover:rgba(200, 128, 255, 0.4);

  /* Text */
  --text:        #e8e0ff;
  --text-dim:    rgba(200, 190, 230, 0.55);
  --text-muted:  rgba(180, 170, 210, 0.35);

  /* Typography */
  --font:        'Outfit', 'Space Grotesk', sans-serif;
  --font-display:'Space Grotesk', 'Outfit', sans-serif;
  --mono:        'JetBrains Mono', monospace;

  /* Spacing */
  --radius:      14px;
  --radius-lg:   22px;
  --radius-xl:   32px;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(200,128,255,0.14), 0 4px 60px rgba(0,0,0,0.6);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.5), 0 1px 0 rgba(200,128,255,0.1) inset;

  /* Layout */
  --hud-height:  56px;
  --nav-width:   72px;
  --content-max: 900px;

  /* Noise */
  --noise-opacity: 0.03;

  /* Transitions */
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-back:   cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --duration:    0.25s;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; transition: color var(--duration); }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, select, textarea { font-family: var(--font); }
img { max-width: 100%; display: block; }

/* ── NOISE OVERLAY ── */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ── BACKGROUND ── */
.aurora-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 10%, rgba(200, 100, 255, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(0, 200, 255, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 50% 50%, rgba(255, 80, 160, 0.04) 0%, transparent 70%),
    linear-gradient(135deg, #04030f 0%, #080620 50%, #0a0415 100%);
  pointer-events: none;
}
.particle-canvas, .trail-canvas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
}
.particle-canvas { opacity: 0.6; }
.trail-canvas { opacity: 1; z-index: 2; }

/* ── CUSTOM CURSOR ── */
.cursor-dot, .cursor-ring {
  display: none !important;
}

/* ════════════════════════════════════════════════
   HUD STATUS BAR
   ════════════════════════════════════════════════ */
.hud-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--hud-height);
  z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(4, 3, 15, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.hud-logo {
  display: flex; align-items: baseline; gap: 4px;
  font-family: var(--font-display);
  font-weight: 800; letter-spacing: 0.5px;
  flex-shrink: 0;
}
.hud-logo-v {
  font-size: 1.6rem;
  background: linear-gradient(135deg, #c8f 0%, #0ff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1;
}
.hud-logo-rest { font-size: 1rem; color: var(--primary); letter-spacing: 2px; }
.hud-logo-tag {
  font-size: 0.5rem; font-weight: 700;
  color: var(--accent); letter-spacing: 3px;
  padding: 2px 7px; border: 1px solid rgba(255, 136, 0, 0.35);
  border-radius: 20px; margin-left: 8px;
}
.hud-center {
  flex: 1; text-align: center;
  display: none;
}
@media (min-width: 900px) { .hud-center { display: block; } }
.hud-slogan {
  font-size: 0.7rem; color: var(--text-dim);
  font-style: italic; letter-spacing: 0.5px;
}
.hud-stats {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.stat-pill {
  display: flex; align-items: center; gap: 4px;
  background: rgba(200, 128, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 10px;
  font-size: 0.68rem; font-family: var(--mono);
  color: var(--text-dim); white-space: nowrap;
}
.stat-pill-icon { font-size: 0.75em; }
#hud-fps { color: var(--success); }
#hud-ping { color: var(--accent); }
#hud-server { color: var(--success); font-weight: 700; }
.hud-cmd-btn {
  background: rgba(200, 128, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 10px;
  font-size: 0.68rem; font-family: var(--mono);
  color: var(--text-dim);
  transition: all var(--duration);
}
.hud-cmd-btn:hover {
  background: rgba(200, 128, 255, 0.2);
  color: var(--primary); border-color: var(--primary);
}

/* ════════════════════════════════════════════════
   SIDE NAVIGATION
   ════════════════════════════════════════════════ */
.side-nav {
  position: fixed;
  left: 0; top: var(--hud-height); bottom: 0;
  width: var(--nav-width);
  z-index: 900;
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 8px;
  background: rgba(4, 3, 15, 0.80);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
}
.nav-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 10px 6px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all var(--duration) var(--ease);
  position: relative;
}
.nav-item::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--primary);
  opacity: 0; transform: scaleY(0);
  transition: all 0.2s var(--ease-back);
}
.nav-item:hover { color: var(--text); background: rgba(200, 128, 255, 0.08); }
.nav-item.active {
  color: var(--primary);
  background: rgba(200, 128, 255, 0.12);
}
.nav-item.active::before { opacity: 1; transform: scaleY(1); }
.nav-icon { font-size: 1.3rem; line-height: 1; }
.nav-label { line-height: 1; }

/* ════════════════════════════════════════════════
   MAIN CONTENT WRAPPER
   ════════════════════════════════════════════════ */
.main-content {
  position: relative; z-index: 5;
  margin-left: var(--nav-width);
  margin-top: var(--hud-height);
  min-height: calc(100vh - var(--hud-height));
  padding: 0;
}

/* ── VIEW SECTIONS ── */
.view-section {
  display: none;
  padding: 32px 32px 80px;
  max-width: calc(var(--content-max) + 64px);
  margin: 0 auto;
  animation: viewFadeIn 0.35s var(--ease) forwards;
}
.view-section.active { display: block; }
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view-header { margin-bottom: 32px; }
.view-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 8px;
}
.view-sub { color: var(--text-dim); font-size: 0.95rem; }

/* ════════════════════════════════════════════════
   HOME — HERO
   ════════════════════════════════════════════════ */
.home-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}
.hero-section {
  text-align: center;
  padding: 48px 0 32px;
}
.hero-badge {
  display: inline-block;
  background: linear-gradient(90deg, rgba(200, 128, 255, 0.15), rgba(0, 255, 255, 0.10));
  border: 1px solid rgba(200, 128, 255, 0.3);
  border-radius: 30px; padding: 6px 20px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 2.5px;
  color: var(--primary); margin-bottom: 24px;
  animation: badgePulse 3.5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 128, 255, 0.3); }
  50%       { box-shadow: 0 0 24px 4px rgba(200, 128, 255, 0.2); }
}
.hero-title {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  margin-bottom: 20px;
}
.hero-title-line-1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 900; letter-spacing: 10px;
  color: transparent;
  background: linear-gradient(90deg, #c8f 0%, #0ff 45%, #f80 100%);
  -webkit-background-clip: text; background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
  line-height: 1.05;
}
.hero-title-line-2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  font-weight: 700; letter-spacing: 6px;
  color: var(--text-dim);
}
.hero-title-line-2 em {
  font-style: normal;
  color: var(--secondary);
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}
@keyframes gradientShift {
  0%, 100% { filter: hue-rotate(0deg) brightness(1); }
  50%       { filter: hue-rotate(20deg) brightness(1.1); }
}
.hero-sub {
  font-size: 1.05rem; color: var(--text-dim);
  max-width: 520px; margin: 0 auto 28px;
  line-height: 1.65;
}

/* ── Platform Carousel ── */
.platform-carousel {
  overflow: hidden; position: relative;
  padding: 8px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.platform-track {
  display: flex; gap: 10px;
  width: max-content;
  animation: carouselScroll 30s linear infinite;
}
.platform-track:hover { animation-play-state: paused; }
@keyframes carouselScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.platform-chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--chip-color, var(--border));
  border-radius: 30px; padding: 6px 14px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--chip-color, var(--text-dim));
  white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 0 12px color-mix(in srgb, var(--chip-color, var(--primary)) 15%, transparent);
  transition: all 0.2s;
}
.platform-chip:hover {
  background: color-mix(in srgb, var(--chip-color, var(--primary)) 15%, transparent);
  transform: translateY(-2px);
}
.chip-icon { font-size: 1rem; }

/* ════════════════════════════════════════════════
   URL INPUT CARD
   ════════════════════════════════════════════════ */
.input-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
  margin-bottom: 24px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.input-card::before {
  content: '';
  position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(200, 128, 255, 0.04), transparent);
  animation: sweepShine 8s linear infinite;
  pointer-events: none;
}
@keyframes sweepShine {
  0%   { left: -60%; }
  100% { left: 140%; }
}
.input-card:focus-within {
  border-color: var(--border-glow);
  box-shadow: 0 0 0 1px rgba(200, 128, 255, 0.15), var(--shadow-card);
}

/* Detection Badge */
.input-detected-plat {
  min-height: 22px; margin-bottom: 14px;
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.5px;
  transition: all 0.3s; display: flex; align-items: center; gap: 6px;
}
.input-detected-plat.detected { color: var(--success); }

/* URL Field */
.url-field-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-bottom: 20px;
}
.url-field-row:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 35px rgba(200, 128, 255, 0.4), inset 0 0 15px rgba(200, 128, 255, 0.1);
  padding: 20px 28px;
  transform: translateY(-4px) scale(1.03);
}
.url-icon { font-size: 1.3rem; flex-shrink: 0; transition: all 0.3s; }
.url-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 0.97rem; color: var(--text); min-width: 0;
  caret-color: var(--primary);
  transition: font-size 0.3s var(--ease);
}
.url-field-row:focus-within .url-input {
  font-size: 1.05rem;
}
.url-input::placeholder { color: var(--text-dim); }

/* Batch textarea height transition */
#url-input-batch {
  height: 120px;
  transition: height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}
#url-input-batch:focus {
  height: 240px !important;
}

/* ffmpeg warning badge */
.ffmpeg-warning-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 170, 0, 0.08);
  border: 1px solid rgba(255, 170, 0, 0.25);
  color: #fa0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 12px;
  line-height: 1.4;
  animation: viewFadeIn 0.3s var(--ease);
}
.btn-paste {
  display: flex; align-items: center; gap: 4px;
  background: rgba(200, 128, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-dim); flex-shrink: 0;
  transition: all 0.2s;
}
.btn-paste:hover { background: rgba(200, 128, 255, 0.2); color: var(--primary); border-color: var(--primary); }
.btn-clear-url {
  background: none; color: var(--text-dim);
  font-size: 1rem; padding: 4px 8px;
  border-radius: 6px; flex-shrink: 0;
  transition: all 0.2s;
}
.btn-clear-url:hover { color: var(--danger); background: rgba(255, 68, 68, 0.1); }

/* Options Row */
.options-row {
  display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 22px;
}
.option-group {
  display: flex; flex-direction: column; gap: 6px;
  flex: 1; min-width: 120px;
}
.opt-label {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-dim);
}
.opt-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  padding: 9px 32px 9px 12px;
  font-size: 0.83rem; outline: none;
  transition: border-color 0.2s; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23aa80cc'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.opt-select:hover { border-color: var(--primary); }
.opt-select option { background: #0c0a20; }
.toggle-row { display: flex; gap: 6px; }
.toggle-opt {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-dim);
  padding: 8px 12px; font-size: 0.78rem; font-weight: 600;
  transition: all 0.2s;
}
.toggle-opt.active {
  background: rgba(200, 128, 255, 0.15);
  border-color: var(--primary); color: #fff;
  box-shadow: 0 0 14px rgba(200, 128, 255, 0.2);
}

/* Analyze Button */
.analyze-row { display: flex; align-items: center; gap: 12px; }
.btn-analyze {
  flex: 1; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #7b1ed4 0%, #1a5fcc 100%);
  border-radius: var(--radius); color: #fff;
  font-size: 1rem; font-weight: 800;
  letter-spacing: 2px; padding: 16px 32px;
  box-shadow: 0 0 30px rgba(123, 30, 212, 0.35), 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s var(--ease);
}
.btn-analyze:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 50px rgba(123, 30, 212, 0.55), 0 8px 30px rgba(0, 0, 0, 0.5);
}
.btn-analyze:active { transform: translateY(-1px); }
.btn-analyze:disabled { opacity: 0.6; pointer-events: none; }
.btn-shimmer {
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: shimmer 2.8s linear infinite;
}
@keyframes shimmer { 0% { left: -100%; } 100% { left: 200%; } }
.kbd-shortcut {
  background: rgba(200, 128, 255, 0.08);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; font-size: 0.72rem;
  font-family: var(--mono); color: var(--text-dim);
  flex-shrink: 0; white-space: nowrap;
}

/* ── STATUS BOX ── */
.status-container { margin-bottom: 20px; }
.status-box {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 24px;
  box-shadow: var(--shadow-glow);
  animation: viewFadeIn 0.3s var(--ease);
}
.status-icon { font-size: 1.4rem; animation: spinIcon 1.5s linear infinite; }
@keyframes spinIcon { to { transform: rotate(360deg); } }
.status-text { flex: 1; font-size: 0.9rem; font-weight: 600; }
.status-progress {
  width: 120px; height: 3px;
  background: rgba(200, 128, 255, 0.1);
  border-radius: 99px; overflow: hidden;
}
.status-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  animation: progressPulse 1.8s ease-in-out infinite;
}
@keyframes progressPulse {
  0%   { width: 10%; margin-left: 0; }
  50%  { width: 60%; margin-left: 20%; }
  100% { width: 5%; margin-left: 95%; }
}

/* ── ERROR BOX ── */
.error-box {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 68, 68, 0.08);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: var(--radius); padding: 14px 18px;
  margin-bottom: 20px; animation: viewFadeIn 0.3s var(--ease);
}
.error-icon { font-size: 1.2rem; }
.error-text { flex: 1; font-size: 0.88rem; color: var(--danger); font-weight: 600; }
.error-close {
  color: var(--danger); font-size: 0.9rem; padding: 4px 8px;
  border-radius: 6px; transition: background 0.2s;
}
.error-close:hover { background: rgba(255, 68, 68, 0.15); }

/* ════════════════════════════════════════════════
   RESULT CARD
   ════════════════════════════════════════════════ */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px; margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  animation: viewFadeIn 0.4s var(--ease);
  transition: transform 0.3s var(--ease);
  transform-style: preserve-3d;
}

/* Result Header */
.result-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 20px;
}
.result-platform-badge {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 2px;
  padding: 4px 12px; border-radius: 20px; border: 1px solid;
}
.result-header-actions { display: flex; gap: 6px; }
.result-action-btn {
  width: 34px; height: 34px;
  border-radius: 10px; font-size: 1rem;
  background: rgba(200, 128, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.2s; display: grid; place-items: center;
}
.result-action-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(200, 128, 255, 0.15); }

/* Result Top */
.result-top {
  display: flex; gap: 22px; margin-bottom: 24px; flex-wrap: wrap;
}
.result-thumb-wrap {
  position: relative; flex-shrink: 0;
  width: 150px; height: 190px;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 30px rgba(200, 128, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
}
.result-thumb { width: 100%; height: 100%; object-fit: cover; }
.result-thumb-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 3rem; background: var(--bg-glass);
}
.thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 50%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 10px; gap: 4px;
}
.result-duration {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600;
  background: rgba(0, 0, 0, 0.7); border-radius: 6px; padding: 2px 8px;
  width: fit-content;
}
.result-meta {
  flex: 1; min-width: 200px;
  display: flex; flex-direction: column; gap: 14px;
}
.result-title {
  font-size: 1.08rem; font-weight: 700; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-author { display: flex; align-items: center; gap: 10px; }
.author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--primary); object-fit: cover; flex-shrink: 0;
}
.author-info { display: flex; flex-direction: column; gap: 2px; }
.author-name { font-weight: 700; font-size: 0.9rem; }
.author-id { font-size: 0.76rem; color: var(--text-dim); }
.result-stats {
  display: flex; gap: 20px;
  border-top: 1px solid var(--border); padding-top: 14px; flex-wrap: wrap;
}
.stat-item { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 1rem; font-weight: 800; color: var(--primary); font-family: var(--mono); }
.stat-lbl { font-size: 0.6rem; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; }

/* Download Actions */
.download-actions { border-top: 1px solid var(--border); padding-top: 20px; }
.dl-section-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px;
}
.dl-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-btn {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, rgba(200,128,255,0.1), rgba(0,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 18px;
  color: var(--text); font-size: 0.85rem; font-weight: 600;
  transition: all 0.25s var(--ease); min-width: 130px;
  position: relative; overflow: hidden;
}
.dl-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0; transition: opacity 0.3s;
}
.dl-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(200, 128, 255, 0.25);
  transform: translateY(-2px);
}
.dl-btn:hover::after { opacity: 0.08; }
.dl-btn-icon { font-size: 1rem; position: relative; z-index: 1; }
.dl-btn-label { flex: 1; position: relative; z-index: 1; }
.dl-btn-badge {
  background: rgba(200, 128, 255, 0.2);
  border-radius: 6px; padding: 2px 7px;
  font-size: 0.65rem; font-family: var(--mono);
  color: var(--primary); font-weight: 700;
  position: relative; z-index: 1;
}
.dl-btn-size {
  font-size: 0.6rem; font-family: var(--mono); font-weight: 600;
  color: var(--secondary);
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 5px; padding: 1px 6px;
  min-width: 28px; text-align: center;
  position: relative; z-index: 1;
  transition: all 0.3s;
  white-space: nowrap;
}
.dl-btn-size.size-loaded {
  color: #4dff91;
  background: rgba(77, 255, 145, 0.08);
  border-color: rgba(77, 255, 145, 0.25);
  animation: sizePop 0.4s var(--ease-back);
}
@keyframes sizePop {
  0% { transform: scale(0.7); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.dl-btn.audio { border-color: rgba(255, 136, 0, 0.3); }
.dl-btn.audio:hover { border-color: var(--accent); box-shadow: 0 0 20px rgba(255, 136, 0, 0.2); }
.dl-empty { color: var(--text-dim); font-size: 0.88rem; }

/* Image Gallery */
.image-gallery { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 20px; }
.gallery-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(200,128,255,0.15); color: var(--primary);
  border-radius: 20px; padding: 2px 10px;
  font-size: 0.75rem; font-weight: 700; margin-left: 6px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px; margin-bottom: 14px;
}
.gallery-item {
  position: relative; border-radius: 10px;
  overflow: hidden; aspect-ratio: 1;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(200, 128, 255, 0.3);
  border-color: var(--primary);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.2s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-dl-btn {
  width: 36px; height: 36px;
  border-radius: 50%; background: rgba(200, 128, 255, 0.9);
  border: none; font-size: 0.9rem; color: #fff;
  display: grid; place-items: center;
  transition: transform 0.15s;
}
.gallery-dl-btn:hover { transform: scale(1.15); }
.btn-dl-all {
  width: 100%; background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: var(--radius); color: var(--secondary);
  font-size: 0.88rem; font-weight: 700; padding: 12px;
  letter-spacing: 1px; transition: all 0.25s;
}
.btn-dl-all:hover { background: rgba(0, 255, 255, 0.15); box-shadow: 0 0 20px rgba(0,255,255,0.2); }

/* Music Bar */
.music-bar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 136, 0, 0.06);
  border: 1px solid rgba(255, 136, 0, 0.2);
  border-radius: var(--radius); padding: 14px 18px; margin-top: 20px;
}
.music-icon-wrap { font-size: 1.4rem; animation: musicPulse 1.5s ease-in-out infinite; }
@keyframes musicPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.music-info { flex: 1; min-width: 0; }
.music-title { display: block; font-weight: 700; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-author { display: block; font-size: 0.74rem; color: var(--text-dim); margin-top: 2px; }
.btn-dl-audio {
  background: rgba(255, 136, 0, 0.15);
  border: 1px solid rgba(255, 136, 0, 0.35);
  border-radius: 10px; color: var(--accent);
  font-size: 0.8rem; font-weight: 700; padding: 8px 14px;
  transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
}
.btn-dl-audio:hover { box-shadow: 0 0 14px rgba(255,136,0,0.3); }

/* Result Footer */
.result-footer { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.btn-new {
  width: 100%; background: none;
  border: 1px dashed rgba(200,128,255,0.25);
  border-radius: var(--radius); color: var(--text-dim);
  font-size: 0.88rem; font-weight: 600; padding: 12px;
  letter-spacing: 1px; transition: all 0.25s;
}
.btn-new:hover { border-style: solid; border-color: var(--primary); color: var(--primary); background: rgba(200,128,255,0.05); }

/* ════════════════════════════════════════════════
   HISTORY SECTION
   ════════════════════════════════════════════════ */
.history-section {
  padding-top: 24px; border-top: 1px solid var(--border);
}
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.section-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); }
.section-actions { display: flex; gap: 6px; }
.section-btn {
  background: rgba(200,128,255,0.08);
  border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-dim);
  font-size: 0.72rem; font-weight: 600; padding: 5px 12px;
  transition: all 0.2s;
}
.section-btn:hover { border-color: var(--primary); color: var(--primary); }
.section-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.history-empty { text-align: center; padding: 40px 20px; }
.history-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.history-empty p { color: var(--text-dim); }
.history-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  margin-bottom: 8px;
  transition: all 0.2s;
}
.history-item:hover { border-color: var(--primary); background: rgba(200,128,255,0.04); }
.hist-thumb-wrap { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.hist-thumb { width: 100%; height: 100%; object-fit: cover; }
.hist-thumb-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: var(--bg-glass); font-size: 1.2rem; }
.hist-info { flex: 1; min-width: 0; }
.hist-title { font-size: 0.83rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.hist-meta { font-size: 0.7rem; color: var(--text-dim); display: flex; gap: 6px; align-items: center; }
.hist-badge {
  background: rgba(200,128,255,0.12); border-radius: 6px;
  padding: 2px 8px; font-size: 0.65rem;
  color: var(--primary); font-weight: 700; flex-shrink: 0;
}

/* ════════════════════════════════════════════════
   TOOLS
   ════════════════════════════════════════════════ */
.tools-grid { display: flex; flex-direction: column; gap: 28px; }
.tool-category {}
.tool-cat-label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 12px;
  padding-left: 4px;
}
.tool-cards-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 18px;
  text-align: left; cursor: none;
  transition: all 0.25s var(--ease);
  position: relative; overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0; transition: opacity 0.3s;
}
.tool-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 0 24px rgba(200,128,255,0.2); }
.tool-card:hover::before { opacity: 0.06; }
.tool-card-icon { font-size: 1.8rem; margin-bottom: 10px; position: relative; z-index: 1; }
.tool-card-name { font-size: 0.88rem; font-weight: 700; margin-bottom: 6px; position: relative; z-index: 1; }
.tool-card-desc { font-size: 0.73rem; color: var(--text-dim); line-height: 1.4; position: relative; z-index: 1; }
.tool-card-arrow {
  position: absolute; right: 14px; top: 14px;
  color: var(--text-muted); font-size: 1.1rem;
  transition: transform 0.2s, color 0.2s;
}
.tool-card:hover .tool-card-arrow { transform: translate(3px, -3px); color: var(--primary); }

/* Tool Panel Overlay */
.tool-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.tool-overlay.active { opacity: 1; pointer-events: all; }
.tool-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: min(90vw, 640px); max-height: 85vh;
  overflow-y: auto; padding: 0;
  box-shadow: var(--shadow-card);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s var(--ease-back);
}
.tool-panel.active { transform: scale(1) translateY(0); }
.tool-panel-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-card);
  backdrop-filter: blur(10px); z-index: 1;
}
.tool-panel-icon { font-size: 1.6rem; }
.tool-panel-title { font-size: 0.88rem; font-weight: 800; letter-spacing: 2px; }
.tool-panel-desc { font-size: 0.74rem; color: var(--text-dim); margin-top: 2px; }
.tool-panel-close {
  margin-left: auto; width: 32px; height: 32px;
  border-radius: 50%; color: var(--text-dim);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  display: grid; place-items: center; transition: all 0.2s;
}
.tool-panel-close:hover { color: var(--danger); border-color: var(--danger); }
.tool-panel-body { padding: 24px; }

/* Tool Form Elements */
.tool-form { display: flex; flex-direction: column; gap: 14px; }
.tool-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); }
.tool-input, .tool-textarea, .tool-select {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); padding: 10px 14px; font-size: 0.88rem; outline: none;
  transition: border-color 0.2s; font-family: var(--font);
}
.tool-textarea { resize: vertical; min-height: 80px; }
.tool-input:focus, .tool-textarea:focus { border-color: var(--primary); }
.tool-textarea.mono { font-family: var(--mono); font-size: 0.82rem; }
.tool-btn {
  background: linear-gradient(135deg, rgba(200,128,255,0.25), rgba(0,255,255,0.15));
  border: 1px solid var(--primary); border-radius: var(--radius);
  color: var(--primary); font-size: 0.88rem; font-weight: 700;
  padding: 12px 20px; transition: all 0.2s; letter-spacing: 0.5px;
}
.tool-btn:hover { box-shadow: 0 0 20px rgba(200,128,255,0.3); transform: translateY(-1px); }
.tool-btn-secondary {
  background: rgba(200,128,255,0.08);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-dim); font-size: 0.85rem; font-weight: 600; padding: 10px 16px;
  transition: all 0.2s;
}
.tool-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.tool-btn-sm {
  background: rgba(200,128,255,0.08); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-dim); font-size: 0.78rem; padding: 7px 12px;
  transition: all 0.2s;
}
.tool-btn-sm:hover { border-color: var(--primary); color: var(--primary); }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.tool-output {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  font-size: 0.85rem; word-break: break-all;
  color: var(--secondary); min-height: 40px;
}
.tool-output.mono { font-family: var(--mono); }
.tool-error { color: var(--danger); font-size: 0.82rem; }
.tool-placeholder { text-align: center; padding: 40px; color: var(--text-dim); font-size: 1rem; }
.tool-tabs { display: flex; gap: 6px; margin-bottom: 4px; }
.tool-tab {
  background: rgba(200,128,255,0.05);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-dim); font-size: 0.8rem; font-weight: 600; padding: 7px 14px;
  transition: all 0.2s;
}
.tool-tab.active { background: rgba(200,128,255,0.15); border-color: var(--primary); color: var(--primary); }
.tool-result.center { text-align: center; }
.hash-results { display: flex; flex-direction: column; gap: 10px; }
.hash-result-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hash-result-item span { font-size: 0.72rem; font-weight: 700; color: var(--text-dim); width: 60px; flex-shrink: 0; }
.hash-result-item code { flex: 1; font-family: var(--mono); font-size: 0.72rem; word-break: break-all; color: var(--secondary); }
.hash-result-item button { background: none; color: var(--text-dim); font-size: 0.8rem; padding: 2px 6px; border-radius: 4px; transition: color 0.2s; }
.hash-result-item button:hover { color: var(--primary); }
.color-picker-wrap { display: flex; gap: 12px; align-items: center; }
.color-native-input { width: 64px; height: 48px; border-radius: 10px; border: 2px solid var(--border); padding: 2px; background: none; cursor: none; }
.color-preview { flex: 1; height: 48px; border-radius: 10px; border: 1px solid var(--border); background: #cc88ff; }
.color-values { display: flex; flex-direction: column; gap: 8px; }
.color-val-row { display: flex; align-items: center; gap: 10px; }
.color-val-row span { font-size: 0.72rem; font-weight: 700; color: var(--text-dim); width: 40px; }
.color-val-row code { flex: 1; font-family: var(--mono); font-size: 0.8rem; color: var(--secondary); }
.color-val-row button { color: var(--text-dim); font-size: 0.8rem; padding: 2px 6px; border-radius: 4px; transition: color 0.2s; }
.color-val-row button:hover { color: var(--primary); }
.text-stats { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-dim); }
.text-stats b { color: var(--primary); }
.gradient-preview { width: 100%; height: 100px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 4px; }
.file-drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 32px; text-align: center; cursor: none;
  transition: all 0.2s;
}
.file-drop-zone:hover, .file-drop-zone.drag-over { border-color: var(--primary); background: rgba(200,128,255,0.05); }
.drop-icon { font-size: 2.5rem; margin-bottom: 8px; }
.drop-text { font-size: 0.88rem; color: var(--text-dim); }
.compress-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.compare-item { text-align: center; }
.compare-label { font-size: 0.72rem; font-weight: 700; color: var(--text-dim); margin-bottom: 6px; }
.compare-item img { width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.compare-size { font-size: 0.72rem; color: var(--secondary); margin-top: 4px; font-family: var(--mono); }

/* ════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════ */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  transition: all 0.25s var(--ease);
}
.dash-stat-card:hover { border-color: var(--primary); box-shadow: 0 0 20px rgba(200,128,255,0.15); }
.dash-stat-icon { font-size: 1.8rem; margin-bottom: 10px; }
.dash-stat-value { font-size: 1.8rem; font-weight: 800; font-family: var(--font-display); color: var(--primary); line-height: 1; margin-bottom: 6px; }
.dash-stat-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.dash-stat-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.dash-section { margin-bottom: 28px; }
.dash-section-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.platform-chart { display: flex; flex-direction: column; gap: 10px; }
.chart-row { display: flex; align-items: center; gap: 12px; }
.chart-label { font-size: 0.8rem; width: 110px; flex-shrink: 0; }
.chart-bar-wrap { flex: 1; }
.chart-bar { width: 100%; height: 24px; border-radius: 6px; border: 1px solid; position: relative; overflow: hidden; }
.chart-bar-fill { height: 100%; border-radius: 6px; opacity: 0.7; }
.chart-count { font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim); width: 30px; text-align: right; }
.recent-list { display: flex; flex-direction: column; gap: 8px; }
.recent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: rgba(0,0,0,0.2);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: all 0.2s;
}
.recent-item:hover { border-color: var(--primary); }
.recent-thumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; font-size: 1.2rem; }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-info { flex: 1; min-width: 0; }
.recent-title { font-size: 0.83rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-meta { font-size: 0.7rem; color: var(--text-dim); margin-top: 2px; }
.recent-badge { font-size: 0.68rem; font-weight: 700; flex-shrink: 0; font-family: var(--mono); }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.sys-item {
  background: rgba(0,0,0,0.2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.sys-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.sys-value { font-family: var(--mono); font-size: 0.88rem; color: var(--secondary); font-weight: 600; }
.dash-empty { color: var(--text-dim); font-size: 0.88rem; padding: 20px 0; }

/* ════════════════════════════════════════════════
   SETTINGS
   ════════════════════════════════════════════════ */
.settings-section { margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.settings-section:last-child { border-bottom: none; }
.settings-section-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.theme-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.theme-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 10px 16px;
  color: var(--text-dim); font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s;
}
.theme-btn:hover { border-color: var(--primary); color: var(--text); }
.theme-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(200,128,255,0.1); }
.theme-icon { font-size: 1.1rem; }
.lang-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 14px;
  color: var(--text-dim); font-size: 0.82rem; font-weight: 600;
  transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--primary); color: var(--text); }
.lang-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(200,128,255,0.1); }
.anim-row { display: flex; gap: 8px; }
.anim-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 18px;
  color: var(--text-dim); font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s;
}
.anim-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(200,128,255,0.1); }
.accent-row { display: flex; align-items: center; gap: 14px; }
.accent-color-input { width: 56px; height: 40px; border-radius: 10px; border: 2px solid var(--border); padding: 2px; background: none; cursor: none; }
.settings-btn-sm {
  background: rgba(200,128,255,0.08); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-dim); font-size: 0.8rem; padding: 7px 14px;
  transition: all 0.2s;
}
.settings-btn-sm:hover { border-color: var(--primary); color: var(--primary); }
.settings-danger-btn {
  background: rgba(255,68,68,0.08); border: 1px solid rgba(255,68,68,0.25);
  border-radius: var(--radius); color: var(--danger);
  font-size: 0.85rem; font-weight: 700; padding: 12px 20px;
  transition: all 0.2s;
}
.settings-danger-btn:hover { background: rgba(255,68,68,0.15); box-shadow: 0 0 16px rgba(255,68,68,0.2); }

/* ════════════════════════════════════════════════
   ADMIN PANEL
   ════════════════════════════════════════════════ */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.admin-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
}
.admin-card-title { font-size: 0.78rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.admin-kv {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
}
.admin-kv span:first-child { color: var(--text-dim); }
.admin-val { font-family: var(--mono); color: var(--text); font-size: 0.8rem; }
.admin-val.online { color: var(--success); }
.admin-val.error-val { color: var(--danger); }
.admin-status { font-size: 0.75rem; font-weight: 600; }
.admin-status.healthy { color: var(--success); }
.admin-status.warning { color: var(--warning); }
.admin-status.degraded { color: var(--danger); }
.admin-offline { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.admin-offline h3 { font-size: 1.2rem; margin: 12px 0 8px; color: var(--danger); }
.admin-offline code { display: block; margin-top: 16px; background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 8px; padding: 10px 18px; font-family: var(--mono); color: var(--secondary); }
.admin-loading { text-align: center; padding: 40px; color: var(--text-dim); }

/* ════════════════════════════════════════════════
   COMMAND PALETTE
   ════════════════════════════════════════════════ */
.cmd-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  display: grid; place-items: flex-start center;
  padding-top: 15vh;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.cmd-overlay.active { opacity: 1; pointer-events: all; }
.cmd-palette {
  width: min(90vw, 580px);
  background: rgba(10, 8, 25, 0.98);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 40px rgba(200,128,255,0.15);
  overflow: hidden;
  transform: scale(0.93) translateY(-10px);
  transition: transform 0.3s var(--ease-back);
}
.cmd-overlay.active .cmd-palette { transform: scale(1) translateY(0); }
.cmd-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.cmd-search-icon { font-size: 1.1rem; flex-shrink: 0; color: var(--text-dim); }
.cmd-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 1rem; color: var(--text); caret-color: var(--primary);
}
.cmd-kbd-esc {
  background: rgba(200,128,255,0.1); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px;
  font-size: 0.7rem; font-family: var(--mono); color: var(--text-dim);
}
.cmd-list { max-height: 380px; overflow-y: auto; padding: 8px; }
.cmd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--radius);
  font-size: 0.88rem; color: var(--text-dim);
  transition: all 0.15s; width: 100%; text-align: left;
}
.cmd-item:hover, .cmd-item.selected { background: rgba(200,128,255,0.12); color: var(--text); }
.cmd-icon { font-size: 1rem; width: 24px; text-align: center; flex-shrink: 0; }
.cmd-label { flex: 1; }
.cmd-kbd { font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); }
.cmd-empty { padding: 24px; text-align: center; color: var(--text-dim); font-size: 0.9rem; }

/* ════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ════════════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 3000;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: rgba(10, 8, 28, 0.97);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 18px; font-size: 0.88rem; font-weight: 600;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  max-width: 340px;
  border-left: 3px solid var(--primary);
  opacity: 0; transform: translateX(24px);
  transition: all 0.3s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.out { opacity: 0; transform: translateX(24px); }
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error   { border-left-color: var(--danger); }
.toast.toast-info    { border-left-color: var(--secondary); }
.toast-msg { flex: 1; }
.toast-close { color: var(--text-dim); font-size: 0.8rem; padding: 2px 6px; border-radius: 4px; transition: color 0.2s; }
.toast-close:hover { color: var(--text); }

/* ════════════════════════════════════════════════
   SCROLLBAR
   ════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(200,128,255,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(200,128,255,0.6); }

/* ════════════════════════════════════════════════
   THEME: LIGHT
   ════════════════════════════════════════════════ */
[data-theme="light"] .aurora-bg {
  background:
    radial-gradient(ellipse 60% 50% at 15% 10%, rgba(120,80,200,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(0,100,200,0.06) 0%, transparent 70%),
    linear-gradient(135deg, #f5f0ff 0%, #eff5ff 50%, #f0f0fa 100%);
}
[data-theme="light"] body::after { opacity: 0.015; }
[data-theme="light"] .hud-bar { background: rgba(245,242,255,0.95); border-color: rgba(100,0,200,0.12); }
[data-theme="light"] .side-nav { background: rgba(245,242,255,0.90); border-color: rgba(100,0,200,0.12); }

/* ════════════════════════════════════════════════
   ANIMATION MODES
   ════════════════════════════════════════════════ */
.anim-off .btn-analyze:hover,
.anim-off .dl-btn:hover,
.anim-off .tool-card:hover,
.anim-off .nav-item:hover { transform: none; }
.anim-off .platform-track { animation: none; }
.anim-off .particle-canvas,
.anim-off .trail-canvas { display: none; }
.anim-off .aurora-blob { animation: none !important; }
.anim-off .btn-shimmer { animation: none; }
.anim-off .hero-badge { animation: none; }
.anim-off .hero-title-line-1 { animation: none; }

.anim-reduced .platform-track { animation-duration: 60s; }
.anim-reduced .hero-title-line-1 { animation-duration: 12s; }

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --nav-width: 0px; --hud-height: 50px; }
  .side-nav { display: none; }
  .main-content { margin-left: 0; }
  .view-section { padding: 20px 16px 60px; }
  .hud-bar { padding: 0 14px; }
  .hud-logo-tag { display: none; }
  .hud-stats { gap: 4px; }
  .stat-pill { padding: 3px 8px; font-size: 0.62rem; }
  .hero-section { padding: 32px 0 20px; }
  .hero-title-line-1 { font-size: clamp(2.5rem, 13vw, 4rem); letter-spacing: 6px; }
  .hero-title-line-2 { font-size: clamp(1.1rem, 5vw, 1.8rem); }
  .input-card { padding: 18px; border-radius: var(--radius-lg); }
  .result-thumb-wrap { width: 120px; height: 155px; }
  .dl-grid { flex-direction: column; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .tool-cards-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .options-row { flex-direction: column; }
  .hud-center { display: none; }
  .dash-grid { grid-template-columns: 1fr; }
  .tool-cards-row { grid-template-columns: 1fr; }
  .btn-analyze { font-size: 0.88rem; padding: 14px 20px; }
}

/* Mobile Navigation Bottom Bar */
@media (max-width: 768px) {
  .side-nav {
    display: flex; flex-direction: row;
    position: fixed; bottom: 0; left: 0; right: 0; top: auto;
    height: 60px; width: 100%;
    border-right: none; border-top: 1px solid var(--border);
    padding: 6px 8px; gap: 2px; z-index: 900;
    justify-content: space-around;
  }
  .nav-item { flex: 1; flex-direction: column; padding: 6px 4px; font-size: 0.55rem; }
  .nav-item::before { display: none; }
  .nav-item.active { background: rgba(200,128,255,0.1); border-radius: 10px; }
  .nav-icon { font-size: 1.1rem; }
  .main-content { margin-bottom: 60px; }
}

/* ════════════════════════════════════════════════
   FOOTER (Integrated from legal design)
   ════════════════════════════════════════════════ */
.legal-footer {
  position: relative; z-index: 5;
  border-top: 1px solid var(--border);
  background: rgba(4,3,15,0.8); backdrop-filter: blur(20px);
  padding: 48px 24px 32px;
  margin-top: 40px;
}

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

.legal-footer-grid {
  display: grid; grid-template-columns: 1fr repeat(3, auto);
  gap: 48px; margin-bottom: 40px;
}

.footer-brand { }
.footer-brand-logo {
  display: flex; align-items: baseline; gap: 4px;
  font-family: var(--font-display); font-weight: 800; margin-bottom: 12px;
}
.footer-brand-logo-v {
  font-size: 1.4rem;
  background: linear-gradient(135deg, #c8f, #0ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.footer-brand-logo-rest { font-size: 0.85rem; color: var(--primary); letter-spacing: 2px; }
.footer-brand-desc { font-size: 0.82rem; color: var(--text-dim); line-height: 1.6; max-width: 280px; }

.footer-col-title {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px;
}
.footer-col-links { display: flex; flex-direction: column; gap: 10px; }
.footer-col-links a {
  font-size: 0.82rem; color: var(--text-dim);
  transition: color var(--duration);
}
.footer-col-links a:hover { color: var(--primary); }

.legal-footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px; display: flex;
  justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
}
.footer-copy { font-size: 0.75rem; color: var(--text-muted); }
.footer-copy span { color: var(--primary); }

.footer-compliance {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.compliance-badge {
  background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px;
  font-size: 0.65rem; color: var(--text-muted); font-family: var(--mono);
}

/* ════════════════════════════════════════════════
   COOKIE CONSENT BANNER & MODAL OVERLAY
   ════════════════════════════════════════════════ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 9000; padding: 20px 24px;
  background: rgba(6, 5, 20, 0.97);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(200,128,255,0.25);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.5);
  transform: translateY(100%);
  transition: transform 0.5s var(--ease);
  display: none;
}
.cookie-banner.visible {
  display: block;
  animation: slideUp 0.5s var(--ease) forwards;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.cookie-banner-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}

.cookie-banner-icon { font-size: 2rem; flex-shrink: 0; }

.cookie-banner-text { flex: 1; min-width: 240px; }
.cookie-banner-title {
  font-size: 0.95rem; font-weight: 700; color: var(--text);
  margin-bottom: 6px;
}
.cookie-banner-desc {
  font-size: 0.8rem; color: var(--text-dim); line-height: 1.6;
}
.cookie-banner-desc a { color: var(--primary); text-decoration: underline; }

.cookie-banner-actions {
  display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap;
}

.cookie-btn {
  padding: 9px 20px; border-radius: 10px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.5px;
  transition: all var(--duration); white-space: nowrap;
}
.cookie-btn.accept {
  background: linear-gradient(135deg, #7b1ed4, #1a5fcc);
  color: #fff; box-shadow: 0 0 20px rgba(123,30,212,0.3);
}
.cookie-btn.accept:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(123,30,212,0.5); }
.cookie-btn.reject {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); color: var(--text-dim);
}
.cookie-btn.reject:hover { border-color: var(--border-hover); color: var(--text); }
.cookie-btn.customize {
  background: rgba(200,128,255,0.1);
  border: 1px solid rgba(200,128,255,0.3); color: var(--primary);
}
.cookie-btn.customize:hover { background: rgba(200,128,255,0.18); }

.cookie-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.cookie-modal-overlay.open { opacity: 1; pointer-events: all; }

.cookie-modal {
  background: rgba(8,6,25,0.98);
  border: 1px solid rgba(200,128,255,0.25);
  border-radius: var(--radius-lg);
  max-width: 560px; width: 100%;
  max-height: 80vh; overflow-y: auto;
  box-shadow: 0 0 80px rgba(200,128,255,0.1), 0 20px 60px rgba(0,0,0,0.7);
  transform: scale(0.95); transition: transform 0.3s var(--ease-back);
}
.cookie-modal-overlay.open .cookie-modal { transform: scale(1); }

.cookie-modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.cookie-modal-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.cookie-modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.05); color: var(--text-dim);
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.cookie-modal-close:hover { background: rgba(255,68,68,0.15); color: var(--danger); }

.cookie-modal-body { padding: 24px 28px; }

.cookie-category {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid rgba(200,128,255,0.08);
}
.cookie-category:last-child { border-bottom: none; }

.cookie-toggle { flex-shrink: 0; margin-top: 2px; }
.toggle-switch {
  position: relative; display: inline-block;
  width: 42px; height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(200,128,255,0.15);
  border: 1px solid var(--border); border-radius: 24px;
  transition: all 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  left: 3px; top: 3px;
  background: var(--text-muted);
  transition: all 0.3s var(--ease-back);
}
.toggle-switch input:checked + .toggle-slider {
  background: rgba(200,128,255,0.3); border-color: var(--primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px); background: var(--primary);
  box-shadow: 0 0 8px rgba(200,128,255,0.5);
}
.toggle-switch input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

.cookie-cat-info { flex: 1; }
.cookie-cat-name {
  font-size: 0.88rem; font-weight: 700; color: var(--text);
  margin-bottom: 4px; display: flex; align-items: center; gap: 8px;
}
.cat-required-tag {
  font-size: 0.6rem; font-weight: 700; padding: 1px 6px;
  border-radius: 5px; background: rgba(0,248,128,0.1);
  color: var(--success); border: 1px solid rgba(0,248,128,0.2);
  text-transform: uppercase; letter-spacing: 1px;
}
.cookie-cat-desc { font-size: 0.78rem; color: var(--text-dim); line-height: 1.55; }

.cookie-modal-footer {
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end;
}

@media (max-width: 1024px) {
  .legal-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .legal-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cookie-banner-inner { flex-direction: column; align-items: flex-start; }
  .cookie-banner { bottom: 60px; } /* Lift banner above mobile bottom bar */
}
@media (max-width: 480px) {
  .legal-footer-grid { grid-template-columns: 1fr; }
}

/* Batch toggle button container */
.toggle-batch-btn {
  background: rgba(200, 128, 255, 0.06);
  border: 1px solid rgba(200, 128, 255, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: all 0.2s var(--ease);
}
.toggle-batch-btn:hover {
  background: rgba(200, 128, 255, 0.15);
}
.toggle-batch-btn.active {
  color: var(--secondary);
  border-color: rgba(0, 255, 255, 0.25);
  background: rgba(0, 255, 255, 0.08);
}
.toggle-batch-btn.active:hover {
  background: rgba(0, 255, 255, 0.18);
}
