/* -------------------------------------------------------------
 * AI BUILD ARENA - DESIGN SYSTEM & PRODUCT IDENTITY SPECIFICATION
 * Design Language: Future Intelligence (Editorial + Cinematic + Technical + Premium)
 * ------------------------------------------------------------- */

/* =============================================================
   01 — DESIGN TOKENS & SYSTEM PROPERTIES
   ============================================================= */
:root {
  /* Color Palette - Dark Premium Foundation */
  --bg-primary: #08090a;
  --bg-secondary: #0e1113;
  --bg-tertiary: #13171a;
  
  --surface: #171d21;
  --surface-elevated: #1e262b;
  --surface-hover: #263037;
  
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-subtle-hover: rgba(255, 255, 255, 0.08);
  --border-active: #4f46e5;
  --border-glow: rgba(99, 102, 241, 0.2);

  /* Accents & States */
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.4);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.2);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);
  --info: #3b82f6;

  /* Typography Scales */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;

  /* Elevation (Shadows & Layering) */
  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-medium: 0 12px 30px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.02);
  --shadow-high: 0 24px 60px -8px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-glow: 0 0 30px 0 rgba(99, 102, 241, 0.15);

  /* Animation Timings */
  --speed-fast: 150ms;
  --speed-standard: 300ms;
  --speed-slow: 500ms;
  --speed-dramatic: 800ms;
  
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Containers Max-Widths */
  --width-narrow: 640px;
  --width-reading: 800px;
  --width-standard: 1200px;
  --width-wide: 1440px;
  --width-full: 100vw;
}

/* =============================================================
   02 — BASE STYLES & RESET
   ============================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
}

.font-mono {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.sys-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  opacity: 0.8;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.hidden {
  display: none !important;
}

/* Custom Outlines/Focus States */
button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 4px;
}

/* =============================================================
   03 — ADVANCED BACKGROUNDS & LAYERS
   ============================================================= */
/* Subtle Technical Grid System */
.bg-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  pointer-events: none;
  z-index: 1;
}

/* Ultra-subtle noise texture */
.bg-noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 2;
}

/* Ambient Radial Glow Field */
.bg-radial-glows {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  transition: opacity 1s ease;
}

/* Interactive Cursor System */
.custom-cursor-dot,
.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity var(--speed-fast) var(--ease-out), transform 0.08s ease-out;
}

.custom-cursor-dot {
  width: 4px;
  height: 4px;
  background-color: var(--accent-cyan);
}

.custom-cursor-ring {
  width: 24px;
  height: 24px;
  border: 1px solid var(--accent-indigo);
  transition: opacity var(--speed-fast) var(--ease-out), width var(--speed-fast) var(--ease-out), height var(--speed-fast) var(--ease-out);
}

body.cursor-active .custom-cursor-dot,
body.cursor-active .custom-cursor-ring {
  opacity: 1;
}

body.cursor-hovering .custom-cursor-ring {
  width: 40px;
  height: 40px;
  border-color: var(--accent-cyan);
  background-color: rgba(6, 182, 212, 0.05);
}

/* Hide cursor on touch devices */
@media (max-width: 1024px) {
  .custom-cursor-dot,
  .custom-cursor-ring {
    display: none !important;
  }
  body {
    cursor: auto !important;
  }
}

/* =============================================================
   04 — HEADER, BRAND, & SCROLL JOURNEY BAR
   ============================================================= */
.global-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background-color: rgba(8, 9, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: var(--width-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-indigo);
  box-shadow: 0 0 10px var(--accent-indigo);
  animation: pulse-glow 2s infinite;
}

.brand-text {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Journey Scroll Navigation */
.journey-nav {
  display: flex;
  gap: 24px;
}

.nav-segment {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  padding: 6px 12px;
  position: relative;
  transition: color var(--speed-standard) var(--ease-out);
}

.nav-segment::after {
  content: '';
  position: absolute;
  bottom: -21px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent-cyan);
  transform: scaleX(0);
  transition: transform var(--speed-standard) var(--ease-out);
}

.nav-segment.active {
  color: #fff;
}

.nav-segment.active::after {
  transform: scaleX(1);
}

.system-status-indicators {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sound-toggle-btn, .focus-mode-toggle {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all var(--speed-fast) var(--ease-out);
}

.sound-toggle-btn:hover, .focus-mode-toggle:hover {
  color: #fff;
  border-color: var(--border-subtle-hover);
  background-color: rgba(255, 255, 255, 0.02);
}

.sound-toggle-btn.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.focus-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #475569;
  transition: background-color var(--speed-fast);
}

.focus-mode-toggle.active .focus-indicator {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.system-time {
  font-size: 0.75rem;
  color: #64748b;
  border-left: 1px solid var(--border-subtle);
  padding-left: 16px;
}

.api-mode-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.api-mode-indicator .mode-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.api-mode-indicator.live-mode {
  border-color: var(--success);
  color: #fff;
}

.api-mode-indicator.live-mode .mode-dot {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* =============================================================
   05 — PERSISTENT MISSION HUD
   ============================================================= */
.mission-hud-bar {
  position: fixed;
  top: 64px;
  left: 0;
  width: 100%;
  background-color: rgba(14, 17, 19, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 990;
  animation: slide-down 0.4s var(--ease-out);
  box-shadow: var(--shadow-subtle);
}

.hud-content {
  max-width: var(--width-wide);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse-glow-cyan 1.5s infinite;
}

.hud-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hud-info .sys-label {
  margin: 0;
}

.hud-mission-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
}

/* HUD Countdown Timer Grid */
.hud-timer-container {
  display: flex;
  align-items: center;
  font-size: 1.625rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.05em;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 16px;
}

.timer-digit-wrapper {
  display: flex;
  position: relative;
  overflow: hidden;
  height: 32px;
  width: 32px;
  justify-content: center;
}

.timer-digit-wrapper .digit {
  position: absolute;
  transition: transform var(--speed-standard) var(--ease-out), opacity var(--speed-standard);
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

.timer-divider {
  margin: 0 4px;
  color: rgba(255, 255, 255, 0.2);
  animation: pulse-blink 1s infinite steps(2, start);
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hud-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-subtle);
}

.hud-score-stat {
  display: flex;
  flex-direction: column;
}

.hud-score-stat .sys-label {
  margin: 0;
  font-size: 0.5625rem;
}

.hud-score-stat span:not(.sys-label) {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

/* Urgency Timer states */
.hud-timer-container.warning-state {
  border-color: var(--warning);
  color: var(--warning);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.hud-timer-container.danger-state {
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
  animation: timer-danger-shudder 0.2s infinite alternate;
}

/* =============================================================
   06 — HERO SECTION & PARALLAX
   ============================================================= */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px 24px;
  position: relative;
  z-index: 10;
}

.hero-container {
  width: 100%;
  max-width: var(--width-standard);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-metadata {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
  border: 1px solid var(--border-subtle);
  background-color: rgba(255, 255, 255, 0.01);
  padding: 8px 16px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}

.hero-metadata .sys-label {
  margin: 0;
}

.interactive-word-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.parallax-word {
  position: relative;
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  cursor: default;
  user-select: none;
}

.word-background {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.05);
}

.word-foreground {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: transform 0.1s ease-out;
}

.parallax-word:hover .word-foreground {
  transform: translate(6px, -6px);
  color: var(--accent-indigo);
  text-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
}

.hero-flow-arrow {
  color: rgba(255, 255, 255, 0.15);
  animation: float-vertical 2s infinite ease-in-out;
  margin: 10px 0;
}

.hero-narrative {
  max-width: var(--width-narrow);
  margin-bottom: 48px;
}

.hero-narrative .tagline {
  font-size: 1.125rem;
  line-height: 1.6;
  color: #94a3b8;
  font-weight: 300;
}

/* Magnetic Button CTA styles */
.hero-cta-wrapper {
  perspective: 1000px;
}

.magnetic-button {
  position: relative;
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-indigo);
  border-radius: 8px;
  color: #fff;
  padding: 16px 36px;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform var(--speed-standard) var(--ease-out), border-color var(--speed-standard);
}

.btn-glow-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%);
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity var(--speed-standard) var(--ease-out);
  pointer-events: none;
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  position: relative;
}

.btn-icon {
  transition: transform var(--speed-standard) var(--ease-out);
}

.magnetic-button:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.2);
}

.magnetic-button:hover .btn-glow-layer {
  opacity: 0.15;
}

.magnetic-button:hover .btn-icon {
  transform: translateX(4px);
}

.magnetic-button:active {
  transform: scale(0.96);
}

/* =============================================================
   07 — MISSIONS COMPONENT MATRIX
   ============================================================= */
.missions-section {
  padding: 120px 24px;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
}

.section-container {
  max-width: var(--width-standard);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 60px;
  max-width: var(--width-narrow);
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin-top: 4px;
}

.section-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #64748b;
  margin-top: 16px;
}

/* Technical Card Grid */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.mission-card {
  position: relative;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  height: 380px;
  cursor: pointer;
  transition: transform var(--speed-standard) var(--ease-out), border-color var(--speed-standard), box-shadow var(--speed-standard);
}

.card-inner {
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 5;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mission-status-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--accent-cyan);
}

.mission-card.locked .mission-status-tag {
  color: #64748b;
}

.mission-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 16px 0 8px 0;
}

.mission-brief {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #94a3b8;
  margin-bottom: 24px;
  flex-grow: 1;
}

.mission-stats-line {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  font-size: 0.75rem;
  color: #64748b;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-item .value {
  color: #fff;
  font-weight: 700;
}

/* Difficulty dots */
.difficulty-dots {
  display: flex;
  gap: 4px;
}

.difficulty-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
}

.difficulty-dots .dot.active {
  background-color: var(--accent-indigo);
  box-shadow: 0 0 6px var(--accent-indigo);
}

/* Progressive Hover Disclosure */
.card-reveal-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-tertiary);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateY(100%);
  transition: transform var(--speed-standard) var(--ease-out);
  z-index: 10;
  border-radius: 8px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.reveal-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  justify-content: space-between;
}

.reveal-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reveal-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--accent-indigo);
  letter-spacing: 0.1em;
}

.reveal-text {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #e2e8f0;
}

.btn-start-mission {
  background-color: #fff;
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 8px;
  transition: background-color var(--speed-fast), transform var(--speed-fast);
}

.btn-start-mission:hover {
  background-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.mission-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-high), var(--shadow-glow);
}

.mission-card:not(.locked):hover .card-reveal-content {
  transform: translateY(0);
}

.mission-card.locked {
  cursor: not-allowed;
  opacity: 0.6;
}

.mission-card.locked:hover {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.05);
}

.mission-card.locked .btn-start-mission {
  background-color: var(--surface);
  color: #475569;
  border: 1px solid var(--border-subtle);
  cursor: not-allowed;
}

/* =============================================================
   08 — WORKSPACE: PROMPT BATTLE ARENA
   ============================================================= */
.workspace-section {
  padding: 100px 24px;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
}

.workspace-container {
  max-width: var(--width-wide);
  margin: 0 auto;
}

.workspace-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 16px 24px;
}

.workspace-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.active-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-glow-success 1.5s infinite;
}

.workspace-title-area h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.workspace-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.workspace-divider {
  width: 1px;
  height: 16px;
  background-color: var(--border-subtle);
}

.workspace-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  border: 1px solid var(--border-subtle);
  border-radius: 0 0 8px 8px;
  background-color: var(--bg-tertiary);
  overflow: hidden;
}

.workspace-panel {
  padding: 32px;
}

.left-panel {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.panel-section {
  display: flex;
  flex-direction: column;
}

.panel-header-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-top: 4px;
}

.panel-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #94a3b8;
  margin-top: 8px;
}

.constraints-box {
  margin-top: 16px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 16px;
}

.constraints-box ul {
  list-style: none;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.constraints-box li {
  font-size: 0.8125rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.constraints-box li::before {
  content: '→';
  color: var(--accent-indigo);
  font-weight: 700;
}

/* Zero-To-Hero Experience Progress Visualizer styles */
.zero-to-hero-wrapper {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 24px;
}

.zth-progress-line-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 32px 0 24px 0;
}

.zth-progress-line-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-50%);
  z-index: 1;
}

.zth-progress-bar {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background-color: var(--accent-indigo);
  box-shadow: 0 0 10px var(--accent-indigo);
  transform: translateY(-50%);
  z-index: 2;
  width: 25%;
  transition: width var(--speed-slow) var(--ease-out);
}

.zth-milestone {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.milestone-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all var(--speed-standard) var(--ease-out);
}

.zth-milestone.active .milestone-dot {
  border-color: var(--accent-indigo);
  background-color: #fff;
  box-shadow: 0 0 12px var(--accent-indigo);
}

.milestone-label {
  font-size: 0.5625rem;
  font-weight: 700;
  color: #64748b;
  margin-top: 8px;
  letter-spacing: 0.05em;
  transition: color var(--speed-standard);
}

.zth-milestone.active .milestone-label {
  color: #fff;
}

.zth-info-text {
  font-size: 0.6875rem;
  color: #64748b;
  text-align: center;
}

.zth-info-text span {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Submission Area Checklist */
.submit-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.check-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #94a3b8;
  user-select: none;
}

.check-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 16px;
  width: 16px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  transition: all var(--speed-fast);
}

.check-container:hover input ~ .checkmark {
  border-color: var(--border-subtle-hover);
}

.check-container input:checked ~ .checkmark {
  background-color: var(--success);
  border-color: var(--success);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.check-container input:checked ~ .checkmark::after {
  display: block;
}

.check-container .checkmark::after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-container input:disabled ~ .checkmark {
  opacity: 0.5;
}

.btn-submit-build {
  background-color: var(--accent-indigo);
  border: 1px solid transparent;
  color: #fff;
  padding: 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--speed-standard) var(--ease-out);
}

.btn-submit-build:hover:not(:disabled) {
  background-color: rgba(99, 102, 241, 0.8);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

.btn-submit-build:disabled {
  background-color: var(--surface);
  color: #475569;
  border: 1px solid var(--border-subtle);
  cursor: not-allowed;
}

/* =============================================================
   09 — PROMPT EDITOR, VERSION TIMELINE, & SCORES
   ============================================================= */
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Prompt Editor Window styling */
.editor-window {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.editor-header {
  background-color: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.editor-title {
  font-size: 0.75rem;
  color: #64748b;
}

.version-badge {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--accent-indigo);
  background-color: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--accent-indigo-glow);
  padding: 2px 6px;
  border-radius: 4px;
}

.editor-body {
  display: flex;
  position: relative;
}

.line-numbers {
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  border-right: 1px solid var(--border-subtle);
  color: #334155;
  font-size: 0.8125rem;
  text-align: right;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.1);
}

.prompt-textarea {
  flex-grow: 1;
  background: none;
  border: none;
  resize: none;
  padding: 16px;
  color: #f1f5f9;
  font-size: 0.8125rem;
  line-height: 1.5;
  height: 160px;
  width: 100%;
}

.prompt-textarea:focus {
  outline: none;
}

.editor-footer {
  background-color: rgba(255, 255, 255, 0.01);
  border-top: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-count, .token-estimate {
  font-size: 0.6875rem;
  color: #475569;
}

.editor-footer .char-count span,
.editor-footer .token-estimate span {
  color: #94a3b8;
  font-weight: 700;
}

.btn-run-prompt {
  background-color: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #fff;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--speed-fast);
}

.btn-run-prompt:hover {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.btn-run-prompt:active {
  transform: scale(0.97);
}

/* Timeline V1-V4 Slider */
.version-timeline-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 16px;
}

.version-timeline-bar .sys-label {
  margin: 0;
}

.timeline-nodes {
  display: flex;
  gap: 12px;
  flex-grow: 1;
}

.timeline-node {
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: all var(--speed-fast);
}

.timeline-node .node-score {
  font-size: 0.6875rem;
  color: var(--accent-indigo);
}

.timeline-node:hover:not(.disabled) {
  border-color: var(--border-subtle-hover);
  color: #fff;
}

.timeline-node.active {
  border-color: var(--accent-indigo);
  color: #fff;
  background-color: rgba(99, 102, 241, 0.1);
}

.timeline-node.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Split Score Radial / Output Screen */
.output-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.output-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  height: 180px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.panel-tab-header {
  background-color: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 12px;
}

.tab-label {
  font-size: 0.625rem;
  color: #475569;
}

.output-display {
  padding: 12px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #cbd5e1;
  overflow-y: auto;
  flex-grow: 1;
}

/* AI Processing State Transition overlay */
.output-reveal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(14, 17, 19, 0.95);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.loading-state-pulse {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.intelligence-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan);
  animation: pulse-glow-cyan 1s infinite alternate;
}

.loading-status-text {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}

/* Score radial visual display */
.score-anatomy-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.score-visual-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 80px;
}

.score-radial-svg {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}

.score-radial-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.02);
  stroke-width: 6;
}

.score-radial-fill {
  fill: none;
  stroke: var(--accent-indigo);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--speed-slow) var(--ease-out);
}

.score-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.score-delta {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--success);
}

.score-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.625rem;
}

.metric-row .label {
  color: #475569;
  width: 110px;
}

.metric-row .bar {
  flex-grow: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 100px;
  margin: 0 8px;
  overflow: hidden;
}

.metric-row .fill {
  height: 100%;
  background-color: var(--accent-indigo);
  display: block;
  border-radius: 100px;
  transition: width var(--speed-slow) var(--ease-out);
}

.metric-row .val {
  color: #94a3b8;
  font-weight: 700;
}

/* =============================================================
   10 — SUBMISSION SUCCESS PAGE
   ============================================================= */
.submission-success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 9, 10, 0.9);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.3s ease;
}

.success-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--accent-indigo);
  border-radius: 8px;
  max-width: var(--width-narrow);
  width: 100%;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-high), var(--shadow-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scale-up 0.4s var(--ease-out);
}

.success-card h2 {
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: #fff;
  margin: 20px 0;
}

.success-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 24px;
  text-align: left;
}

.check-item {
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 12px;
}

.check-item .status-marker {
  color: var(--success);
  font-weight: 700;
}

.arena-alert {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.receipt-id {
  font-size: 0.6875rem;
  color: #475569;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 32px;
}

.btn-close-success {
  background-color: #fff;
  border: none;
  color: #000;
  font-weight: 700;
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  transition: all var(--speed-fast);
}

.btn-close-success:hover {
  background-color: var(--accent-indigo);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

/* =============================================================
   11 — COMPETE: LIVE LEADERBOARD & EVENT FEED
   ============================================================= */
.leaderboard-section {
  padding: 120px 24px;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
}

.arena-stats-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 32px;
  margin-top: 40px;
}

.stats-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 24px;
}

.leaderboard-panel {
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.pulse-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
}

.pulse-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--success);
  animation: pulse-glow-success 1.5s infinite;
}

/* Leaderboard FLIP animation list structure */
.leaderboard-table {
  display: flex;
  flex-direction: column;
  position: relative;
}

.table-row {
  display: grid;
  grid-template-columns: 80px 2fr 2fr 100px 100px;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  font-size: 0.8125rem;
  color: #cbd5e1;
  transition: transform var(--speed-standard) var(--ease-out), background-color var(--speed-fast);
}

.table-row.row-header {
  color: #475569;
  font-weight: 700;
  border-bottom: 2px solid var(--border-subtle);
}

.table-row:not(.row-header):hover {
  background-color: rgba(255, 255, 255, 0.01);
}

.col-rank {
  font-weight: 700;
}

.col-team {
  font-weight: 500;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-indicator {
  font-size: 0.5625rem;
  font-weight: 700;
  background-color: var(--accent-indigo);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.table-row.user-row {
  background-color: rgba(99, 102, 241, 0.02);
  border-left: 2px solid var(--accent-indigo);
}

.status-green {
  color: var(--success);
}

.status-yellow {
  color: var(--warning);
}

/* Sidebar Info Cards */
.stats-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.team-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.team-monogram {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--accent-indigo);
}

.team-meta h3 {
  font-size: 1rem;
  color: #fff;
}

.team-meta .sys-label {
  margin: 0;
  font-size: 0.625rem;
}

/* Orbital Team Roles Visualizer Diagram */
.role-diagram-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
}

.diagram-orbital {
  position: relative;
  width: 140px;
  height: 140px;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-center {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.05em;
}

.role-node {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all var(--speed-standard) var(--ease-out);
}

.role-node.active {
  border-color: var(--accent-cyan);
  color: #000;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.role-node.position-1 { top: -12px; left: calc(50% - 12px); }
.role-node.position-2 { right: -12px; top: calc(50% - 12px); }
.role-node.position-3 { bottom: -12px; left: calc(50% - 12px); }
.role-node.position-4 { left: -12px; top: calc(50% - 12px); }

.role-desc {
  font-size: 0.6875rem;
  color: #64748b;
  margin-top: 16px;
}

/* Event Feed log styles */
.feed-panel {
  display: flex;
  flex-direction: column;
}

.live-event-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 120px;
  overflow-y: hidden;
  margin-top: 16px;
}

.feed-item {
  font-size: 0.75rem;
  color: #94a3b8;
  animation: feed-item-slide 0.3s var(--ease-out);
}

.feed-item .time {
  color: #475569;
  margin-right: 8px;
}

/* =============================================================
   12 — RESULTS: EVALUATION JUDGE ARCHIVE & CERTIFICATE
   ============================================================= */
.results-section {
  padding: 120px 24px;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
}

.verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.verdict-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 32px;
}

.verdict-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.verdict-header h3 {
  font-size: 1.25rem;
  color: #fff;
}

.grade-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.category-score-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 8px;
}

.category-score-row .label {
  color: #94a3b8;
}

.category-score-row .score-val {
  color: #fff;
  font-weight: 700;
}

.verdict-summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-section h4 {
  font-size: 0.6875rem;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.summary-section p {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
}

/* Ceremony podium rankings list */
.awards-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.awards-header h3 {
  font-size: 1.25rem;
  color: #fff;
}

.awards-sequence-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.podium-item {
  display: grid;
  grid-template-columns: 48px 1fr 80px;
  padding: 12px 20px;
  border: 1px solid var(--border-subtle);
  background-color: rgba(255, 255, 255, 0.01);
  border-radius: 6px;
  align-items: center;
  font-size: 0.875rem;
  position: relative;
  overflow: hidden;
}

.podium-item.podium-1 {
  border-color: rgba(245, 158, 11, 0.3);
  background-color: rgba(245, 158, 11, 0.02);
}

.podium-item.podium-1::after {
  content: 'GOLD';
  position: absolute;
  right: -10px;
  top: -10px;
  transform: rotate(15deg);
  font-size: 0.5rem;
  background-color: var(--warning);
  color: #000;
  font-weight: 800;
  padding: 12px 16px 2px 16px;
}

.podium-item.podium-2 {
  border-color: rgba(99, 102, 241, 0.3);
  background-color: rgba(99, 102, 241, 0.02);
}

.podium-item.podium-3 {
  border-color: rgba(6, 182, 212, 0.3);
  background-color: rgba(6, 182, 212, 0.02);
}

.award-rank {
  font-weight: 800;
  font-size: 1.125rem;
}

.award-team {
  font-weight: 500;
  color: #fff;
}

.award-score {
  font-weight: 700;
  text-align: right;
  color: var(--accent-cyan);
}

.award-badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.badge-item {
  border: 1px dashed var(--border-subtle);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all var(--speed-standard) var(--ease-out);
}

.badge-item:hover {
  border-style: solid;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.05);
}

.badge-icon {
  font-size: 1.5rem;
}

.badge-name {
  font-size: 0.5625rem;
  font-weight: 700;
  color: #94a3b8;
}

/* Verifiable Cryptographic Certificate */
.certificate-section-wrapper {
  margin-top: 80px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 60px;
}

.section-sub-header h3 {
  font-size: 1.25rem;
  color: #fff;
}

.section-sub-header p {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 4px;
}

.certificate-canvas-container {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.certificate-frame {
  position: relative;
  background-color: #0c0e10;
  border: 1px solid #1f2937;
  width: 100%;
  max-width: 800px;
  padding: 48px;
  box-shadow: var(--shadow-high);
  overflow: hidden;
  transition: border-color var(--speed-slow);
}

.cert-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 20px 20px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.005) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.005) 1px, transparent 1px);
  pointer-events: none;
}

.cert-border-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cert-border-corner.top-left { top: 16px; left: 16px; border-right: none; border-bottom: none; }
.cert-border-corner.top-right { top: 16px; right: 16px; border-left: none; border-bottom: none; }
.cert-border-corner.bottom-left { bottom: 16px; left: 16px; border-right: none; border-top: none; }
.cert-border-corner.bottom-right { bottom: 16px; right: 16px; border-left: none; border-top: none; }

.cert-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cert-system-label {
  font-size: 0.5625rem;
  color: #475569;
}

.cert-branding {
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #fff;
}

.cert-body {
  padding: 48px 0;
  text-align: center;
}

.cert-subtitle {
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  color: var(--accent-indigo);
  text-transform: uppercase;
  font-weight: 700;
}

.cert-recipient-name {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 16px 0 24px 0;
  text-transform: uppercase;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  display: inline-block;
  padding-bottom: 8px;
  min-width: 300px;
}

.cert-statement {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 500px;
  margin: 0 auto;
}

.cert-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-meta-item {
  font-size: 0.6875rem;
  display: flex;
  gap: 12px;
}

.cert-meta-item .label {
  color: #475569;
}

.cert-meta-item .val {
  color: #fff;
  font-weight: 700;
}

.cert-qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-block-pattern {
  width: 48px;
  height: 48px;
  background-color: #fff;
  border: 4px solid #fff;
  /* Grid visual representation of QR block */
  background-image: 
    radial-gradient(circle, #000 25%, transparent 25%),
    radial-gradient(circle, #000 25%, transparent 25%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}

.qr-label {
  font-size: 0.5625rem;
  color: #475569;
}

.cert-action-controls {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 800px;
}

.cert-input-name {
  flex-grow: 1;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 12px 16px;
  color: #fff;
  font-size: 0.8125rem;
}

.cert-input-name:focus {
  border-color: var(--accent-indigo);
}

.btn-cert-action {
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--speed-fast);
}

.btn-cert-action:hover {
  background-color: var(--surface-hover);
  border-color: var(--accent-cyan);
}

/* =============================================================
   13 — TOAST / NOTIFICATION POPUPS
   ============================================================= */
.achievement-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  pointer-events: none;
}

.achievement-toast {
  background-color: var(--bg-secondary);
  border: 1px solid var(--success);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.15);
  border-radius: 6px;
  padding: 16px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 320px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.achievement-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.5rem;
}

.toast-content {
  display: flex;
  flex-direction: column;
}

.toast-content .sys-label {
  margin: 0;
  color: var(--success);
}

.toast-content h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  margin: 4px 0 2px 0;
}

.toast-content p {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.xp-gain {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--success);
  margin-top: 8px;
}

/* =============================================================
   14 — FLOATING TRAINER CONTROL HUD
   ============================================================= */
.trainer-hud {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1900;
  width: 300px;
  background-color: #0b0c0d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  box-shadow: var(--shadow-high);
  overflow: hidden;
  transition: max-height var(--speed-standard) var(--ease-out);
  max-height: 480px;
}

.trainer-hud.collapsed {
  max-height: 40px;
}

.trainer-header {
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.trainer-header .sys-label {
  margin: 0;
  color: #94a3b8;
}

.btn-collapse {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1rem;
  cursor: pointer;
}

.trainer-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trainer-desc {
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.4;
}

.trainer-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-label {
  font-size: 0.5625rem;
  color: #475569;
}

.btn-group-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.btn-trainer-action {
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 6px 2px;
  cursor: pointer;
  text-align: center;
  transition: all var(--speed-fast);
}

.btn-trainer-action:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-subtle-hover);
}

.trainer-status {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 10px;
  font-size: 0.625rem;
  color: #64748b;
}

.trainer-status span {
  color: var(--warning);
  font-weight: 700;
}

/* =============================================================
   15 — FOOTER
   ============================================================= */
.global-footer-branding {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 24px;
  color: #334155;
  font-size: 0.6875rem;
  z-index: 10;
  position: relative;
}

.footer-container {
  max-width: var(--width-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =============================================================
   16 — FOCUS MODE OVERRIDES
   ============================================================= */
body.focus-mode-active .global-header {
  opacity: 0.1;
  pointer-events: none;
  transition: opacity var(--speed-slow);
}

body.focus-mode-active .global-header:hover {
  opacity: 1;
  pointer-events: auto;
}

body.focus-mode-active .bg-noise-overlay,
body.focus-mode-active .bg-radial-glows {
  opacity: 0.2;
}

body.focus-mode-active .hero-section,
body.focus-mode-active .missions-section,
body.focus-mode-active .leaderboard-section,
body.focus-mode-active .results-section,
body.focus-mode-active .global-footer-branding {
  display: none !important;
}

body.focus-mode-active .workspace-section {
  padding-top: 140px;
}

body.focus-mode-active .workspace-grid {
  grid-template-columns: 1fr;
}

body.focus-mode-active .left-panel {
  border-right: none;
  border-bottom: 1px solid var(--border-subtle);
}

/* =============================================================
   17 — ANIMATION DIRECTIVES (KEYFRAMES)
   ============================================================= */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 10px var(--accent-indigo);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 20px var(--accent-indigo), 0 0 10px #fff;
  }
}

@keyframes pulse-glow-cyan {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 8px var(--accent-cyan);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 16px var(--accent-cyan);
  }
}

@keyframes pulse-glow-success {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 8px var(--success);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 16px var(--success);
  }
}

@keyframes pulse-blink {
  from { opacity: 1.0; }
  to { opacity: 0.0; }
}

@keyframes slide-down {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes feed-item-slide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scale-up {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float-vertical {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes timer-danger-shudder {
  0% { transform: scale(1) rotate(0); }
  100% { transform: scale(1.02) rotate(0.5deg); }
}

/* =============================================================
   18 — PRINT MEDIA CERTIFICATE RULES
   ============================================================= */
@media print {
  body * {
    visibility: hidden;
  }
  #certificateFrame, #certificateFrame * {
    visibility: visible;
  }
  #certificateFrame {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none;
    box-shadow: none;
  }
}

/* =============================================================
   19 — REDUCED MOTION SPECIFICATION
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  .bg-noise-overlay, .bg-grid-overlay, .bg-radial-glows {
    display: none !important;
  }
}

/* =============================================================
   20 — RESPONSIVE LAYOUT MATRIX
   ============================================================= */
/* Tablet scale adjustments (Max-width 1024px) */
@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .left-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .arena-stats-grid {
    grid-template-columns: 1fr;
  }
  .verdict-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile scale adjustments (Max-width: 768px) */
@media (max-width: 768px) {
  .journey-nav {
    display: none;
  }
  .system-time {
    display: none;
  }
  .interactive-word-grid {
    gap: 8px;
  }
  .parallax-word {
    font-size: clamp(2rem, 10vw, 5rem);
  }
  .hero-flow-arrow {
    display: none;
  }
  .output-score-grid {
    grid-template-columns: 1fr;
  }
  .certificate-frame {
    padding: 24px;
  }
  .cert-body {
    padding: 24px 0;
  }
  .footer-container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
