/* ── Reset & Variables ─────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cyan: #00d4ff;
  --cyan-rgb: 0, 212, 255;
  --cyan-dim: rgba(0, 212, 255, 0.15);
  --cyan-glow: 0 0 15px rgba(0, 212, 255, 0.4), 0 0 40px rgba(0, 212, 255, 0.15), 0 0 80px rgba(0, 212, 255, 0.05);
  --bg: #060610;
  --bg-card: rgba(14, 14, 26, 0.85);
  --bg-input: #0e0e1a;
  --text: #e4e4f0;
  --text-dim: #6e6e8a;
  --danger: #ff4466;
  --danger-rgb: 255, 68, 102;
  --success: #00ff88;
  --success-rgb: 0, 255, 136;
  --warning: #ffaa00;
  --radius: 16px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

/* ── Animated Background Layers ──────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(var(--cyan-rgb), 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--cyan-rgb), 0.06) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 25s linear infinite;
  will-change: transform;
}

/* Pause all background animations when tab is hidden (saves battery) */
body.page-hidden .bg-grid,
body.page-hidden .bg-grid::before,
body.page-hidden .bg-grid::after {
  animation-play-state: paused;
}

.bg-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    rgba(var(--cyan-rgb), 0.08) 0%,
    transparent 70%
  );
  animation: ambientPulse 8s ease-in-out infinite;
}

.bg-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  animation: scanlines 0.1s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes scanlines {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* ── Layout ──────────────────────────────────────── */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
  position: relative;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  text-align: center;
  margin-bottom: 3.5rem;
  animation: heroReveal 1s ease-out;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(-30px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.glitch {
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-shadow: var(--cyan-glow);
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.glitch::before {
  color: #ff0040;
  z-index: -1;
  animation: glitch1 3s infinite linear alternate-reverse;
}

.glitch::after {
  color: #0ff;
  z-index: -1;
  animation: glitch2 2s infinite linear alternate-reverse;
}

@keyframes glitch1 {
  0%, 90%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  92% { clip-path: inset(30% 0 40% 0); transform: translate(-4px, 2px); }
  94% { clip-path: inset(60% 0 10% 0); transform: translate(3px, -1px); }
  96% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 3px); }
  98% { clip-path: inset(50% 0 20% 0); transform: translate(4px, -2px); }
}

@keyframes glitch2 {
  0%, 88%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  90% { clip-path: inset(45% 0 25% 0); transform: translate(3px, 1px); }
  93% { clip-path: inset(15% 0 55% 0); transform: translate(-3px, -2px); }
  95% { clip-path: inset(70% 0 5% 0); transform: translate(2px, 3px); }
  97% { clip-path: inset(25% 0 50% 0); transform: translate(-4px, 1px); }
}

.subtitle {
  margin-top: 1rem;
  color: var(--text-dim);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  animation: fadeIn 1.2s ease-out 0.3s both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Input Tabs ──────────────────────────────────── */
.input-tabs {
  display: flex;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(var(--cyan-rgb), 0.15);
}

.input-tab {
  flex: 1;
  padding: 0.6rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.input-tab.active {
  background: rgba(var(--cyan-rgb), 0.1);
  color: var(--cyan);
}

.input-tab:hover:not(.active) {
  background: rgba(var(--cyan-rgb), 0.04);
}

/* ── URL Input ──────────────────────────────────── */
.url-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.url-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(var(--cyan-rgb), 0.25);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.92rem;
  font-family: var(--font);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.url-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.15);
}

.url-input::placeholder {
  color: var(--text-dim);
  opacity: 0.7;
}

.url-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  opacity: 0.7;
  text-align: center;
}

/* ── Dropzone ────────────────────────────────────── */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1.5rem;
  border: 2px dashed rgba(var(--cyan-rgb), 0.25);
  border-radius: var(--radius);
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.dropzone:hover {
  border-color: rgba(var(--cyan-rgb), 0.5);
  background: rgba(var(--cyan-rgb), 0.03);
}

.dropzone.dragover {
  border-color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.06);
  box-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.15), inset 0 0 20px rgba(var(--cyan-rgb), 0.03);
}

.dropzone-icon {
  color: var(--text-dim);
  transition: color 0.3s;
}

.dropzone:hover .dropzone-icon,
.dropzone.dragover .dropzone-icon {
  color: var(--cyan);
}

.dropzone-text {
  font-size: 0.92rem;
  color: var(--text-dim);
  text-align: center;
}

.dropzone-browse {
  color: var(--cyan);
  text-decoration: underline;
  cursor: pointer;
}

.dropzone-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  opacity: 0.7;
}

.screenshot-tip {
  font-size: 0.78rem;
  color: var(--warning);
  background: rgba(255, 170, 0, 0.08);
  border: 1px solid rgba(255, 170, 0, 0.2);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  margin-top: 0.75rem;
  line-height: 1.5;
}

.dropzone.hidden + .screenshot-tip {
  display: none;
}

/* ── Image Preview ───────────────────────────────── */
.image-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(var(--cyan-rgb), 0.15);
  border-radius: var(--radius);
  animation: fadeIn 0.3s ease-out;
}

.preview-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(var(--cyan-rgb), 0.1);
  flex-shrink: 0;
}

.preview-name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-remove {
  background: none;
  border: 1px solid rgba(var(--danger-rgb), 0.3);
  color: var(--danger);
  font-size: 1.1rem;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
}

.preview-remove:hover {
  background: rgba(var(--danger-rgb), 0.1);
  border-color: rgba(var(--danger-rgb), 0.5);
}

/* ── Input Section ───────────────────────────────── */
.input-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.8s ease-out 0.5s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Button ──────────────────────────────────────── */
.btn-analyze {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, var(--cyan), #0090cc);
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.35s;
}

.btn-analyze::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 60%
  );
  transform: rotate(45deg);
  animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

.btn-analyze:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(var(--cyan-rgb), 0.35), 0 0 15px rgba(var(--cyan-rgb), 0.2);
}

.btn-analyze:active {
  transform: translateY(-1px);
}

.btn-analyze:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-analyze:disabled::before {
  animation: none;
}

.btn-icon {
  display: flex;
  transition: transform 0.3s;
}

.btn-analyze:not(:disabled):hover .btn-icon {
  transform: rotate(15deg);
}

/* Loading spinner in button */
.btn-analyze .spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Progress Section ────────────────────────────── */
.progress-section {
  margin-bottom: 2.5rem;
  animation: fadeUp 0.4s ease-out;
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid rgba(var(--cyan-rgb), 0.08);
  color: var(--text-dim);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.step:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.step:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.step:only-child {
  border-radius: var(--radius);
}

.step + .step {
  border-top: none;
}

.step-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #2a2a40;
  flex-shrink: 0;
  transition: all 0.4s;
  position: relative;
}

.step.active {
  background: rgba(var(--cyan-rgb), 0.05);
  border-color: rgba(var(--cyan-rgb), 0.2);
  color: var(--text);
}

.step.active + .step {
  border-top-color: rgba(var(--cyan-rgb), 0.2);
}

.step.active .step-indicator {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan), 0 0 24px rgba(var(--cyan-rgb), 0.3);
  animation: pulseGlow 1.5s ease-in-out infinite;
}

.step.done {
  background: rgba(var(--success-rgb), 0.03);
  border-color: rgba(var(--success-rgb), 0.15);
  color: var(--success);
}

.step.done + .step {
  border-top-color: rgba(var(--success-rgb), 0.15);
}

.step.done .step-indicator {
  border-color: var(--success);
  background: var(--success);
  box-shadow: 0 0 8px rgba(var(--success-rgb), 0.4);
  animation: checkPop 0.4s ease-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); box-shadow: 0 0 12px var(--cyan), 0 0 24px rgba(var(--cyan-rgb), 0.3); }
  50% { transform: scale(1.2); box-shadow: 0 0 16px var(--cyan), 0 0 32px rgba(var(--cyan-rgb), 0.4); }
}

@keyframes checkPop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.step span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── Result Section ──────────────────────────────── */
.result-section {
  margin-bottom: 2rem;
}

.result-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--cyan-rgb), 0.12);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  animation: resultReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.5;
}

@keyframes resultReveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ── Gauge ────────────────────────────────────────── */
.gauge-container {
  position: relative;
  width: 190px;
  height: 190px;
}

.gauge {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(var(--cyan-rgb), 0.06);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 534.07;
  stroke-dashoffset: 534.07;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s;
  filter: drop-shadow(0 0 8px var(--cyan));
}

.gauge-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 900;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.gauge-unit {
  font-size: 1.1rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}

.gauge-label-outer {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  text-align: center;
  margin-top: -0.5rem;
}

/* ── Result Details ──────────────────────────────── */
.result-details {
  width: 100%;
}

.verdict {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  animation: verdictPop 0.5s ease-out 0.3s both;
}

@keyframes verdictPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.verdict.ai {
  background: rgba(var(--danger-rgb), 0.08);
  color: var(--danger);
  border: 1px solid rgba(var(--danger-rgb), 0.25);
  box-shadow: 0 0 20px rgba(var(--danger-rgb), 0.08);
}

.verdict.human {
  background: rgba(var(--success-rgb), 0.08);
  color: var(--success);
  border: 1px solid rgba(var(--success-rgb), 0.25);
  box-shadow: 0 0 20px rgba(var(--success-rgb), 0.08);
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.result-row.full {
  flex-direction: column;
  gap: 0.5rem;
}

.result-label {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.result-value {
  font-weight: 600;
  color: var(--text);
}

.result-text {
  color: var(--text);
  line-height: 1.7;
  font-size: 0.92rem;
  opacity: 0.9;
}

.indicator-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.indicator-list li {
  padding: 0.55rem 0.9rem;
  background: rgba(var(--cyan-rgb), 0.04);
  border-radius: 10px;
  font-size: 0.88rem;
  border-left: 3px solid rgba(var(--cyan-rgb), 0.5);
  transition: background 0.2s;
  animation: indicatorSlide 0.4s ease-out both;
}

.indicator-list li:hover {
  background: rgba(var(--cyan-rgb), 0.08);
}

@keyframes indicatorSlide {
  from { opacity: 0; transform: translateX(-15px); }
  to { opacity: 1; transform: translateX(0); }
}

/* stagger indicator animations via JS nth-child */
.indicator-list li:nth-child(1) { animation-delay: 0.1s; }
.indicator-list li:nth-child(2) { animation-delay: 0.2s; }
.indicator-list li:nth-child(3) { animation-delay: 0.3s; }
.indicator-list li:nth-child(4) { animation-delay: 0.4s; }
.indicator-list li:nth-child(5) { animation-delay: 0.5s; }
.indicator-list li:nth-child(6) { animation-delay: 0.6s; }

/* ── Error Section ───────────────────────────────── */
.error-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(var(--danger-rgb), 0.06);
  border: 1px solid rgba(var(--danger-rgb), 0.2);
  animation: shakeIn 0.5s ease-out;
}

@keyframes shakeIn {
  0% { opacity: 0; transform: translateX(-10px); }
  25% { transform: translateX(8px); }
  50% { transform: translateX(-5px); }
  75% { transform: translateX(3px); }
  100% { opacity: 1; transform: translateX(0); }
}

.error-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--danger-rgb), 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(var(--danger-rgb), 0); }
}

.error-card p {
  color: rgba(var(--danger-rgb), 0.9);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ── How It Works ────────────────────────────────── */
.how-it-works {
  margin-top: 4rem;
  margin-bottom: 3rem;
  animation: fadeIn 1s ease-out 0.6s both;
}

.how-it-works h3 {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid rgba(var(--cyan-rgb), 0.08);
  border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.3s;
}

.how-step:hover {
  border-color: rgba(var(--cyan-rgb), 0.25);
  transform: translateY(-2px);
}

.how-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(var(--cyan-rgb), 0.1);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  border: 1px solid rgba(var(--cyan-rgb), 0.25);
}

.how-step-content h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.how-step-content p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Platforms ────────────────────────────────────── */
.platforms {
  margin-top: 4rem;
  text-align: center;
  animation: fadeIn 1s ease-out 0.8s both;
}

.platforms h3 {
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.platform-icons {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.platform-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 500;
  transition: color 0.3s, transform 0.3s;
  cursor: default;
}

.platform-item:hover {
  color: var(--cyan);
  transform: translateY(-3px);
}

.platform-item svg {
  transition: filter 0.3s;
}

.platform-item:hover svg {
  filter: drop-shadow(0 0 8px rgba(var(--cyan-rgb), 0.5));
}

/* ── Consent Text ────────────────────────────────── */
.consent-text {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.consent-text a {
  color: var(--cyan);
  text-decoration: none;
  transition: opacity 0.3s;
}

.consent-text a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ── Result Feedback ─────────────────────────────── */
.result-feedback {
  margin-top: 1.5rem;
  text-align: center;
  animation: fadeIn 0.5s ease-out 0.8s both;
}

.result-feedback-title {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.result-feedback-thumbs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.thumb-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--cyan-rgb), 0.2);
  background: rgba(var(--cyan-rgb), 0.04);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.thumb-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.2);
}

.thumb-btn.selected {
  border-color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.15);
  color: var(--cyan);
  transform: scale(1.1);
}

.thumb-btn[data-vote="down"].selected {
  border-color: var(--danger);
  background: rgba(var(--danger-rgb), 0.1);
  color: var(--danger);
}

.result-feedback-form {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  animation: fadeIn 0.3s ease-out;
}

.result-feedback-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1.5px solid rgba(var(--cyan-rgb), 0.12);
  background: rgba(6, 6, 16, 0.8);
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font);
  outline: none;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.3s;
}

.result-feedback-form textarea:focus {
  border-color: rgba(var(--cyan-rgb), 0.4);
}

.result-feedback-form textarea::placeholder {
  color: var(--text-dim);
}

.result-feedback-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
  cursor: pointer;
}

.result-feedback-consent input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--cyan);
}

.result-feedback-consent a {
  color: var(--cyan);
  text-decoration: none;
}

.result-feedback-consent a:hover {
  text-decoration: underline;
}

.btn-feedback-send {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--cyan), #0090cc);
  color: #000;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s, opacity 0.3s;
  align-self: center;
}

.btn-feedback-send:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--cyan-rgb), 0.3);
}

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

.result-feedback-thanks {
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0;
  animation: fadeIn 0.3s ease-out;
}

/* ── Feedback Link ──────────────────────────────── */
.feedback-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
  margin-top: 0.25rem;
  font-family: var(--font);
}

.feedback-link:hover {
  color: var(--cyan);
}

.feedback-link svg {
  opacity: 0.6;
  transition: opacity 0.3s;
}

.feedback-link:hover svg {
  opacity: 1;
}

.error-feedback {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 0.75rem;
  padding: 0;
  font-size: 0.78rem;
  font-family: var(--font);
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
}

.error-feedback:hover {
  color: var(--cyan);
}

/* ── Feedback Modal ─────────────────────────────── */
.feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.25s ease-out;
}

.feedback-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #0e0e1a;
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2rem;
  animation: resultReveal 0.35s ease-out;
}

.feedback-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feedback-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1.5px solid rgba(var(--cyan-rgb), 0.12);
  background: rgba(6, 6, 16, 0.8);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.feedback-form textarea:focus {
  border-color: rgba(var(--cyan-rgb), 0.4);
  box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.1);
}

.feedback-form textarea::placeholder,
.feedback-form input::placeholder {
  color: var(--text-dim);
}

.feedback-form input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1.5px solid rgba(var(--cyan-rgb), 0.12);
  background: rgba(6, 6, 16, 0.8);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.feedback-form input:focus {
  border-color: rgba(var(--cyan-rgb), 0.4);
  box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.1);
}

.feedback-success {
  text-align: center;
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 1rem 0;
}

/* ── Toast Notification ─────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.75rem 1.25rem;
  background: rgba(14, 14, 26, 0.97);
  border: 1px solid rgba(var(--cyan-rgb), 0.3);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.82rem;
  font-family: var(--font);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  backdrop-filter: blur(10px);
  text-align: center;
  max-width: 90vw;
}

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

/* ── Legal Pages ─────────────────────────────────── */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  position: relative;
}

.legal-page h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.3);
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(var(--cyan-rgb), 0.1);
}

.legal-page p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.legal-page ul {
  list-style: none;
  margin-bottom: 0.75rem;
  padding-left: 0;
}

.legal-page ul li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.2rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  line-height: 1.7;
}

.legal-page ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.5;
}

.legal-page a {
  color: var(--cyan);
  text-decoration: none;
  transition: opacity 0.3s;
}

.legal-page a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s, transform 0.3s;
}

.back-link:hover {
  opacity: 0.8;
  transform: translateX(-3px);
}

/* ── Footer ──────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  border-top: 1px solid rgba(var(--cyan-rgb), 0.06);
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: color 0.3s;
}

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

.footer-credit a {
  color: var(--cyan);
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-credit a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.footer-powered {
  color: rgba(var(--cyan-rgb), 0.35);
}

.footer-disclaimer {
  max-width: 500px;
  margin: 0.5rem auto 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.65rem;
}

/* ── Auth Status Bar ─────────────────────────────── */
.auth-status {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(var(--cyan-rgb), 0.15);
  border-radius: 10px;
  z-index: 100;
  animation: fadeIn 0.3s ease-out;
}

.auth-status span {
  font-size: 0.78rem;
  color: var(--text-dim);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  background: none;
  border: 1px solid rgba(var(--danger-rgb), 0.3);
  color: var(--danger);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-logout:hover {
  background: rgba(var(--danger-rgb), 0.1);
  border-color: rgba(var(--danger-rgb), 0.5);
}

/* ── Ad Interstitial Overlay ────────────────────────── */
.ad-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.25s ease-out;
}

.ad-interstitial {
  width: 100%;
  max-width: 480px;
  background: #0e0e1a;
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  border-radius: var(--radius);
  overflow: hidden;
}

.ad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(var(--cyan-rgb), 0.1);
}

.ad-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ad-close {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ad-close:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ad-close:not(:disabled):hover {
  background: rgba(var(--cyan-rgb), 0.1);
  color: var(--text);
  border-color: rgba(var(--cyan-rgb), 0.4);
}

.ad-content {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ad-timer {
  text-align: center;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Auth Modal ─────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.25s ease-out;
}

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #0e0e1a;
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2rem;
  animation: resultReveal 0.35s ease-out;
}

.auth-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}

.auth-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.auth-close:hover {
  color: var(--text);
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(var(--cyan-rgb), 0.15);
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.auth-tab.active {
  background: rgba(var(--cyan-rgb), 0.1);
  color: var(--cyan);
}

.auth-tab:hover:not(.active) {
  background: rgba(var(--cyan-rgb), 0.04);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-form input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1.5px solid rgba(var(--cyan-rgb), 0.12);
  background: rgba(6, 6, 16, 0.8);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-form input:focus {
  border-color: rgba(var(--cyan-rgb), 0.4);
  box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.1);
}

.auth-form input::placeholder {
  color: var(--text-dim);
}

.btn-auth-submit {
  padding: 0.85rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--cyan), #0090cc);
  color: #000;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--cyan-rgb), 0.3);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(var(--cyan-rgb), 0.1);
}

.auth-divider span {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 500;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.8rem;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-google:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-error {
  margin-top: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: rgba(var(--danger-rgb), 0.08);
  border: 1px solid rgba(var(--danger-rgb), 0.2);
  color: var(--danger);
  font-size: 0.8rem;
  text-align: center;
  animation: shakeIn 0.4s ease-out;
}

/* ── Usage Counter ──────────────────────────────────── */
.usage-counter {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cyan);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(var(--cyan-rgb), 0.06);
  border: 1px solid rgba(var(--cyan-rgb), 0.12);
  animation: fadeIn 0.3s ease-out;
}

.usage-counter.depleted {
  color: var(--warning);
  background: rgba(255, 170, 0, 0.06);
  border-color: rgba(255, 170, 0, 0.15);
}

/* ── Cookie Banner ──────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 1.25rem 1.5rem;
  background: rgba(14, 14, 26, 0.97);
  border-top: 1px solid rgba(var(--cyan-rgb), 0.15);
  backdrop-filter: blur(12px);
  animation: cookieSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cookieSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-content {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cookie-banner-text {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.cookie-banner-text a {
  color: var(--cyan);
  text-decoration: none;
}

.cookie-banner-text a:hover {
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.btn-cookie-accept {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--cyan), #0090cc);
  color: #000;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  white-space: nowrap;
}

.btn-cookie-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--cyan-rgb), 0.3);
}

.btn-cookie-reject {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: 1.5px solid rgba(var(--cyan-rgb), 0.3);
  background: transparent;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-cookie-reject:hover {
  background: rgba(var(--cyan-rgb), 0.08);
  border-color: var(--cyan);
}

.btn-cookie-edit {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--text-dim), 0.3);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-cookie-edit:hover {
  color: var(--text);
  border-color: rgba(var(--text-dim), 0.5);
}

/* ── Cookie Settings Modal ──────────────────────── */
.cookie-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.25s ease-out;
}

.cookie-settings-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #0e0e1a;
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2rem;
  animation: resultReveal 0.35s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-settings-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}

.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(var(--cyan-rgb), 0.08);
}

.cookie-category:last-of-type {
  border-bottom: none;
  margin-bottom: 1.25rem;
}

.cookie-category-info {
  flex: 1;
  min-width: 0;
}

.cookie-category-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.cookie-category-info p {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.cookie-always-active {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  padding: 0.3rem 0.7rem;
  background: rgba(var(--success-rgb), 0.08);
  border: 1px solid rgba(var(--success-rgb), 0.2);
  border-radius: 6px;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(var(--cyan-rgb), 0.08);
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  border-radius: 24px;
  transition: background 0.3s, border-color 0.3s;
}

.cookie-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform 0.3s, background 0.3s;
}

.cookie-toggle input:checked + .cookie-slider {
  background: rgba(var(--cyan-rgb), 0.15);
  border-color: var(--cyan);
}

.cookie-toggle input:checked + .cookie-slider::before {
  transform: translateX(20px);
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.5);
}

.btn-cookie-save {
  width: 100%;
  padding: 0.85rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--cyan), #0090cc);
  color: #000;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
}

.btn-cookie-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--cyan-rgb), 0.3);
}

/* ── Utility ─────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  main {
    padding: 3rem 1.25rem 1.5rem;
  }

  .glitch {
    letter-spacing: 0.06em;
  }

  .platform-icons {
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .cookie-banner-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: center;
  }

  .cookie-settings-modal {
    padding: 2rem 1.25rem 1.5rem;
  }

  .input-tab {
    font-size: 0.78rem;
    padding: 0.5rem;
  }

  .url-input {
    font-size: 0.85rem;
    padding: 0.75rem 0.85rem;
  }

  main {
    padding: 2rem 0.9rem 1.5rem;
    max-width: 100%;
  }

  .auth-status {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem 0.7rem;
    gap: 0.5rem;
  }

  .auth-status span {
    max-width: 120px;
    font-size: 0.7rem;
  }

  .auth-modal {
    padding: 2rem 1.25rem 1.5rem;
  }

  .hero {
    margin-bottom: 2.5rem;
  }

  .subtitle {
    font-size: 0.92rem;
  }

  .btn-analyze {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 12px;
  }

  .step {
    padding: 0.7rem 1rem;
    gap: 0.75rem;
  }

  .step span {
    font-size: 0.82rem;
  }

  .step:first-child {
    border-radius: 12px 12px 0 0;
  }

  .step:last-child {
    border-radius: 0 0 12px 12px;
  }

  .step:only-child {
    border-radius: 12px;
  }

  .result-card {
    padding: 1.5rem 1.1rem;
    border-radius: 12px;
  }

  .gauge-container {
    width: 155px;
    height: 155px;
  }

  .gauge-value {
    font-size: 2.4rem;
  }

  .gauge-label-outer {
    font-size: 0.78rem;
  }

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

  .verdict {
    font-size: 1.05rem;
    padding: 0.55rem 0.9rem;
  }

  .result-label {
    font-size: 0.72rem;
  }

  .result-value {
    font-size: 0.9rem;
  }

  .result-text {
    font-size: 0.85rem;
  }

  .indicator-list li {
    font-size: 0.82rem;
    padding: 0.45rem 0.7rem;
  }

  .error-card {
    padding: 0.9rem 1rem;
    border-radius: 12px;
  }

  .platform-icons {
    gap: 1.8rem;
  }

  .platform-item svg {
    width: 24px;
    height: 24px;
  }

  .platform-item {
    font-size: 0.7rem;
  }

  .dropzone {
    padding: 2rem 1rem;
  }

  .dropzone-text {
    font-size: 0.85rem;
  }

  .screenshot-tip {
    font-size: 0.72rem;
    padding: 0.5rem 0.75rem;
  }

  .preview-thumb {
    width: 40px;
    height: 40px;
  }

  .preview-name {
    font-size: 0.78rem;
  }
}

@media (max-width: 360px) {
  main {
    padding: 1.5rem 0.7rem 1rem;
  }

  .glitch {
    font-size: 2rem;
  }

  .gauge-container {
    width: 130px;
    height: 130px;
  }

  .gauge-value {
    font-size: 2rem;
  }

  .platform-icons {
    gap: 1.2rem;
  }
}

/* ── Splash Screen ──────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060610;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash.exit {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
}

.splash-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.splash-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Splash Screen Styles ──────────────────────── */
.splash-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--cyan), #00aaff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2rem;
}

.splash-model {
  margin-top: 2.5rem;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.splash-model.visible {
  opacity: 1;
  transform: scale(1);
}

.model-badge {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 20px rgba(var(--cyan-rgb), 0.5));
  animation: modelPulse 2s ease-in-out infinite;
}

@keyframes modelPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(var(--cyan-rgb), 0.5)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 30px rgba(var(--cyan-rgb), 0.8)); }
}

.model-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.3rem;
  text-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.5);
  letter-spacing: 1px;
}

.model-subtext {
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.9;
  letter-spacing: 0.5px;
}

.splash-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.splash-usecase {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0.8rem 0;
}

.splash-usecase.visible {
  opacity: 1;
  transform: translateX(0);
}

.usecase-icon {
  flex-shrink: 0;
}

.splash-dev-info {
  margin-top: 3rem;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-dev-info.visible {
  opacity: 1;
  transform: translateY(0);
}

.splash-dev-text {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.splash-dev-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 1px;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.3);
}

.splash-dev-love {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text);
}

.splash-heart {
  color: white;
  font-size: 1.8rem;
  font-weight: 900;
  text-shadow:
    0 0 20px rgba(255, 68, 102, 0.6),
    0 0 40px rgba(255, 68, 102, 0.4),
    0 0 60px rgba(255, 68, 102, 0.2);
  animation: heartBeat 1.5s ease-in-out infinite;
  margin: 0 4px;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  10% { transform: scale(1.2); }
  20% { transform: scale(1); }
  30% { transform: scale(1.15); }
  40% { transform: scale(1); }
}

/* ── Splash Progress Bar ──────────────────────── */
.splash-progress {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  text-align: center;
}

.splash-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(var(--cyan-rgb), 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.splash-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), #00aaff);
  border-radius: 2px;
  animation: progressFill 6.2s linear forwards;
  box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.5);
}

@keyframes progressFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes fadeInOut {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

.splash-progress-text {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1px;
  opacity: 0.8;
}

/* ── Language Switcher ──────────────────────── */
.language-switcher-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 1.5rem;
}

.lang-label {
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1.5px solid rgba(var(--cyan-rgb), 0.25);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.lang-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent, rgba(var(--cyan-rgb), 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.lang-btn:hover::before {
  transform: translateX(100%);
}

.lang-btn:hover {
  border-color: var(--cyan);
  box-shadow: 0 4px 20px rgba(var(--cyan-rgb), 0.3);
  transform: translateY(-2px);
}

#langFlag {
  font-size: 20px;
  filter: saturate(1.2);
}

#langCode {
  letter-spacing: 1.5px;
  font-size: 14px;
}

/* ── Prefers Reduced Motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
