/* ============================================
   双高胎 - 超越玩家 | 像素风粉丝站
   Retro Arcade / Pixel Art Style
   ============================================ */

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

:root {
  --pixel-green: #2ecc40;
  --pixel-blue: #0074D9;
  --pixel-dark-blue: #1a2a4a;
  --pixel-cyan: #39cccc;
  --pixel-orange: #ff851b;
  --pixel-yellow: #ffdc00;
  --pixel-red: #ff4136;
  --pixel-pink: #ff6b9d;
  --pixel-bg: #0f0f23;
  --pixel-bg-light: #1a1a3e;
  --pixel-white: #f0f0f0;
  --pixel-gray: #888;
  --pixel-border: 4px;
  --arcade-shadow: 0 0 0 var(--pixel-border) #000,
                   0 0 0 calc(var(--pixel-border) * 2) var(--pixel-blue);
  --font-pixel: 'Press Start 2P', monospace;
  --font-cn: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

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

body {
  background-color: var(--pixel-bg);
  color: var(--pixel-white);
  font-family: var(--font-cn);
  overflow-x: hidden;
  position: relative;
}

/* pixel font for English text */
.section-title, .stage-badge, .hero-title, .nav-logo, .nav-stats, .nav-label, .nav-value,
.hero-prompt, .vs-text, .work-score, .timeline-year, .footer-title,
.footer-pixel, .card-corner, .en-name {
  font-family: var(--font-pixel);
}

/* --- Utility --- */
.blink {
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* --- Top Nav (Game HUD) --- */
.game-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.92) 0%, rgba(15, 15, 35, 0.88) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--pixel-green), var(--pixel-cyan), var(--pixel-yellow), var(--pixel-orange), var(--pixel-green)) 1;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  flex: 1;
}

.nav-col-center {
  align-items: center;
  text-align: center;
}

.nav-col-right {
  align-items: flex-end;
  flex-direction: row;
  justify-content: flex-end;
  gap: 24px;
  flex: 1;
}

.nav-hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.nav-label {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--pixel-gray);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-logo {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--pixel-yellow);
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(255, 220, 0, 0.5), 2px 2px 0 rgba(0,0,0,0.6);
}

.nav-world-icon {
  font-size: 16px;
  animation: navBounce 2s ease-in-out infinite;
}

@keyframes navBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.nav-value {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}

.nav-hearts {
  font-size: 13px;
  letter-spacing: 2px;
  filter: drop-shadow(0 0 4px rgba(255, 65, 54, 0.6));
}

#worldIndicator {
  font-size: 12px;
  color: var(--pixel-green);
  text-shadow: 0 0 8px rgba(46, 204, 64, 0.5);
  transition: color 0.3s, text-shadow 0.3s;
}

#coinCounter {
  transition: transform 0.2s;
}

/* Nav scroll progress bar */
.nav-progress-bar {
  height: 2px;
  background: rgba(255,255,255,0.05);
}

.nav-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pixel-green), var(--pixel-cyan), var(--pixel-yellow));
  transition: width 0.1s;
}

.nav-stats {
  display: flex;
  gap: 20px;
  font-size: 9px;
  color: var(--pixel-green);
}

/* --- Section Base --- */
.section {
  padding: 100px 20px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.stage-badge {
  display: inline-block;
  background: var(--pixel-orange);
  color: #000;
  font-size: 10px;
  padding: 6px 16px;
  margin-bottom: 16px;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
}

.section-title {
  font-size: 20px;
  color: var(--pixel-yellow);
  margin-bottom: 10px;
  letter-spacing: 2px;
  text-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}

.section-subtitle {
  color: var(--pixel-gray);
  font-size: 14px;
}

/* ===========================
   STAGE 1: HERO
   =========================== */
.hero-section {
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-arcade {
  width: 100%;
  max-width: 700px;
}

.pixel-border-box {
  border: 4px solid var(--pixel-blue);
  box-shadow: var(--arcade-shadow);
  border-radius: 8px;
  overflow: hidden;
  background: var(--pixel-dark-blue);
}

.arcade-screen {
  position: relative;
  background: linear-gradient(135deg, #0a1628, #162444);
  padding: 60px 40px;
  text-align: center;
  overflow: hidden;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
}

.hero-title {
  margin-bottom: 24px;
}

.title-line1 {
  display: block;
  font-size: 48px;
  font-family: var(--font-cn);
  font-weight: 900;
  background: linear-gradient(to bottom, var(--pixel-yellow), var(--pixel-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(3px 3px 0 rgba(0,0,0,0.4));
  margin-bottom: 8px;
}

.title-line2 {
  display: block;
  font-size: 14px;
  color: var(--pixel-cyan);
  letter-spacing: 8px;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--pixel-white);
  margin-bottom: 8px;
  letter-spacing: 4px;
}

.hero-desc {
  font-size: 13px;
  color: var(--pixel-gray);
  margin-bottom: 30px;
}

.hero-prompt {
  font-size: 11px;
  color: var(--pixel-green);
  letter-spacing: 3px;
}

/* Arcade controls */
.arcade-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: linear-gradient(to bottom, #1e3a6e, #162c5a);
  border-top: 3px solid #2a4a8a;
}

.joystick {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, #333, #111);
  border-radius: 50%;
  border: 3px solid #555;
  box-shadow: 0 4px 0 #000;
  position: relative;
}

.joystick::after {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 28px;
  background: linear-gradient(to bottom, #666, #333);
  border-radius: 8px 8px 4px 4px;
  border: 2px solid #555;
}

.buttons {
  display: flex;
  gap: 12px;
}

.btn-a, .btn-b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: bold;
  border: 3px solid #000;
  box-shadow: 0 3px 0 #000;
  cursor: pointer;
  transition: transform 0.1s;
}

.btn-a {
  background: var(--pixel-red);
  color: #fff;
}

.btn-b {
  background: var(--pixel-blue);
  color: #fff;
}

.btn-a:hover, .btn-b:hover {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #000;
}

/* Ground decoration - Mario style */
.ground-row {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow: visible;
  position: relative;
}

.ground-blocks {
  height: 44px;
  background:
    repeating-linear-gradient(
      90deg,
      #c84a11 0px, #c84a11 20px,
      #a03a0e 20px, #a03a0e 22px
    );
  border-top: 4px solid #e09050;
  position: relative;
}

/* Pipes sitting on top of ground */
.ground-blocks .scene-pipe {
  position: absolute;
  bottom: 100%;
  z-index: 6;
}

.ground-blocks .scene-pipe-left { left: 6%; }
.ground-blocks .scene-pipe-right { right: 6%; }

.ground-blocks::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background:
    repeating-linear-gradient(
      90deg,
      #c84a11 0px, #c84a11 20px,
      #a03a0e 20px, #a03a0e 22px
    );
  border-bottom: 2px solid #8b3410;
}

.ground-blocks::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(to bottom, #5cbf2a, #3a8a1c);
  border-top: 2px solid #7ed957;
}

/* ===========================
   STAGE 2: CHARACTERS
   =========================== */
.characters-section {
  background: transparent;
}

.character-select {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 30px;
  flex-wrap: wrap;
}

.character-card {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  background: var(--pixel-bg-light);
  border: 3px solid var(--pixel-cyan);
  box-shadow: 6px 6px 0 rgba(0, 116, 217, 0.3);
  padding: 30px 24px;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.character-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 rgba(0, 116, 217, 0.3);
}

.card-corner {
  position: absolute;
  top: -1px;
  right: -1px;
  background: var(--pixel-orange);
  color: #000;
  font-size: 9px;
  padding: 4px 10px;
  border: 2px solid #000;
}

.character-avatar {
  text-align: center;
  margin-bottom: 20px;
}

.avatar-placeholder {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--pixel-dark-blue), #223366);
  border: 3px solid var(--pixel-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.avatar-img:hover {
  transform: scale(1.1);
}

.pixel-emoji {
  font-size: 48px;
}

.character-name {
  font-size: 22px;
  color: var(--pixel-yellow);
  margin-bottom: 6px;
}

.en-name {
  font-size: 9px;
  color: var(--pixel-cyan);
  margin-left: 8px;
  vertical-align: middle;
}

.character-role {
  font-size: 13px;
  color: var(--pixel-gray);
  margin-bottom: 20px;
}

/* Character profile (yearbook style) */
.character-profile {
  margin-bottom: 14px;
}

.profile-row {
  display: flex;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(57, 204, 204, 0.15);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-key {
  font-size: 11px;
  color: var(--pixel-cyan);
  width: 60px;
  flex-shrink: 0;
  opacity: 0.8;
}

.profile-val {
  font-size: 13px;
  color: var(--pixel-white);
  flex: 1;
}

.profile-val.highlight-i {
  color: #7eb8ff;
  font-weight: bold;
  font-family: var(--font-pixel);
  font-size: 11px;
}

.profile-val.highlight-e {
  color: #ffb833;
  font-weight: bold;
  font-family: var(--font-pixel);
  font-size: 11px;
}

/* Character personal quote */
.character-quote {
  font-size: 13px;
  color: var(--pixel-yellow);
  font-style: italic;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-left: 3px solid var(--pixel-yellow);
  background: rgba(255, 220, 0, 0.05);
}

.character-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: rgba(255, 133, 27, 0.15);
  border: 2px solid var(--pixel-orange);
  color: var(--pixel-orange);
  font-size: 11px;
  padding: 3px 10px;
}

/* VS divider */
.vs-divider {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-width: 40px;
  flex-shrink: 0;
}

.vs-text {
  font-size: 32px;
  color: var(--pixel-red);
  text-shadow: 3px 3px 0 #000;
  animation: vsGlow 1.5s ease infinite;
}

@keyframes vsGlow {
  0%, 100% { text-shadow: 3px 3px 0 #000, 0 0 10px var(--pixel-red); }
  50% { text-shadow: 3px 3px 0 #000, 0 0 25px var(--pixel-red); }
}

.vs-sub {
  font-size: 10px;
  color: var(--pixel-cyan);
  writing-mode: vertical-rl;
  line-height: 1.6;
  letter-spacing: 2px;
  opacity: 0.8;
}

/* Duo quote */
.duo-quote {
  text-align: center;
  margin-top: 40px;
  padding: 20px 30px;
  border: 2px dashed var(--pixel-cyan);
  color: var(--pixel-cyan);
  font-size: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   STAGE 3: WORKS
   =========================== */
.works-section {
  background: transparent;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.work-card {
  background: var(--pixel-bg-light);
  border: 3px solid #333;
  padding: 24px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.work-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--pixel-green), var(--pixel-cyan), var(--pixel-blue));
}

.work-card:hover {
  border-color: var(--pixel-cyan);
  transform: translateY(-4px);
  box-shadow: 0 6px 0 rgba(57, 204, 204, 0.2);
}

.work-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.work-name {
  font-size: 18px;
  color: var(--pixel-yellow);
  margin-bottom: 6px;
}

.work-season {
  font-size: 11px;
  color: var(--pixel-green);
  margin-bottom: 10px;
}

.work-desc {
  font-size: 13px;
  color: var(--pixel-gray);
  line-height: 1.6;
  margin-bottom: 12px;
}

.work-score {
  font-size: 9px;
  color: var(--pixel-orange);
  letter-spacing: 1px;
}

/* ===========================
   STAGE 4: TIMELINE (Mario World Map style)
   =========================== */
.timeline-section {
  background: transparent;
}

.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline-pipe {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(to right, #5cbf2a 0%, #7ed957 50%, #5cbf2a 100%);
  border: 1px solid #2d6b15;
  border-radius: 3px;
}

.timeline-item {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  padding-left: 0;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  flex-shrink: 0;
  width: 40px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.coin {
  width: 30px;
  height: 30px;
  background: linear-gradient(to bottom, #ffdc00, #e0a800);
  border: 3px solid #c8a800;
  color: #8B6508;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  animation: coinSpin 2s ease infinite;
  box-shadow: 2px 2px 0 #000, inset 0 -3px 0 rgba(0,0,0,0.2);
  border-radius: 50%;
}

@keyframes coinSpin {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.3); }
}

.timeline-card {
  flex: 1;
  background: var(--pixel-bg-light);
  border: 3px solid #333;
  padding: 20px;
  border-left: 4px solid var(--pixel-green);
  transition: border-color 0.3s;
}

.timeline-card:hover {
  border-left-color: var(--pixel-yellow);
}

.timeline-year {
  font-size: 10px;
  color: var(--pixel-green);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.timeline-card h4 {
  font-size: 16px;
  color: var(--pixel-yellow);
  margin-bottom: 8px;
}

.timeline-card p {
  font-size: 13px;
  color: var(--pixel-gray);
  line-height: 1.6;
}

/* ===========================
   STAGE 5: GALLERY
   =========================== */
.gallery-section {
  background: transparent;
}

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

.gallery-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 3px solid #333;
  transition: all 0.3s;
  cursor: pointer;
}

.gallery-item:hover {
  border-color: var(--pixel-cyan);
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(57, 204, 204, 0.2);
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  background: var(--pixel-bg-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gallery-placeholder span {
  font-size: 36px;
}

.gallery-placeholder p {
  font-size: 12px;
  color: var(--pixel-gray);
}

.gallery-tip {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--pixel-gray);
  font-style: italic;
}

/* ===========================
   FOOTER
   =========================== */
.game-footer {
  margin-top: 40px;
  position: relative;
}

.footer-content {
  text-align: center;
  padding: 60px 20px 40px;
  background: var(--pixel-bg-light);
  border-top: 4px solid var(--pixel-green);
}

.footer-title {
  font-size: 16px;
  color: var(--pixel-yellow);
  margin-bottom: 20px;
  letter-spacing: 4px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--pixel-cyan);
  text-decoration: none;
  font-size: 13px;
  border: 2px solid var(--pixel-cyan);
  padding: 6px 16px;
  transition: all 0.3s;
}

.footer-link:hover {
  background: var(--pixel-cyan);
  color: #000;
}

.footer-credit p {
  font-size: 12px;
  color: var(--pixel-gray);
  margin-bottom: 8px;
}

.footer-pixel {
  font-size: 9px;
  color: var(--pixel-green);
  animation: blink 1.2s step-start infinite;
}

.footer-ground {
  height: 44px;
  background:
    repeating-linear-gradient(
      90deg,
      #c84a11 0px, #c84a11 20px,
      #a03a0e 20px, #a03a0e 22px
    );
  border-top: 8px solid #5cbf2a;
  position: relative;
}

.footer-ground::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background:
    repeating-linear-gradient(
      90deg,
      #c84a11 0px, #c84a11 20px,
      #a03a0e 20px, #a03a0e 22px
    );
  border-bottom: 2px solid #8b3410;
}

/* ===========================
   Floating decorations
   =========================== */
.floating-elements {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.floating-pixel {
  position: absolute;
  opacity: 0.15;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.15;
  }
  90% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
  .nav-col-center { display: none; }
  .nav-col-right { gap: 12px; }
  .nav-label { font-size: 7px; }
  .nav-logo { font-size: 11px; }
  .nav-value { font-size: 9px; }
  .nav-hearts { font-size: 10px; }

  .section {
    padding: 80px 16px 40px;
  }

  .section-title {
    font-size: 14px;
  }

  .title-line1 {
    font-size: 32px;
  }

  .title-line2 {
    font-size: 10px;
    letter-spacing: 4px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .arcade-screen {
    padding: 40px 20px;
  }

  .character-select {
    flex-direction: column;
    align-items: center;
  }

  .character-card {
    max-width: 100%;
  }

  .vs-divider {
    flex-direction: row;
  }

  .vs-sub {
    writing-mode: horizontal-tb;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
  }

  /* Scene divider responsive */
  .mario-scene-sky { height: 50px; }
  .scene-pipe .pipe-top { width: 44px; height: 16px; }
  .scene-pipe .pipe-body { width: 38px; height: 30px; }
  .question-block, .brick-block {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
  .scene-blocks-row.full-width .brick-block,
  .scene-blocks-row.full-width .question-block {
    max-width: 50px;
  }

  .mario-flagpole {
    height: 150px;
  }

  .flagpole-pole { height: 120px; }
}

@media (max-width: 480px) {
  .title-line1 {
    font-size: 26px;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  #gameCanvas {
    width: 100% !important;
    height: auto !important;
  }

  /* Scene divider 480px */
  .mario-scene-sky { height: 42px; }
  .scene-pipe .pipe-top { width: 36px; height: 14px; }
  .scene-pipe .pipe-body { width: 30px; height: 24px; }
  .question-block, .brick-block {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .scene-blocks-row.full-width .brick-block,
  .scene-blocks-row.full-width .question-block {
    max-width: 36px;
  }
  .scene-cloud { font-size: 32px !important; }
  .scene-coin { font-size: 14px; }

  /* Nav 480px */
  .nav-col-right { gap: 8px; }
  .nav-logo { font-size: 9px; letter-spacing: 1px; }
  .nav-label { font-size: 6px; }
  .nav-value { font-size: 8px; }
}

/* ===========================
   PIXEL BUTTON (Shared)
   =========================== */
.pixel-btn {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: #000;
  background: var(--pixel-yellow);
  border: 3px solid #000;
  padding: 12px 28px;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  transition: all 0.1s;
  letter-spacing: 1px;
}

.pixel-btn:hover {
  background: var(--pixel-orange);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.pixel-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 #000;
}

/* ===========================
   STAGE 6: QUIZ
   =========================== */
.quiz-section {
  background: transparent;
}

.quiz-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--pixel-bg-light);
  border: 3px solid var(--pixel-cyan);
  box-shadow: 6px 6px 0 rgba(0, 116, 217, 0.3);
  padding: 40px 30px;
  text-align: center;
}

.quiz-desc {
  font-size: 15px;
  color: var(--pixel-gray);
  margin-bottom: 24px;
}

.quiz-progress {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--pixel-green);
  margin-bottom: 24px;
}

.quiz-progress-bar {
  margin-top: 10px;
  height: 8px;
  background: #111;
  border: 2px solid #333;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--pixel-green), var(--pixel-cyan));
  transition: width 0.4s ease;
  width: 0%;
}

.quiz-q-text {
  font-size: 18px;
  color: var(--pixel-white);
  margin-bottom: 28px;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option {
  background: transparent;
  border: 3px solid #444;
  color: var(--pixel-white);
  font-family: var(--font-cn);
  font-size: 14px;
  padding: 14px 20px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.quiz-option:hover {
  border-color: var(--pixel-yellow);
  background: rgba(255, 220, 0, 0.08);
  transform: translateX(6px);
}

.quiz-option.selected {
  border-color: var(--pixel-green);
  background: rgba(46, 204, 64, 0.15);
}

/* Quiz result */
.quiz-result {
  text-align: center;
}

.result-avatar {
  font-size: 80px;
  margin-bottom: 16px;
  animation: resultBounce 0.6s ease;
}

@keyframes resultBounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.result-title {
  font-size: 24px;
  color: var(--pixel-yellow);
  margin-bottom: 12px;
}

.result-desc {
  font-size: 14px;
  color: var(--pixel-gray);
  line-height: 1.6;
  margin-bottom: 20px;
}

.result-match {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--pixel-green);
  margin-bottom: 24px;
}

/* ===========================
   STAGE 7: MINI GAME
   =========================== */
.minigame-section {
  background: transparent;
}

.game-wrapper {
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  border: 4px solid var(--pixel-blue);
  box-shadow: var(--arcade-shadow);
}

.game-hud {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: #111;
  border-bottom: 3px solid var(--pixel-blue);
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--pixel-green);
}

#gameCanvas {
  display: block;
  width: 100%;
  background: #0a0a1a;
  image-rendering: pixelated;
}

.game-overlay {
  position: absolute;
  inset: 0;
  top: 36px;
  background: rgba(10, 10, 26, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.game-overlay.hidden {
  display: none;
}

.game-overlay-content {
  text-align: center;
  padding: 20px;
}

.game-overlay-content h3 {
  font-size: 22px;
  color: var(--pixel-yellow);
  margin-bottom: 16px;
}

.game-overlay-content p {
  font-size: 13px;
  color: var(--pixel-gray);
  margin-bottom: 24px;
  line-height: 1.6;
}

.game-ranking {
  text-align: center;
  margin-top: 16px;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--pixel-orange);
}

/* ===========================
   PIXEL RUNNER (bottom)
   =========================== */
.pixel-runner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.runner-character {
  position: absolute;
  bottom: 4px;
  font-size: 24px;
  transition: left 0.1s linear;
  filter: drop-shadow(0 0 4px rgba(255,220,0,0.4));
}

/* ===========================
   CLICK EFFECTS
   =========================== */
.click-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.click-burst {
  position: absolute;
  font-size: 16px;
  pointer-events: none;
  animation: burstFly 0.8s ease-out forwards;
}

@keyframes burstFly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.3);
  }
}

/* ===========================
   EASTER EGG HINT
   =========================== */
.easter-egg-hint {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--pixel-green);
  background: rgba(15, 15, 35, 0.9);
  border: 2px solid var(--pixel-green);
  padding: 8px 16px;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 10000;
  white-space: nowrap;
}

.easter-egg-hint.show {
  opacity: 1;
}

/* Konami mode */
body.konami-mode {
  animation: rainbowBg 3s linear infinite;
}

@keyframes rainbowBg {
  0% { background-color: #0f0f23; }
  25% { background-color: #1a0f23; }
  50% { background-color: #0f1a23; }
  75% { background-color: #230f1a; }
  100% { background-color: #0f0f23; }
}

body.konami-mode .section-title {
  animation: rainbowText 2s linear infinite;
}

@keyframes rainbowText {
  0% { color: var(--pixel-yellow); }
  25% { color: var(--pixel-pink); }
  50% { color: var(--pixel-cyan); }
  75% { color: var(--pixel-green); }
  100% { color: var(--pixel-yellow); }
}

/* ===========================
   MARIO ELEMENTS
   =========================== */

/* --- Mario Background Layer (clouds & bushes) --- */
.mario-bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.mario-cloud {
  position: absolute;
  color: rgba(255, 255, 255, 0.06);
  font-size: 60px;
  animation: cloudFloat linear infinite;
  pointer-events: none;
}

@keyframes cloudFloat {
  0% { transform: translateX(110vw); }
  100% { transform: translateX(-200px); }
}

.mario-bush {
  position: fixed;
  bottom: 42px;
  color: rgba(46, 204, 64, 0.12);
  font-size: 32px;
  pointer-events: none;
  z-index: -1;
}

/* --- Mario Scene Divider (sky-only between sections) --- */
.mario-scene-divider {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow: visible;
}

.mario-scene-divider.flush {
  margin-top: -40px;
}

.mario-scene-divider.sky-only {
  /* No ground, just floating blocks */
}

/* Sky area - blocks float here */
.mario-scene-sky {
  position: relative;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* blocks row and clouds handled above */

.scene-blocks-row {
  display: flex;
  gap: 3px;
  z-index: 5;
}

.scene-blocks-row.full-width {
  width: 100%;
  justify-content: center;
}

.scene-blocks-row.full-width .brick-block,
.scene-blocks-row.full-width .question-block {
  flex: 1;
  max-width: 70px;
}

/* Floating collectibles between blocks */
.scene-coin {
  position: absolute;
  font-size: 18px;
  z-index: 6;
  animation: sceneCoinBob 2s ease-in-out infinite;
  pointer-events: none;
}

.scene-coin-1 { top: 4px; left: 20%; animation-delay: 0s; }
.scene-coin-2 { top: 8px; right: 25%; animation-delay: 0.6s; }
.scene-coin-3 { top: 2px; left: 50%; animation-delay: 1.2s; }

@keyframes sceneCoinBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Decorative clouds in divider */
.scene-cloud {
  position: absolute;
  color: rgba(255,255,255,0.08);
  font-size: 50px;
  pointer-events: none;
}

.scene-cloud-1 { top: 5px; left: 10%; }
.scene-cloud-2 { top: 12px; right: 15%; font-size: 36px; }

/* Ground area */
.mario-scene-ground {
  position: relative;
  height: 60px;
  overflow: hidden;
}

.scene-ground-grass {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: linear-gradient(to bottom, #7ed957, #5cbf2a);
  z-index: 3;
}

.scene-ground-grass::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 12px,
    #5cbf2a 12px,
    #5cbf2a 14px,
    transparent 14px,
    transparent 26px
  );
  /* Grass tufts */
}

.scene-ground-dirt {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    repeating-linear-gradient(
      90deg,
      #c84a11 0px, #c84a11 24px,
      #a03a0e 24px, #a03a0e 26px
    );
}

.scene-ground-dirt::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #8b3410;
}

/* Pipes growing from the ground */
.scene-pipe {
  position: absolute;
  bottom: 0;
  z-index: 4;
  cursor: pointer;
  transition: transform 0.2s;
}

.scene-pipe:hover {
  transform: translateY(-6px);
}

.scene-pipe .pipe-top {
  width: 56px;
  height: 20px;
  background: linear-gradient(to bottom, #5cbf2a, #3a8a1c);
  border: 3px solid #2d6b15;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  box-shadow: inset -8px 0 0 rgba(0,0,0,0.15), inset 8px 0 0 rgba(255,255,255,0.1);
}

.scene-pipe .pipe-body {
  width: 48px;
  height: 40px;
  margin: 0 auto;
  background: linear-gradient(to right, #5cbf2a 0%, #7ed957 30%, #5cbf2a 50%, #3a8a1c 100%);
  border: 3px solid #2d6b15;
  border-top: none;
  box-shadow: inset -6px 0 0 rgba(0,0,0,0.15);
}

.scene-pipe-left { left: 8%; }
.scene-pipe-right { right: 8%; }
.scene-pipe-center { left: 50%; transform: translateX(-50%); }
.scene-pipe-center:hover { transform: translateX(-50%) translateY(-6px); }
.scene-pipe-center.pipe-enter { animation: pipeWarpCenter 0.4s ease-in forwards; }

@keyframes pipeWarpCenter {
  0% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
  100% { transform: translateX(-50%) translateY(0); }
}

/* Hills */
.scene-hill {
  position: absolute;
  bottom: 10px;
  z-index: 2;
  border-radius: 50% 50% 0 0;
}

.scene-hill-1 {
  left: 60%;
  width: 120px;
  height: 35px;
  background: linear-gradient(to bottom, #3a8a1c, #2d6b15);
}

.scene-hill-2 {
  left: 15%;
  width: 80px;
  height: 25px;
  background: linear-gradient(to bottom, #4a9a2c, #3a8a1c);
}

/* Bush decorations on ground */
.scene-bush-deco {
  position: absolute;
  bottom: 8px;
  z-index: 3;
  font-size: 22px;
  opacity: 0.5;
  pointer-events: none;
}

.scene-bush-1 { left: 30%; }
.scene-bush-2 { left: 50%; }
.scene-bush-3 { right: 20%; }

/* Pipe enter animation (click to warp) */
.scene-pipe.pipe-enter {
  animation: pipeWarp 0.4s ease-in forwards;
}

@keyframes pipeWarp {
  0% { transform: translateY(0); }
  50% { transform: translateY(10px); }
  100% { transform: translateY(0); }
}

/* --- Question Block (?) --- */
.question-block {
  width: 44px;
  height: 44px;
  background: linear-gradient(to bottom, #ffb833, #e08a00);
  border: 3px solid #8b5a00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 20px;
  color: #8b5a00;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,0.2), inset 3px 3px 0 rgba(255,255,255,0.3), 2px 2px 0 #000;
  transition: transform 0.1s;
  user-select: none;
}

.question-block::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 3px;
  background: rgba(255,255,255,0.3);
}

.question-block:hover {
  transform: translateY(-2px);
}

.question-block.hit {
  animation: blockBump 0.3s ease;
  background: linear-gradient(to bottom, #8b7355, #6b5545);
  color: transparent;
  cursor: default;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,0.3), 2px 2px 0 #000;
}

.question-block.hit::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: #6b5545;
  border: 2px solid #4a3a30;
}

@keyframes blockBump {
  0% { transform: translateY(0); }
  30% { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

/* Brick Block */
.brick-block, .mario-brick[data-type="brick"] {
  width: 44px;
  height: 44px;
  background:
    repeating-linear-gradient(
      90deg,
      #8b5a34 0px, #8b5a34 18px,
      #5c3a1e 18px, #5c3a1e 22px
    );
  border: 3px solid #5c3a1e;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,0.2), inset 3px 3px 0 rgba(255,255,255,0.15), 2px 2px 0 #000;
  position: relative;
}

.brick-block::before, .mario-brick[data-type="brick"]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: #5c3a1e;
}

/* Coin popup animation */
.mario-coin-popup {
  position: fixed;
  font-size: 24px;
  pointer-events: none;
  z-index: 10001;
  animation: coinPopup 0.8s ease-out forwards;
}

@keyframes coinPopup {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-60px) scale(1.3);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(0.5);
    opacity: 0;
  }
}

.mario-coin-text {
  position: fixed;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--pixel-yellow);
  pointer-events: none;
  z-index: 10001;
  text-shadow: 2px 2px 0 #000;
  animation: coinTextPopup 1s ease-out forwards;
}

@keyframes coinTextPopup {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-80px); opacity: 0; }
}

/* --- Mario Flagpole --- */
.mario-flagpole {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 0;
}

.flagpole-pole {
  width: 6px;
  height: 160px;
  background: linear-gradient(to right, #bbb, #fff, #bbb);
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.flagpole-ball {
  width: 16px;
  height: 16px;
  background: var(--pixel-yellow);
  border: 3px solid #c8a800;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(255, 220, 0, 0.5);
}

.flagpole-flag {
  position: absolute;
  top: 20px;
  left: calc(50% + 8px);
  font-size: 32px;
  transition: top 1s ease;
}

.flagpole-flag.dropped {
  top: 140px;
}

.flagpole-base {
  width: 44px;
  height: 22px;
  background: linear-gradient(to bottom, #5cbf2a, #3a8a1c);
  border: 3px solid #2d6b15;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.flagpole-text {
  position: absolute;
  bottom: 30px;
  left: calc(50% + 50px);
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--pixel-yellow);
  opacity: 0;
  transition: opacity 0.5s;
  white-space: nowrap;
  text-shadow: 2px 2px 0 #000;
}

.flagpole-text.show {
  opacity: 1;
  animation: courseFlash 1s ease infinite;
}

@keyframes courseFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --- Power-up Items --- */
.mario-powerup {
  position: fixed;
  font-size: 28px;
  pointer-events: auto;
  cursor: pointer;
  z-index: 100;
  animation: powerupFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255,220,0,0.4));
  transition: transform 0.2s;
}

.mario-powerup:hover {
  transform: scale(1.3);
}

@keyframes powerupFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* --- Coin Counter in Nav --- */
#coinCounter {
  color: var(--pixel-yellow);
  font-weight: bold;
  transition: transform 0.2s;
}

#coinCounter.bump {
  animation: counterBump 0.3s ease;
}

@keyframes counterBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); color: #fff; }
  100% { transform: scale(1); }
}

/* ===========================
   BOOT SCREEN
   =========================== */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s;
}

.boot-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.boot-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.boot-line {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--pixel-green);
  margin-bottom: 12px;
  min-height: 16px;
}

.boot-logo {
  font-family: var(--font-cn);
  font-size: 42px;
  font-weight: 900;
  color: var(--pixel-yellow);
  margin: 30px 0 10px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.6s ease;
}

.boot-logo.show {
  opacity: 1;
  transform: scale(1);
}

.boot-star {
  color: var(--pixel-orange);
}

.boot-sub {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--pixel-cyan);
  letter-spacing: 3px;
  opacity: 0;
  transition: opacity 0.5s;
}

.boot-sub.show { opacity: 1; }

.boot-prompt {
  margin-top: 30px;
}

.boot-skip-btn {
  font-size: 9px;
  padding: 8px 20px;
  opacity: 0.7;
}

.boot-skip-btn:hover { opacity: 1; }

/* SOUND TOGGLE */
.sound-toggle {
  position: fixed;
  top: 50px;
  right: 16px;
  z-index: 1001;
  background: rgba(15,15,35,0.8);
  border: 2px solid #333;
  color: #fff;
  font-size: 18px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sound-toggle:hover { border-color: var(--pixel-cyan); }

/* ===========================
   SCENES (Pixel Theater)
   =========================== */
.scenes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.scene-card {
  background: var(--pixel-bg-light);
  border: 3px solid #333;
  overflow: hidden;
  transition: all 0.3s;
}

.scene-card:hover {
  border-color: var(--pixel-cyan);
  box-shadow: 0 4px 0 rgba(57,204,204,0.2);
}

.scene-canvas {
  width: 100%;
  display: block;
  cursor: pointer;
  image-rendering: pixelated;
}

.scene-info {
  padding: 12px 16px;
}

.scene-info h4 {
  color: var(--pixel-yellow);
  font-size: 14px;
  margin-bottom: 4px;
}

.scene-info p {
  color: var(--pixel-gray);
  font-size: 12px;
}

/* ===========================
   SLOTS (Quote Machine)
   =========================== */
.slots-machine {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.slots-window {
  background: var(--pixel-bg-light);
  border: 4px solid var(--pixel-orange);
  box-shadow: 6px 6px 0 rgba(255,133,27,0.2);
  padding: 30px 24px;
  margin-bottom: 16px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slots-item {
  font-size: 18px;
  color: var(--pixel-white);
  line-height: 1.6;
  transition: all 0.3s;
}

.slots-item.spinning {
  animation: slotSpin 0.1s linear infinite;
}

@keyframes slotSpin {
  0% { transform: translateY(-5px); opacity: 0.5; }
  50% { transform: translateY(5px); opacity: 0.8; }
  100% { transform: translateY(-5px); opacity: 0.5; }
}

.slots-source {
  font-size: 12px;
  color: var(--pixel-green);
  margin-bottom: 16px;
  min-height: 18px;
  font-family: var(--font-pixel);
  font-size: 9px;
}

.slots-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.slots-pull {
  background: var(--pixel-red) !important;
  color: #fff !important;
}

.slots-pull:hover {
  background: #cc2020 !important;
}

/* ===========================
   BARRAGE (Fan Wall)
   =========================== */
.barrage-area {
  position: relative;
  height: 250px;
  background: var(--pixel-bg-light);
  border: 3px solid #333;
  overflow: hidden;
  margin-bottom: 16px;
}

.barrage-item {
  position: absolute;
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 14px;
  animation: barrageFly linear forwards;
  pointer-events: none;
}

@keyframes barrageFly {
  from { transform: translateX(100%); }
  to { transform: translateX(-200%); }
}

.barrage-input {
  display: flex;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.barrage-input input {
  flex: 1;
  background: var(--pixel-bg-light);
  border: 3px solid #444;
  color: var(--pixel-white);
  font-size: 14px;
  padding: 10px 14px;
  font-family: var(--font-cn);
}

.barrage-input input:focus {
  outline: none;
  border-color: var(--pixel-cyan);
}

.barrage-send { font-size: 10px; padding: 10px 16px; }

/* ===========================
   SPOT THE DIFF
   =========================== */
.diff-wrapper {
  max-width: 650px;
  margin: 0 auto;
  position: relative;
}

.diff-hud {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: #111;
  border: 3px solid var(--pixel-blue);
  border-bottom: none;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--pixel-green);
}

.diff-canvases {
  display: flex;
  gap: 4px;
  border: 3px solid var(--pixel-blue);
}

.diff-side {
  flex: 1;
  text-align: center;
}

.diff-label {
  font-size: 11px;
  color: var(--pixel-gray);
  padding: 4px;
  background: #111;
}

.diff-side canvas {
  width: 100%;
  display: block;
  cursor: crosshair;
}

.diff-marker {
  position: absolute;
  border: 3px solid var(--pixel-green);
  border-radius: 50%;
  animation: markerPulse 1s ease infinite;
  pointer-events: none;
  z-index: 100;
}

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46,204,64,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(46,204,64,0); }
}

/* ===========================
   FAN CARD
   =========================== */
.fancard-section {
  background: transparent;
}

.fancard-form {
  max-width: 400px;
  margin: 0 auto 30px;
  background: var(--pixel-bg-light);
  border: 3px solid var(--pixel-pink);
  box-shadow: 6px 6px 0 rgba(255,107,157,0.2);
  padding: 24px;
}

.fancard-input-group {
  margin-bottom: 16px;
}

.fancard-input-group label {
  display: block;
  font-size: 13px;
  color: var(--pixel-cyan);
  margin-bottom: 8px;
}

.fancard-input-group input[type="text"] {
  width: 100%;
  background: #111;
  border: 3px solid #333;
  color: var(--pixel-white);
  font-size: 16px;
  padding: 10px;
  font-family: var(--font-cn);
}

.fancard-input-group input[type="text"]:focus {
  outline: none;
  border-color: var(--pixel-pink);
}

.fancard-radios {
  display: flex;
  gap: 12px;
}

.radio-label {
  cursor: pointer;
  font-size: 13px;
  color: var(--pixel-gray);
}

.radio-label input { margin-right: 4px; }
.radio-label input:checked + span { color: var(--pixel-yellow); }

.fancard-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.fancard-preview {
  text-align: center;
}

.fancard-preview canvas {
  max-width: 100%;
  border: 3px solid #333;
  image-rendering: pixelated;
}

/* ===========================
   ACHIEVEMENT SYSTEM
   =========================== */
.achievement-btn {
  position: fixed;
  bottom: 50px;
  right: 16px;
  z-index: 1000;
  background: rgba(15,15,35,0.9);
  border: 3px solid var(--pixel-yellow);
  color: var(--pixel-yellow);
  font-size: 18px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  transition: all 0.2s;
}

.achievement-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000;
}

.badge-count {
  font-family: var(--font-pixel);
  font-size: 10px;
  vertical-align: middle;
}

.achievement-panel {
  position: fixed;
  bottom: 100px;
  right: 16px;
  width: 280px;
  max-height: 400px;
  overflow-y: auto;
  background: rgba(15,15,35,0.95);
  border: 3px solid var(--pixel-yellow);
  box-shadow: 6px 6px 0 #000;
  z-index: 999;
  display: none;
  padding: 16px;
}

.achievement-panel.open { display: block; }

.ap-header h3 {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--pixel-yellow);
  margin-bottom: 10px;
}

.ap-progress {
  height: 8px;
  background: #111;
  border: 2px solid #333;
  margin-bottom: 6px;
}

.ap-progress-fill {
  height: 100%;
  background: var(--pixel-green);
  transition: width 0.5s;
}

.ap-count {
  font-size: 11px;
  color: var(--pixel-gray);
  display: block;
  margin-bottom: 12px;
}

.ap-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #222;
}

.ap-icon { font-size: 20px; }
.ap-name { font-size: 13px; color: var(--pixel-white); }
.ap-desc { font-size: 11px; color: var(--pixel-gray); }
.ap-item.locked { opacity: 0.4; }

/* Achievement Toast */
.achievement-toast {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  background: rgba(15,15,35,0.95);
  border: 3px solid var(--pixel-yellow);
  box-shadow: 4px 4px 0 #000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  transition: top 0.5s ease;
  white-space: nowrap;
}

.achievement-toast.show { top: 60px; }
.toast-icon { font-size: 28px; }
.toast-label { font-family: var(--font-pixel); font-size: 8px; color: var(--pixel-green); }
.toast-name { font-size: 14px; color: var(--pixel-yellow); margin-top: 2px; }

/* ===========================
   GOOMBA ENEMIES
   =========================== */
.goomba-lane {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  pointer-events: none;
  z-index: 998;
  overflow: hidden;
}

.goomba {
  position: absolute;
  bottom: 6px;
  font-size: 28px;
  cursor: pointer;
  pointer-events: auto;
  animation: goombaWalk linear forwards;
  transition: transform 0.15s;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}

.goomba:hover {
  filter: drop-shadow(0 0 8px rgba(255,220,0,0.6));
}

.goomba.stomped {
  transform: scaleY(0.2) scaleX(1.3);
  opacity: 0.5;
  pointer-events: none;
  transition: all 0.2s ease;
}

@keyframes goombaWalk {
  0% { left: -50px; }
  100% { left: calc(100vw + 50px); }
}

.goomba-walk-right {
  animation-name: goombaWalkRight;
}

@keyframes goombaWalkRight {
  0% { left: calc(100vw + 50px); }
  100% { left: -50px; }
}

/* Stomp score popup */
.stomp-score {
  position: fixed;
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--pixel-yellow);
  text-shadow: 2px 2px 0 #000;
  pointer-events: none;
  z-index: 10001;
  animation: stompScoreUp 1s ease-out forwards;
}

@keyframes stompScoreUp {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-60px) scale(1.5); opacity: 0; }
}

/* ===========================
   BRICK BREAK PARTICLES
   =========================== */
.brick-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 10001;
  animation: brickFly 0.6s ease-out forwards;
}

@keyframes brickFly {
  0% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--bx), var(--by)) rotate(var(--br)); }
}

/* ===========================
   STAR POWER MODE
   =========================== */
body.star-power {
  animation: starPowerBg 0.3s linear infinite;
}

body.star-power * {
  transition: none !important;
}

body.star-power .game-nav {
  animation: starPowerBg 0.3s linear infinite;
  border-bottom-color: #fff !important;
}

@keyframes starPowerBg {
  0% { background-color: #0f0f23; }
  16% { background-color: #1a0a2e; }
  33% { background-color: #0a1a2e; }
  50% { background-color: #2e0a1a; }
  66% { background-color: #0a2e1a; }
  83% { background-color: #2e2e0a; }
  100% { background-color: #0f0f23; }
}

.star-timer {
  position: fixed;
  top: 46px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: #fff;
  background: rgba(255, 215, 0, 0.9);
  color: #000;
  padding: 4px 16px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
}

/* ===========================
   FIREWORKS
   =========================== */
.fireworks-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}

.firework {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: fireworkExplode 1.5s ease-out forwards;
}

@keyframes fireworkExplode {
  0% { transform: scale(0); opacity: 1; }
  50% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}

.firework-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: sparkFly 1s ease-out forwards;
}

@keyframes sparkFly {
  0% { opacity: 1; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(var(--sx), var(--sy)); }
}

/* ===========================
   HIDDEN 1-UP MUSHROOM
   =========================== */
.hidden-1up {
  position: fixed;
  bottom: 80px;
  left: 8px;
  font-size: 18px;
  opacity: 0.08;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s;
  filter: hue-rotate(90deg);
}

.hidden-1up:hover {
  opacity: 0.6;
  transform: scale(1.5);
}

.hidden-1up.found {
  opacity: 0;
  pointer-events: none;
}

/* ===========================
   WORLD INDICATOR
   =========================== */
#worldIndicator {
  transition: color 0.3s;
}

/* ===========================
   RUNNER JUMP
   =========================== */
.runner-character.jumping {
  animation: runnerJump 0.5s ease;
}

@keyframes runnerJump {
  0% { transform: translateY(0); }
  40% { transform: translateY(-30px); }
  100% { transform: translateY(0); }
}
