/* ============================================================
   20KBSize — NEON DARK Design System
   Version: 2.0
   ============================================================ */

/* ============ RESET ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ============ TOKENS ============ */
:root {
  /* Soft Luxury Dark Theme (Eye-friendly, not pitch-black) */
  --bg: #0b0e17;
  --bg-elevated: #131724;
  --bg-card: rgba(23, 29, 45, 0.75);
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(139, 92, 246, 0.5);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Brand */
  --neon: #8b5cf6;
  --neon-bright: #a78bfa;
  --neon-glow: rgba(139, 92, 246, 0.5);
  --cyan: #06b6d4;
  --cyan-bright: #22d3ee;
  --cyan-glow: rgba(6, 182, 212, 0.4);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Sizes */
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --max-w: 1220px;

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Light theme (Apple & Stripe-grade high contrast and clarity) */
[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-hover: rgba(139, 92, 246, 0.6);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
}

[data-theme="light"] .upload-card,
[data-theme="light"] .feature-card,
[data-theme="light"] .article-paper,
[data-theme="light"] .sidebar-widget,
[data-theme="light"] .tool-app-card,
[data-theme="light"] .exam-matrix-card {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .mesh-bg {
  opacity: 0.25;
}

/* ============ BASE ============ */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .3s var(--ease), color .3s var(--ease);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, button, textarea { font-family: inherit; }

/* ============ MESH BACKGROUND ============ */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: orbFloat 20s ease-in-out infinite;
}

.mesh-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  top: -200px; left: -100px;
  animation-delay: 0s;
}

.mesh-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #22d3ee, transparent 70%);
  bottom: -150px; right: -100px;
  animation-delay: -7s;
}

.mesh-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #ec4899, transparent 70%);
  top: 40%; left: 40%;
  opacity: 0.25;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(80px, -60px) scale(1.15); }
  66% { transform: translate(-60px, 60px) scale(0.95); }
}

.mesh-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

[data-theme="light"] .mesh-orb { opacity: 0.25; }

/* ============ NOISE ============ */
.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)'/%3E%3C/svg%3E");
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(6, 6, 10, 0.7);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .site-header {
  background: rgba(247, 247, 251, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  border-radius: 9px;
  color: #fff;
  box-shadow: 0 0 20px var(--neon-glow);
  transition: transform .3s var(--ease-out);
}

.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }

.logo-mark svg { width: 18px; height: 18px; }

.logo-text { color: var(--text); }
.logo-accent {
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--cyan));
  transition: width .3s var(--ease-out);
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: all .2s;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.theme-toggle svg { width: 18px; height: 18px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s var(--ease);
  white-space: nowrap;
}

.btn-glow {
  background: linear-gradient(135deg, var(--neon), #6d28d9);
  color: #fff;
  box-shadow: 0 0 20px var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  color: #fff;
  box-shadow: 0 4px 20px var(--neon-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--neon-glow);
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.btn-xl { padding: 14px 28px; font-size: 15px; }

/* ============ HERO ============ */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
  animation: fadeUp .6s var(--ease-out) both;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.hero-badge strong { color: var(--text); font-weight: 700; }

.hero-title {
  font-size: clamp(32px, 6vw, 68px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
  animation: fadeUp .6s .1s var(--ease-out) both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--neon) 0%, var(--cyan) 50%, var(--neon) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.underline-anim {
  position: relative;
  display: inline-block;
}

.underline-anim::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--neon), var(--cyan));
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  animation: underlineGrow .8s .6s var(--ease-out) forwards;
  box-shadow: 0 0 20px var(--neon-glow);
}

@keyframes underlineGrow {
  to { transform: scaleX(1); }
}

.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
  animation: fadeUp .6s .2s var(--ease-out) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ UPLOAD CARD ============ */
.upload-card {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  animation: fadeUp .6s .3s var(--ease-out) both;
}

.upload-card-glow {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-xl) + 2px);
  background: linear-gradient(135deg, var(--neon), var(--cyan), var(--neon));
  background-size: 200% auto;
  opacity: 0.4;
  filter: blur(20px);
  animation: gradientShift 6s ease infinite;
  z-index: -1;
}

#uploadForm {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  transition: border-color .3s;
}

#uploadForm:hover {
  border-color: var(--border-hover);
}

@media (max-width: 640px) {
  #uploadForm { padding: 20px; }
}

/* ============ DROP ZONE ============ */
.drop-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .3s var(--ease);
  background: rgba(139, 92, 246, 0.02);
  overflow: hidden;
}

.drop-zone:hover {
  border-color: var(--border-hover);
  background: rgba(139, 92, 246, 0.05);
}

.drop-zone.dragover {
  border-color: var(--neon);
  background: rgba(139, 92, 246, 0.1);
  border-style: solid;
  box-shadow: inset 0 0 60px var(--neon-glow);
}

.drop-zone.dragover .drop-icon-wrap {
  transform: scale(1.15) translateY(-4px);
  color: var(--neon-bright);
}

.drop-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}

.drop-zone:hover .drop-particles { opacity: 1; }

.drop-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--neon);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon);
  animation: floatParticle 4s ease-in-out infinite;
}

.drop-particles span:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.drop-particles span:nth-child(2) { top: 60%; left: 25%; animation-delay: .5s; }
.drop-particles span:nth-child(3) { top: 30%; right: 20%; animation-delay: 1s; }
.drop-particles span:nth-child(4) { bottom: 25%; right: 15%; animation-delay: 1.5s; }
.drop-particles span:nth-child(5) { top: 15%; right: 40%; animation-delay: 2s; }
.drop-particles span:nth-child(6) { bottom: 20%; left: 30%; animation-delay: 2.5s; }

@keyframes floatParticle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-20px) scale(1.5); opacity: 1; }
}

.drop-inner { position: relative; z-index: 1; }

.drop-icon-wrap {
  display: inline-grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(34, 211, 238, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  color: var(--neon-bright);
  transition: all .3s var(--ease-out);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.2);
}

.drop-icon { width: 36px; height: 36px; }

.drop-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text);
}

.drop-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.drop-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 20px;
}

.chip {
  padding: 3px 8px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 6px;
  color: var(--neon-bright);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.drop-hint-sep { color: var(--text-dim); }

/* ============ FILE INFO ============ */
.file-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-top: 16px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius);
  animation: fadeUp .4s var(--ease-out);
}

.file-info[hidden],
.file-info[style*="display: none"] {
  display: none !important;
}

.file-preview {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-meta {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.file-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.file-meta-row {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  align-items: center;
}

.file-size-badge {
  padding: 2px 8px;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 4px;
  color: var(--neon-bright);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.file-dims {
  font-family: 'JetBrains Mono', monospace;
}

.file-clear {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: all .2s;
  flex-shrink: 0;
}

.file-clear:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

/* ============ CONTROLS ============ */
.controls {
  display: none;
  margin-top: 24px;
}

.controls[style*="display: block"],
.controls.visible {
  display: block !important;
  animation: fadeUp .4s var(--ease-out);
}

.control-section { margin-bottom: 24px; }

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.control-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.label-icon { font-size: 16px; }

.control-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--neon-bright);
  padding: 4px 10px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 6px;
}

/* Presets */
.preset-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .preset-row { grid-template-columns: repeat(3, 1fr); }
}

.preset {
  padding: 12px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all .2s var(--ease);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.preset:hover {
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-2px);
}

.preset.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.2));
  border-color: var(--neon);
  color: var(--text);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.preset-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
}

.preset-unit {
  font-size: 10px;
  letter-spacing: 1px;
  opacity: 0.7;
  text-transform: uppercase;
}

/* Slider */
.slider-wrap { padding: 8px 0 4px; }

.neon-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--neon) 0%, var(--cyan) 100%);
  outline: none;
  cursor: pointer;
}

.neon-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--neon);
  cursor: grab;
  box-shadow: 0 0 20px var(--neon-glow);
  transition: transform .15s;
}

.neon-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.neon-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--neon);
  cursor: grab;
  box-shadow: 0 0 20px var(--neon-glow);
}

.slider-marks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 8px;
}

/* Custom input */
.custom-input-row {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.custom-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .2s;
}

.custom-input:focus-within {
  border-color: var(--neon);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.custom-prefix, .custom-suffix {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.custom-input input {
  width: 70px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* ============ LIVE METER ============ */
.meter-section {
  padding: 20px;
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.meter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.meter-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--neon-bright);
  border-radius: 4px;
  text-transform: uppercase;
  animation: pulse 2s ease-in-out infinite;
}

.size-meter-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}

.size-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon), var(--cyan));
  border-radius: 4px;
  transition: width .4s var(--ease-out);
  box-shadow: 0 0 15px var(--neon-glow);
  position: relative;
}

.size-meter-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5));
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.size-meter-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.meter-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.meter-stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.meter-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.meter-stat-value.highlight { color: var(--cyan); }
.meter-stat-value.success { color: var(--success); }

.meter-arrow {
  color: var(--neon);
  font-size: 18px;
  font-weight: 700;
  opacity: 0.5;
}

/* ============ SUBMIT BUTTON ============ */
.btn-compress {
  width: 100%;
  padding: 20px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.btn-compress-inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left .6s;
}

.btn-compress:hover:not(:disabled) .btn-shine { left: 100%; }

/* ============ TRUST ROW ============ */
.trust-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-item svg { color: var(--success); }

/* ============ STATS BAR ============ */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 60px;
  padding: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  animation: fadeUp .6s .4s var(--ease-out) both;
}

@media (max-width: 640px) {
  .stats-bar { flex-direction: column; gap: 20px; }
  .stat-divider { width: 60px; height: 1px; }
}

.stat-item { text-align: center; }

.stat-value {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  font-family: 'JetBrains Mono', monospace;
}

.stat-suffix { font-size: 18px; }

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ============ SECTIONS ============ */
.section {
  padding: 100px 0;
  position: relative;
}

.section-alt {
  background: rgba(20, 20, 30, 0.4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--neon-bright);
  margin-bottom: 12px;
  padding: 6px 14px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 100px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

/* ============ FEATURES GRID ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  position: relative;
  padding: 32px 26px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all .3s var(--ease-out);
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
}

.feature-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.feature-card:hover .feature-glow { opacity: 1; }

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(34, 211, 238, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 12px;
  color: var(--neon-bright);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.feature-icon svg { width: 22px; height: 22px; }

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ============ STEPS ============ */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .steps { flex-direction: column; gap: 20px; }
  .step-line { width: 2px; height: 40px; }
}

.step {
  flex: 1;
  text-align: center;
}

.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.9;
}

.step h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-muted);
  font-size: 14px;
}

.step-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--cyan));
  opacity: 0.4;
  border-radius: 1px;
}

/* ============ FAQ ============ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all .3s var(--ease);
}

.faq-item[open] {
  border-color: var(--border-hover);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.1);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  color: var(--text);
  transition: color .2s;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--neon-bright); }

.faq-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--neon);
  border-radius: 2px;
  transition: transform .3s var(--ease-out);
}

.faq-icon::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
}

.faq-icon::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
}

.faq-item[open] .faq-icon::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.faq-content {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  animation: fadeUp .3s var(--ease-out);
}

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  background: rgba(6, 6, 10, 0.5);
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .logo { margin-bottom: 12px; }

.footer-tagline {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px 0;
  transition: color .2s;
}

.footer-col a:hover { color: var(--neon-bright); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-made { font-family: 'JetBrains Mono', monospace; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--neon), var(--cyan));
  border-radius: 4px;
}

/* ============ SELECTION ============ */
::selection {
  background: var(--neon);
  color: #fff;
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .nav { display: none; }
  .btn-glow { padding: 9px 14px; font-size: 13px; }
  .hero { padding: 50px 0 40px; }
  .section { padding: 70px 0; }
  .stats-bar { margin-top: 40px; padding: 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .drop-zone { padding: 40px 16px; }
  .drop-title { font-size: 18px; }
  .size-meter-stats { grid-template-columns: 1fr; gap: 8px; }
  .meter-arrow { display: none; }
}

/* ============================================================
   MOBILE RESPONSIVE — Universal Fixes
   Version: 7
   ============================================================ */

/* ============ MOBILE MENU (Burger) ============ */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  background: rgba(20,20,30,0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  place-items: center;
  transition: all .2s;
  flex-shrink: 0;
}
.mobile-menu-btn:hover {
  border-color: var(--border-hover);
  color: var(--neon-bright);
}
.mobile-menu-btn svg { width: 20px; height: 20px; }

.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: rgba(10,10,15,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 24px;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
  animation: mobileSlideDown .25s cubic-bezier(.16,1,.3,1);
  max-height: calc(100vh - 68px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu a:hover,
.mobile-menu a:active {
  background: rgba(139,92,246,0.12);
  color: var(--neon-bright);
}
.mobile-menu a::after {
  content: '→';
  opacity: 0;
  transform: translateX(-8px);
  transition: all .2s;
}
.mobile-menu a:hover::after {
  opacity: 1;
  transform: translateX(0);
}
.mobile-cta {
  background: linear-gradient(135deg, #8b5cf6, #22d3ee) !important;
  color: #fff !important;
  text-align: center;
  margin-top: 12px;
  justify-content: center !important;
  box-shadow: 0 8px 24px rgba(139,92,246,0.4);
}
.mobile-cta::after { display: none !important; }

@keyframes mobileSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Body lock when menu open */
body.menu-open { overflow: hidden; }

/* ============================================================
   TABLET — max-width: 900px
   ============================================================ */
@media (max-width: 900px) {
  .container { padding: 0 20px !important; }
  .header-inner { gap: 12px; }
}

/* ============================================================
   MOBILE — max-width: 768px
   ============================================================ */
@media (max-width: 768px) {

  /* ============ HEADER ============ */
  .nav { display: none !important; }
  .mobile-menu-btn { display: grid !important; }
  .btn-glow { display: none !important; }
  .header-inner { gap: 8px !important; padding: 0 !important; }
  .site-header { padding: 12px 0 !important; }
  .logo { font-size: 17px !important; }
  .logo-mark { width: 28px !important; height: 28px !important; }
  .logo-mark svg { width: 16px !important; height: 16px !important; }
  .theme-toggle { width: 36px !important; height: 36px !important; }

  /* ============ CONTAINER ============ */
  .container { padding: 0 16px !important; }

  /* ============ HERO ============ */
  .hero { padding: 40px 0 40px !important; }
  .hero-badge {
    font-size: 11px !important;
    padding: 6px 12px !important;
    margin-bottom: 20px !important;
  }
  .hero-title {
    font-size: clamp(28px, 8vw, 40px) !important;
    letter-spacing: -0.035em !important;
    margin-bottom: 16px !important;
  }
  .hero-sub {
    font-size: 14px !important;
    margin-bottom: 32px !important;
    line-height: 1.6 !important;
  }

  /* ============ UPLOAD CARD ============ */
  .upload-card { margin: 0 !important; }
  #uploadForm {
    padding: 16px !important;
    border-radius: 20px !important;
  }
  .drop-zone {
    padding: 32px 16px !important;
    border-radius: 16px !important;
  }
  .drop-icon-wrap {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 14px !important;
  }
  .drop-icon { width: 26px !important; height: 26px !important; }
  .drop-title { font-size: 17px !important; }
  .drop-sub { font-size: 13px !important; margin-bottom: 18px !important; }
  .drop-hint { font-size: 11px !important; gap: 6px !important; }
  .chip { font-size: 10px !important; padding: 2px 6px !important; }
  .btn-xl { padding: 12px 22px !important; font-size: 14px !important; }

  /* File info */
  .file-info { padding: 12px !important; gap: 12px !important; }
  .file-preview { width: 44px !important; height: 44px !important; }
  .file-meta strong { font-size: 13px !important; }
  .file-meta-row { font-size: 11px !important; }

  /* Presets */
  .preset-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .preset { padding: 10px 6px !important; }
  .preset-num { font-size: 14px !important; }
  .preset-unit { font-size: 9px !important; }

  /* Slider */
  .slider-marks { font-size: 9px !important; }
  .custom-input-row { margin-top: 10px !important; }
  .custom-input { padding: 8px 12px !important; }
  .custom-input input { width: 60px !important; font-size: 13px !important; }
  .custom-prefix, .custom-suffix { font-size: 11px !important; }

  /* Meter */
  .meter-section { padding: 16px !important; }
  .meter-header { flex-wrap: wrap; gap: 6px; }
  .meter-label { font-size: 12px !important; }
  .size-meter-stats {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 6px !important;
  }
  .meter-arrow { display: none !important; }
  .meter-stat-value { font-size: 12px !important; }
  .meter-stat-label { font-size: 9px !important; }

  /* Compress Button */
  .btn-compress {
    padding: 16px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
  }
  .btn-compress-inner { gap: 8px !important; }
  .btn-compress-inner svg { width: 18px !important; height: 18px !important; }

  /* Trust */
  .trust-row {
    gap: 12px !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-top: 16px !important;
  }
  .trust-item { font-size: 11px !important; }

  /* Stats bar */
  .stats-bar {
    flex-direction: column !important;
    gap: 20px !important;
    padding: 24px 20px !important;
    margin-top: 40px !important;
    border-radius: 16px !important;
  }
  .stat-divider {
    width: 60px !important;
    height: 1px !important;
  }
  .stat-value { font-size: 26px !important; }
  .stat-label { font-size: 10px !important; }

  /* ============ SECTIONS ============ */
  .section { padding: 60px 0 !important; }
  .section-header { margin-bottom: 40px !important; }
  .section-tag { font-size: 10px !important; padding: 5px 12px !important; }
  .section-title {
    font-size: clamp(24px, 7vw, 32px) !important;
    margin-bottom: 12px !important;
  }
  .section-sub { font-size: 14px !important; }

  /* Features grid */
  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .feature-card {
    padding: 24px 20px !important;
    border-radius: 16px !important;
  }
  .feature-icon {
    width: 44px !important;
    height: 44px !important;
    margin-bottom: 14px !important;
  }
  .feature-icon svg { width: 20px !important; height: 20px !important; }
  .feature-card h3 { font-size: 17px !important; }
  .feature-card p { font-size: 13px !important; }

  /* Steps */
  .steps {
    flex-direction: column !important;
    gap: 16px !important;
  }
  .step-line {
    width: 2px !important;
    height: 40px !important;
  }
  .step { padding: 0 !important; }
  .step-num { font-size: 40px !important; margin-bottom: 12px !important; }
  .step h3 { font-size: 18px !important; }
  .step p { font-size: 13px !important; }

  /* FAQ */
  .faq-item { margin-bottom: 10px !important; }
  .faq-item summary {
    padding: 16px 18px !important;
    font-size: 14px !important;
    padding-right: 44px !important;
  }
  .faq-item summary::after {
    right: 18px !important;
    font-size: 20px !important;
  }
  .faq-content {
    padding: 0 18px 16px !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
  }

  /* ============ FOOTER ============ */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    text-align: center;
  }
  .footer-brand .logo {
    justify-content: center !important;
    margin-bottom: 16px !important;
  }
  .footer-col h4 { font-size: 12px !important; }
  .footer-col a { font-size: 13px !important; padding: 6px 0 !important; }
  .footer-bottom {
    flex-direction: column !important;
    gap: 10px !important;
    text-align: center !important;
    padding-top: 24px !important;
    font-size: 12px !important;
  }

  /* ============ BLOG LISTING ============ */
  .blog-hero {
    padding: 50px 0 40px !important;
    text-align: center !important;
  }
  .blog-hero-tag {
    font-size: 10px !important;
    padding: 5px 12px !important;
  }
  .blog-hero h1 {
    font-size: 30px !important;
    line-height: 1.15 !important;
    margin-bottom: 14px !important;
  }
  .blog-hero p {
    font-size: 14px !important;
    margin-bottom: 28px !important;
  }
  .blog-search input {
    padding: 14px 52px 14px 18px !important;
    font-size: 14px !important;
    border-radius: 14px !important;
  }
  .blog-search button {
    width: 36px !important;
    height: 36px !important;
    right: 6px !important;
  }

  /* Featured post */
  .featured-post {
    grid-template-columns: 1fr !important;
    border-radius: 18px !important;
    margin-bottom: 40px !important;
  }
  .featured-image {
    min-height: 200px !important;
  }
  .featured-body {
    padding: 24px 20px !important;
  }
  .featured-tag { font-size: 9px !important; padding: 4px 10px !important; }
  .featured-body h2 {
    font-size: 20px !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
  }
  .featured-body p { font-size: 13px !important; }
  .featured-meta { font-size: 12px !important; gap: 10px !important; }
  .featured-meta .avatar { width: 28px !important; height: 28px !important; font-size: 12px !important; }
  .featured-read { font-size: 12px !important; }

  /* Section title bar */
  .section-title-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 24px !important;
  }
  .section-title-bar h2 { font-size: 18px !important; }
  .section-title-bar h2 .count { font-size: 11px !important; padding: 2px 8px !important; }

  /* Posts grid */
  .posts-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin-bottom: 40px !important;
  }
  .post-card { border-radius: 14px !important; }
  .post-card-image { height: 180px !important; }
  .post-card-cat { font-size: 9px !important; padding: 3px 8px !important; top: 12px !important; left: 12px !important; }
  .post-card-body { padding: 20px !important; }
  .post-card h3 { font-size: 16px !important; margin-bottom: 8px !important; }
  .post-card p { font-size: 13px !important; margin-bottom: 14px !important; }
  .post-card-footer { font-size: 11px !important; padding-top: 12px !important; }

  /* Pagination */
  .pagination {
    padding: 30px 0 50px !important;
    gap: 4px !important;
  }
  .pagination a,
  .pagination span {
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
  }

  /* Empty state */
  .empty-blog {
    padding: 60px 20px !important;
    border-radius: 16px !important;
  }
  .empty-blog .icon { font-size: 56px !important; }
  .empty-blog h2 { font-size: 20px !important; }
  .empty-blog p { font-size: 14px !important; }

  /* ============ SINGLE POST ============ */
  .post-container { padding: 40px 18px 60px !important; }
  .breadcrumbs { font-size: 12px !important; margin-bottom: 20px !important; gap: 6px !important; }

  .post-header { margin-bottom: 28px !important; }
  .post-category {
    font-size: 10px !important;
    padding: 5px 12px !important;
    margin-bottom: 18px !important;
  }
  .post-header h1 {
    font-size: clamp(26px, 7vw, 32px) !important;
    line-height: 1.15 !important;
    margin-bottom: 18px !important;
  }
  .post-meta {
    gap: 12px !important;
    font-size: 12px !important;
    padding: 16px 0 !important;
    flex-wrap: wrap;
  }
  .post-meta .avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
  }
  .post-meta .author-info strong { font-size: 12px !important; }
  .post-meta .author-info span { font-size: 10px !important; }
  .post-meta .meta-item { font-size: 11px !important; }

  .post-featured {
    border-radius: 14px !important;
    margin-bottom: 28px !important;
  }

  /* Post content */
  .post-content {
    font-size: 16px !important;
    line-height: 1.7 !important;
  }
  .post-content h1 { font-size: 26px !important; margin: 36px 0 14px !important; }
  .post-content h2 {
    font-size: 22px !important;
    margin: 40px 0 14px !important;
  }
  .post-content h3 { font-size: 19px !important; margin: 32px 0 12px !important; }
  .post-content h4 { font-size: 17px !important; }
  .post-content p { margin-bottom: 18px !important; }
  .post-content ul,
  .post-content ol {
    padding-left: 22px !important;
    margin: 18px 0 24px !important;
  }
  .post-content li { margin-bottom: 10px !important; }
  .post-content blockquote {
    padding: 16px 16px 16px 40px !important;
    font-size: 15px !important;
    margin: 24px 0 !important;
    border-radius: 0 12px 12px 0 !important;
  }
  .post-content blockquote::before {
    left: 10px !important;
    font-size: 38px !important;
  }
  .post-content pre {
    padding: 14px !important;
    font-size: 12px !important;
    border-radius: 12px !important;
    margin: 20px 0 !important;
    overflow-x: auto;
  }
  .post-content code { font-size: 12px !important; padding: 2px 6px !important; }
  .post-content img {
    border-radius: 12px !important;
    margin: 20px 0 !important;
  }
  .post-content table {
    font-size: 13px !important;
    margin: 24px 0 !important;
  }
  .post-content th,
  .post-content td {
    padding: 10px 12px !important;
  }

  /* Share */
  .share-section {
    margin-top: 40px !important;
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }
  .share-section h3 { font-size: 12px !important; margin-bottom: 14px !important; }
  .share-buttons { gap: 8px !important; }
  .share-btn {
    padding: 10px 14px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
  }
  .share-btn svg { width: 14px !important; height: 14px !important; }

  /* Related */
  .related-section {
    margin-top: 50px !important;
    padding-top: 40px !important;
  }
  .related-section h2 {
    font-size: 20px !important;
    margin-bottom: 20px !important;
  }
  .related-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .related-card { border-radius: 12px !important; }
  .related-card-image { height: 140px !important; }
  .related-card-body { padding: 16px !important; }
  .related-card h3 { font-size: 15px !important; }
  .related-card p { font-size: 12px !important; }

  /* Back CTA */
  .back-cta { margin-top: 40px !important; }
  .back-cta a {
    padding: 12px 22px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }

  /* ============ RESULT PAGE ============ */
  .success-header { margin-bottom: 28px !important; }
  .success-checkmark {
    width: 72px !important;
    height: 72px !important;
    margin-bottom: 18px !important;
  }
  .success-checkmark svg { width: 34px !important; height: 34px !important; }
  .success-title { font-size: 26px !important; }
  .success-sub { font-size: 14px !important; }

  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 28px !important;
  }
  .stat-box { padding: 20px 16px !important; }
  .stat-box-value { font-size: 26px !important; }
  .stat-box-label { font-size: 10px !important; }

  .score-card {
    flex-direction: column !important;
    padding: 20px !important;
    gap: 16px !important;
    text-align: center !important;
  }
  .score-circle { width: 80px !important; height: 80px !important; }
  .score-value { font-size: 24px !important; }
  .score-grade { font-size: 16px !important; }
  .score-msg { font-size: 13px !important; }

  .comparison-section { padding: 20px 16px !important; border-radius: 16px !important; }
  .comparison-title { font-size: 14px !important; }
  .comparison-sub { font-size: 12px !important; }
  .compare-wrapper { border-radius: 10px !important; }
  .compare-handle::before {
    width: 36px !important;
    height: 36px !important;
    font-size: 15px !important;
  }
  .compare-label { font-size: 9px !important; padding: 4px 8px !important; }
  .image-info { font-size: 11px !important; gap: 10px !important; }

  .download-section { margin-bottom: 24px !important; }
  .btn-download {
    padding: 16px 24px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
    width: 100% !important;
    justify-content: center !important;
  }
  .btn-download svg { width: 18px !important; height: 18px !important; }

  .qr-share-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    margin-bottom: 24px !important;
  }
  .qr-card, .share-card { padding: 18px !important; }
  .qr-code-wrap img { width: 120px !important; height: 120px !important; }
  .qr-hint { font-size: 11px !important; }
  .share-buttons { grid-template-columns: 1fr 1fr !important; }

  .bottom-actions {
    flex-direction: column !important;
    margin-top: 24px !important;
    gap: 10px !important;
  }
  .btn-outline {
    padding: 12px 20px !important;
    font-size: 13px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  /* ============ ADMIN PANEL ============ */
  body.admin-body {
    grid-template-columns: 1fr !important;
  }
  .admin-sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    height: 60px !important;
    width: 100% !important;
    flex-direction: row !important;
    padding: 6px !important;
    border-top: 1px solid var(--border) !important;
    border-right: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    z-index: 200;
  }
  .sidebar-brand { display: none !important; }
  .nav-section { display: none !important; }
  .sidebar-nav {
    display: flex !important;
    flex-direction: row !important;
    gap: 2px !important;
    width: 100% !important;
  }
  .sidebar-nav a {
    flex-direction: column !important;
    padding: 6px 10px !important;
    font-size: 10px !important;
    gap: 2px !important;
    border-radius: 8px !important;
    min-width: 64px !important;
    text-align: center !important;
    justify-content: center !important;
  }
  .sidebar-nav a svg { width: 18px !important; height: 18px !important; }
  .sidebar-nav a span { font-size: 9px !important; }
  .sidebar-footer { display: none !important; }
  
  .admin-main { margin-bottom: 60px !important; }
  .admin-topbar {
    padding: 12px 16px !important;
    height: auto !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .topbar-title { font-size: 16px !important; }
  .topbar-actions { gap: 6px !important; flex-wrap: wrap; }
  .topbar-user { display: none !important; }
  .btn, .btn-primary { padding: 8px 14px !important; font-size: 12px !important; }
  .btn svg { width: 12px !important; height: 12px !important; }
  .admin-content { padding: 16px !important; }
  
  .edit-layout { grid-template-columns: 1fr !important; gap: 16px !important; }
  .form-row { grid-template-columns: 1fr !important; }
  .form-control { font-size: 14px !important; padding: 10px 12px !important; }
  
  .admin-table { font-size: 12px !important; }
  .admin-table th,
  .admin-table td { padding: 10px 12px !important; }
  .admin-table thead { display: none !important; }
  .admin-table tbody tr {
    display: block !important;
    margin-bottom: 12px !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    padding: 12px !important;
  }
  .admin-table td {
    display: block !important;
    padding: 4px 0 !important;
    border: none !important;
  }
  .admin-table td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--text-dim);
    margin-right: 6px;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .dash-card { padding: 16px !important; }
  .dash-card-value { font-size: 22px !important; }
  .dash-card-label { font-size: 10px !important; }
  .dash-card-icon { width: 36px !important; height: 36px !important; }
  
  .modal-content {
    min-width: auto !important;
    margin: 16px !important;
    padding: 20px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  
  .editor-bottombar { display: none !important; }
}

/* ============================================================
   EXTRA SMALL — max-width: 420px
   ============================================================ */
@media (max-width: 420px) {
  .container { padding: 0 14px !important; }
  .hero-title { font-size: 24px !important; }
  .hero-sub { font-size: 13px !important; }
  .drop-zone { padding: 24px 12px !important; }
  .drop-icon-wrap { width: 52px !important; height: 52px !important; }
  .drop-title { font-size: 15px !important; }
  .preset-row { grid-template-columns: repeat(2, 1fr) !important; }
  .preset { padding: 8px 4px !important; }
  .preset-num { font-size: 13px !important; }
  .custom-input input { width: 50px !important; }
  .stat-value { font-size: 22px !important; }
  .footer-grid { gap: 24px !important; }
  .pagination a,
  .pagination span {
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
  }
  .post-header h1 { font-size: 22px !important; }
  .post-content h2 { font-size: 20px !important; }
  .post-content h3 { font-size: 17px !important; }
  .post-content { font-size: 15px !important; }
  .share-btn { padding: 9px 12px !important; font-size: 11px !important; }
  .btn-download { padding: 14px 18px !important; font-size: 14px !important; }
  .dashboard-grid { grid-template-columns: 1fr !important; }
  .sidebar-nav a { min-width: 56px !important; padding: 6px 8px !important; }
}

/* ============================================================
   TOUCH — Optimize for touch devices
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  .post-card:hover,
  .feature-card:hover,
  .btn:hover,
  .btn-primary:hover,
  .btn-glow:hover { transform: none !important; }
  
  .post-card:active,
  .feature-card:active { transform: scale(0.98) !important; }
  
  /* Bigger tap targets */
  .nav-link, .footer-col a, .faq-item summary { 
    min-height: 44px; 
    display: flex; 
    align-items: center; 
  }
}

/* ============================================================
   ULTRA SUPER PREMIUM: UNIVERSAL 2-COLUMN TOOL LAYOUT & SIDEBAR
   ============================================================ */
.tool-page-wrapper {
  max-width: 1220px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: start;
}

.tool-main-column {
  min-width: 0;
}

.tool-sidebar-column {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  transition: all .2s ease;
}
[data-theme="light"] .sidebar-widget {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 18px rgba(0,0,0,0.04);
}

.widget-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.widget-title svg {
  width: 16px;
  height: 16px;
  color: var(--neon-bright);
}

/* Sidebar Tool Items */
.sidebar-tools-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sidebar-tool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  transition: all .15s;
}
[data-theme="light"] .sidebar-tool-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.sidebar-tool-item:hover,
.sidebar-tool-item.active {
  background: rgba(139,92,246,0.1);
  border-color: var(--neon-bright);
  transform: translateX(3px);
  color: var(--neon-bright);
}
.sidebar-tool-icon {
  font-size: 17px;
  width: 22px;
  text-align: center;
}
.sidebar-tool-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan-bright, #22d3ee);
  background: rgba(6,182,212,0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Checklist widget */
.sidebar-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.sidebar-checklist li strong {
  color: var(--text);
}
.sidebar-checklist li .chk-icon {
  color: #22c55e;
  font-weight: 800;
  flex-shrink: 0;
}

/* Official Exam Specification Matrix Table */
.exam-matrix-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  margin: 40px 0;
  overflow: hidden;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 16px;
}
.exam-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.exam-spec-table th {
  background: rgba(139,92,246,0.12);
  color: var(--text);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
[data-theme="light"] .exam-spec-table th {
  background: #f1f5f9;
  color: #0f172a;
}
.exam-spec-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
[data-theme="light"] .exam-spec-table td {
  color: #334155;
}
.exam-spec-table tr:hover td {
  background: rgba(139,92,246,0.04);
}
.exam-spec-table td strong {
  color: var(--text);
}
[data-theme="light"] .exam-spec-table td strong {
  color: #0f172a;
}
.badge-tag-sm {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(34,197,94,0.12);
  color: #22c55e;
}

/* Step-by-Step HowTo Grid */
.howto-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0 40px;
}
.howto-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  transition: all .2s;
}
.howto-step-card:hover {
  border-color: var(--neon);
  transform: translateY(-2px);
}
.howto-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.howto-step-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.howto-step-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Rejection Matrix Card */
.rejection-matrix-card {
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 20px;
  padding: 28px;
  margin: 40px 0;
}

/* Universal Header Reader Theme Toggle */
.reader-theme-toggle {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}
[data-theme="light"] .reader-theme-toggle {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}
.reader-theme-toggle:hover {
  border-color: var(--neon-bright);
}

@media (max-width: 992px) {
  .tool-page-wrapper {
    grid-template-columns: 1fr;
    padding: 24px 16px 60px;
    gap: 28px;
  }
  .tool-sidebar-column {
    position: static;
  }
}
