@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg-base: #0a0c10;
  --bg-surface: #111318;
  --bg-card: #16191f;
  --bg-hover: #1c2028;
  --border: #252932;
  --border-light: #2e3440;

  --accent: #6c8ef5;
  --accent-glow: rgba(108, 142, 245, 0.18);
  --accent-dim: #3d5abf;

  --green: #4ade80;
  --green-glow: rgba(74, 222, 128, 0.15);
  --red: #f87171;
  --red-glow: rgba(248, 113, 113, 0.15);
  --yellow: #fbbf24;
  --yellow-glow: rgba(251, 191, 36, 0.15);
  --purple: #a78bfa;
  --purple-glow: rgba(167, 139, 250, 0.15);
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.15);

  --text-primary: #f0f2f8;
  --text-secondary: #8b93a8;
  --text-muted: #555d70;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Noise overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo .logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {

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

  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

.nav-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Hero ── */
.hero {
  position: relative;
  text-align: center;
  padding: 100px 24px 60px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(108, 142, 245, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f0f2f8 0%, #8b93a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  font-weight: 400;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ── Section ── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}

/* ── Clip Grid ── */
.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.clip-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  display: block;
  color: inherit;
}

.clip-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-dim);
}

.clip-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-surface);
  overflow: hidden;
}

/* Thumbnail image */
.clip-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.clip-card:hover .clip-thumb-img {
  transform: scale(1.05);
}

/* Always-visible gradient + centered play button */
.clip-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.68) 0%,
    rgba(0, 0, 0, 0.12) 55%,
    transparent 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.clip-card:hover .clip-thumb-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.80) 0%,
    rgba(0, 0, 0, 0.28) 55%,
    rgba(0, 0, 0, 0.08) 100%
  );
}

.play-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  transform: scale(0.88);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.clip-card:hover .play-icon {
  transform: scale(1.05);
  background: rgba(108, 142, 245, 0.38);
  border-color: rgba(108, 142, 245, 0.65);
}


.clip-pause-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-light);
  color: var(--yellow);
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 4px;
}

.clip-body {
  padding: 20px;
}

.clip-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.clip-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.clip-models {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.model-pill {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.pill-llm {
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
}

.pill-vision {
  background: var(--purple-glow);
  border: 1px solid #6d52c8;
  color: var(--purple);
}

.pill-world {
  background: var(--cyan-glow);
  border: 1px solid #1a7a8a;
  color: var(--cyan);
}

.clip-arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 16px;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

.clip-card:hover .clip-arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}

/* ── How It Works ── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.how-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
}

.how-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.how-step h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.how-step p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.how-num {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ── Loading ── */
.loading-state {
  text-align: center;
  padding: 60px 24px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

footer a {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}

footer a:hover {
  text-decoration: underline;
}

/* ── Results Page ── */
.results-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color var(--transition);
}

.back-btn:hover {
  color: var(--accent);
}

/* Video player */
.video-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.video-container video {
  width: 100%;
  display: block;
}

.pause-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.pause-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.pause-overlay h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--yellow);
}

.pause-overlay p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Prediction form */
.prediction-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
}

.prediction-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prediction-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.prediction-textarea {
  width: 100%;
  min-height: 100px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  resize: vertical;
  transition: border-color var(--transition);
  outline: none;
}

.prediction-textarea:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.prediction-textarea::placeholder {
  color: var(--text-muted);
}

.reveal-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  box-shadow: 0 8px 24px rgba(108, 142, 245, 0.3);
}

.reveal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(108, 142, 245, 0.45);
}

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

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

/* Results panel */
.results-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeSlideUp 0.5s ease both;
}

.results-panel.visible {
  display: flex;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.result-card-header {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.result-card-header .result-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.result-card-header h4 {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

.result-card-header .model-name {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.result-card-body {
  padding: 20px 24px;
}

.result-prediction {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Unique card styles */
.card-user .result-card-header {
  background: rgba(251, 191, 36, 0.04);
}

.card-user .result-icon {
  background: var(--yellow-glow);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.card-truth .result-card-header {
  background: rgba(74, 222, 128, 0.04);
}

.card-truth .result-icon {
  background: var(--green-glow);
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.card-llm .result-card-header {
  background: rgba(108, 142, 245, 0.04);
}

.card-llm .result-icon {
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
}

.card-vision .result-card-header {
  background: rgba(167, 139, 250, 0.04);
}

.card-vision .result-icon {
  background: var(--purple-glow);
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.card-world .result-card-header {
  background: rgba(34, 211, 238, 0.04);
}

.card-world .result-icon {
  background: var(--cyan-glow);
  border: 1px solid rgba(34, 211, 238, 0.2);
}

/* Analysis card */
.analysis-card {
  background: linear-gradient(135deg, rgba(108, 142, 245, 0.05) 0%, rgba(167, 139, 250, 0.05) 100%);
  border: 1px solid rgba(108, 142, 245, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.analysis-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analysis-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Clip meta header */
.clip-meta-header {
  margin-bottom: 24px;
}

.clip-meta-header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}

.clip-meta-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 640px) {
  nav {
    padding: 0 20px;
  }

  .hero {
    padding: 60px 16px 40px;
  }

  .stats-row {
    gap: 24px;
  }

  footer {
    padding: 24px 20px;
    flex-direction: column;
    align-items: flex-start;
  }
}
