  :root {
    --cyan: #883CF0;
    --magenta: #7c3aed;
    --lime: #af62c8;
    --dark: #191127;
    --darker: #180f26;
    --card-bg: #23133a;
    --border: #3a1c63;
    --glow: 0 0 30px rgba(153, 0, 255, 0.15);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--dark);
    color: #c8d0e0;
    overflow-x: hidden;
    cursor: crosshair;
  }

  /* ===== GRID BACKGROUND ===== */
  .grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
      linear-gradient(rgba(153, 0, 255, 0.062) 1px, transparent 1px),
      linear-gradient(90deg, rgba(144, 0, 255, 0.066) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridShift 20s linear infinite;
  }
  @keyframes gridShift {
    0% { transform: translate(0,0); }
    100% { transform: translate(60px, 60px); }
  }

  .scanline {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.03) 2px,
      rgba(0,0,0,0.03) 4px
    );
  }

  /* ===== HEADER / HERO ===== */
  .hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
  }

  .hero-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--lime);
    border: 1px solid #3a1c63;
    padding: 0.4em 1.5em;
    margin-bottom: 2rem;
    animation: fadeSlideDown 0.8s ease-out;
  }

  .hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--cyan) 0%, #fff 40%, var(--magenta) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 60px rgba(149, 0, 255, 0.25));
    animation: fadeSlideUp 1s ease-out;
  }

  .hero-sub {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: rgba(200,208,224,0.6);
    max-width: 500px;
    line-height: 1.8;
    animation: fadeSlideUp 1.2s ease-out;
  }

  .hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    animation: fadeSlideUp 1.4s ease-out;
  }
  .hero-stats .stat {
    text-align: center;
  }
  .hero-stats .stat-val {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cyan);
  }
  .hero-stats .stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(200,208,224,0.4);
    margin-top: 0.3rem;
  }

  .scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: rgba(210, 228, 230, 0.4);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
  }
  .scroll-hint::after {
    content: '';
    display: block;
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, var(--cyan), transparent);
    margin: 0.5rem auto 0;
  }
  @keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-8px); }}

  @keyframes fadeSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); }}
  @keyframes fadeSlideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); }}

  /* ===== SECTION BASE ===== */
  section {
    position: relative;
    z-index: 2;
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .section-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--magenta);
    margin-bottom: 1rem;
  }

  .section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
  }

  .section-desc {
    font-size: 0.8rem;
    color: rgba(200,208,224,0.5);
    max-width: 600px;
    line-height: 1.8;
    margin-bottom: 3rem;
  }

  /* ===== ROBOT TYPES CARDS ===== */
  .types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .type-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .type-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0;
    transition: opacity 0.4s;
  }
  .type-card:hover {
    transform: translateY(-6px);
    border-color: #5e309d;
    box-shadow: var(--glow);
  }
  .type-card:hover::before { opacity: 1; }

  .type-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
  }
  .type-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.6rem;
  }
  .type-card p {
    font-size: 0.75rem;
    line-height: 1.7;
    color: rgba(200,208,224,0.5);
  }
  .type-card .tag {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lime);
    border: 1px solid #3a1c63;
    padding: 0.3em 0.8em;
    border-radius: 3px;
  }

  /* ===== INTERACTIVE TIMELINE ===== */
  .timeline {
    position: relative;
    padding-left: 3rem;
  }
  .timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--cyan), var(--magenta), var(--lime));
  }

  .tl-item {
    position: relative;
    margin-bottom: 3rem;
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    backdrop-filter: blur(20px);
    cursor: pointer;
    transition: all 0.3s ease;
  }
  .tl-item::before {
    content: '';
    position: absolute;
    left: -3.55rem;
    top: 1.8rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cyan);
    border: 2px solid var(--dark);
    box-shadow: 0 0 15px var(--cyan);
    transition: all 0.3s;
  }
  .tl-item:hover {
    border-color: #5e309d;
    transform: translateX(6px);
  }
  .tl-item:hover::before {
    transform: scale(1.4);
    background: var(--magenta);
    box-shadow: 0 0 20px var(--magenta);
  }
  .tl-year {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--cyan);
    letter-spacing: 0.15em;
    margin-bottom: 0.4rem;
  }
  .tl-item h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.5rem;
  }
  .tl-item p {
    font-size: 0.72rem;
    line-height: 1.7;
    color: rgba(200,208,224,0.5);
  }
  .tl-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, margin-top 0.3s ease;
    font-size: 0.7rem;
    color: rgba(200,208,224,0.4);
    line-height: 1.8;
  }
  .tl-item.active .tl-detail {
    max-height: 200px;
    margin-top: 0.8rem;
  }

  /* ===== ROBOT BUILDER (INTERACTIVE) ===== */
  .builder-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
  }
  @media (max-width: 768px) {
    .builder-container { grid-template-columns: 1fr; }
  }

  .builder-options { display: flex; flex-direction: column; gap: 1rem; }

  .option-group label {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 0.6rem;
  }

  .opt-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
  .opt-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    padding: 0.5em 1em;
    background: #1f1232;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #c8d0e0;
    cursor: pointer;
    transition: all 0.25s;
  }
  .opt-btn:hover { border-color: #5e309d; }
  .opt-btn.selected {
    background: #2a1647;
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(153, 0, 255, 0.1);
  }

  .builder-preview {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(20px);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }
  .builder-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(circle at 50% 120%, rgba(149, 0, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
  }

  .robot-display {
    font-size: 8rem;
    line-height: 1;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    filter: drop-shadow(0 0 30px rgba(144, 0, 255, 0.3));
  }
  .robot-display.pulse {
    animation: robotPulse 0.6s ease;
  }
  @keyframes robotPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
  }
  .robot-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    margin-top: 1rem;
  }
  .robot-spec {
    font-size: 0.65rem;
    color: rgba(200,208,224,0.4);
    margin-top: 0.5rem;
    line-height: 1.8;
  }
  .spec-bars {
    width: 100%;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    z-index: 1;
  }
  .spec-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }
  .spec-bar-label {
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(200,208,224,0.4);
    width: 65px;
    text-align: right;
    flex-shrink: 0;
  }
  .spec-bar-track {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
  }
  .spec-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 0 10px currentColor;
  }

  /* ===== QUIZ SECTION ===== */
  .quiz-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
  }
  .quiz-progress {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 2rem;
  }
  .quiz-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s;
  }
  .quiz-dot.done { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
  .quiz-dot.current { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); transform: scale(1.3); }

  .quiz-question {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 2rem;
    line-height: 1.6;
  }

  .quiz-options { display: flex; flex-direction: column; gap: 0.8rem; }
  .quiz-opt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    padding: 1em 1.5em;
    background: #1f1232;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #c8d0e0;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
  }
  .quiz-opt:hover { border-color: #5e309d; background: #2a1647; }
  .quiz-opt.correct {
    border-color: #77b255 !important;
    background: #77b25520 !important;
    color: #77b255;
  }
  .quiz-opt.wrong {
    border-color: #dc143c !important;
    background: #dc143c2b !important;
    color: #dc143c;
  }

  .quiz-result {
    display: none;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
  }
  .quiz-result.show { display: block; }
  .quiz-score {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .quiz-verdict {
    font-size: 0.9rem;
    color: #fff;
    margin-top: 0.5rem;
  }
  .quiz-restart {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    margin-top: 1.5rem;
    padding: 0.7em 2em;
    background: transparent;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.1em;
  }
  .quiz-restart:hover { background: #1f1232; }

  /* ===== LAWS SECTION ===== */
  .laws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }
  .law-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
  }
  .law-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow);
    border-color: #5e309d;
  }
  .law-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #2a1647, #684895);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.8rem;
  }
  .law-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: #fff;
    margin-bottom: 0.5rem;
  }
  .law-card p {
    font-size: 0.72rem;
    line-height: 1.8;
    color: rgba(200,208,224,0.5);
  }

  /* ===== FOOTER ===== */
  footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem;
    border-top: 1px solid var(--border);
  }
  footer .logo-sm {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.2em;
  }
  footer p {
    font-size: 0.6rem;
    color: rgba(200,208,224,0.3);
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
  }

  /* ===== OBSERVER FADE-IN ===== */
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ===== PARTICLES CANVAS ===== */
  #particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }