/* ============================================================
   NES Mario World Extravaganza - The Wizard Platform
   8-bit Pixel Art Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

:root {
  /* Enhanced NES Color Palette - Vibrant & Authentic */
  --nes-black:   #000000;
  --nes-white:   #ffffff;
  --nes-red:     #ff0000;
  --nes-dark-red:#880015;
  --nes-blue:    #0038ff;
  --nes-sky:     #5c94fc;
  --nes-light-blue: #00e8d8;
  --nes-green:   #00cc00;
  --nes-dark-green:#008800;
  --nes-yellow:  #ffff00;
  --nes-gold:    #ffd700;
  --nes-orange:  #ff8800;
  --nes-brown:   #a04000;
  --nes-tan:     #fcd8a8;
  --nes-gray:    #888888;
  --nes-dark-gray:#444444;
  --nes-purple:  #8800ff;
  --nes-pink:    #ff88ff;
  --nes-magenta: #ff00ff;
  --bg-dark:     #0a0a1f;
  --bg-mid:      #1a1a3e;
  --bg-gradient: linear-gradient(135deg, #0a0a1f 0%, #1a1a3e 50%, #2a2a5e 100%);
  --pixel-border: 4px solid #ffffff;
  --font-nes:   'Press Start 2P', monospace;

  /* Glow effects for modern touch */
  --glow-yellow: 0 0 10px var(--nes-yellow), 0 0 20px var(--nes-yellow);
  --glow-blue: 0 0 10px var(--nes-light-blue), 0 0 20px var(--nes-blue);
  --glow-red: 0 0 10px var(--nes-red), 0 0 20px var(--nes-red);
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-dark);
  color: var(--nes-white);
  font-family: var(--font-nes);
  font-size: 10px;
  line-height: 1.8;
  image-rendering: pixelated;
}

a { color: var(--nes-yellow); text-decoration: none; }
a:hover { color: var(--nes-orange); text-shadow: 0 0 8px var(--nes-yellow); }

/* ---- Pixel Art Scrollbar ---- */
::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track {
  background: var(--nes-black);
  border: 2px solid var(--nes-dark-gray);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--nes-red) 0%, var(--nes-dark-red) 100%);
  border: 2px solid var(--nes-black);
  box-shadow: inset 0 0 6px rgba(255,255,0,0.3);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ff3333 0%, var(--nes-red) 100%);
  box-shadow: inset 0 0 6px rgba(255,255,0,0.5), 0 0 10px rgba(255,0,0,0.5);
}

/* ---- Stars Background Animation ---- */
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* ---- Header / Hero ---- */
.site-header {
  background: linear-gradient(180deg, #000033 0%, #1a0066 25%, #3300cc 50%, #5c94fc 100%);
  text-align: center;
  padding: 40px 20px 20px;
  border-bottom: 8px solid var(--nes-yellow);
  box-shadow: 0 8px 0 var(--nes-dark-red);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★';
  display: block;
  color: var(--nes-yellow);
  font-size: 8px;
  letter-spacing: 4px;
  margin-bottom: 16px;
  animation: twinkle 2s infinite;
}

.site-title {
  font-size: clamp(12px, 3vw, 24px);
  color: var(--nes-yellow);
  text-shadow:
    4px 4px 0 var(--nes-brown),
    -2px -2px 0 var(--nes-dark-red),
    0 0 20px var(--nes-gold);
  line-height: 1.4;
  margin-bottom: 8px;
  animation: title-glow 2s ease-in-out infinite alternate;
}

@keyframes title-glow {
  from { text-shadow: 4px 4px 0 var(--nes-brown), -2px -2px 0 var(--nes-dark-red), 0 0 10px var(--nes-gold); }
  to { text-shadow: 4px 4px 0 var(--nes-brown), -2px -2px 0 var(--nes-dark-red), 0 0 30px var(--nes-yellow); }
}

.site-subtitle {
  font-size: clamp(7px, 1.5vw, 10px);
  color: var(--nes-white);
  margin-bottom: 20px;
}

/* ---- Mario Sprite (CSS Pixel Art) ---- */
.mario-sprite-wrap {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 16px 0;
}

.coin-counter {
  color: var(--nes-yellow);
  font-size: 9px;
  margin-top: 8px;
}

/* ---- Navigation ---- */
.main-nav {
  background: linear-gradient(135deg, var(--nes-red) 0%, var(--nes-dark-red) 100%);
  border-top: 4px solid var(--nes-dark-red);
  border-bottom: 4px solid var(--nes-dark-red);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
}

.main-nav ul li a {
  display: block;
  color: var(--nes-white);
  padding: 12px 14px;
  font-size: 8px;
  border-right: 2px solid var(--nes-dark-red);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.main-nav ul li a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--nes-yellow);
  transition: height 0.3s ease;
  z-index: -1;
}

.main-nav ul li a:hover::before,
.main-nav ul li a.active::before {
  height: 100%;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  background: var(--nes-dark-red);
  color: var(--nes-yellow);
  text-shadow: 0 0 10px var(--nes-gold);
  transform: translateY(-2px);
}

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ---- Section Headings ---- */
.section-title {
  font-size: clamp(10px, 2vw, 16px);
  color: var(--nes-yellow);
  text-align: center;
  margin: 32px 0 24px;
  text-shadow: 3px 3px 0 var(--nes-brown), 0 0 15px var(--nes-gold);
  position: relative;
  animation: section-pulse 3s ease-in-out infinite;
}

@keyframes section-pulse {
  0%, 100% { text-shadow: 3px 3px 0 var(--nes-brown), 0 0 10px var(--nes-gold); }
  50% { text-shadow: 3px 3px 0 var(--nes-brown), 0 0 25px var(--nes-yellow); }
}

.section-title::before,
.section-title::after {
  content: '►';
  color: var(--nes-red);
  margin: 0 12px;
  animation: arrow-pulse 1.5s ease-in-out infinite;
}

@keyframes arrow-pulse {
  0%, 100% { opacity: 1; transform: translateX(0); }
  50% { opacity: 0.5; transform: translateX(3px); }
}

/* ---- Pixel Cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.nes-card {
  background: var(--bg-gradient);
  border: 4px solid var(--nes-white);
  box-shadow: 4px 4px 0 var(--nes-black), 8px 8px 0 var(--nes-gray);
  padding: 16px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.nes-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

.nes-card:hover::before {
  left: 100%;
}

.nes-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--nes-black), 12px 12px 0 var(--nes-yellow);
  border-color: var(--nes-yellow);
}

.nes-card h3 {
  color: var(--nes-yellow);
  font-size: 9px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--nes-gray);
  padding-bottom: 8px;
}

.nes-card p, .nes-card li {
  font-size: 8px;
  color: var(--nes-white);
  line-height: 2;
}

.nes-card ul { padding-left: 16px; }
.nes-card ul li::marker { color: var(--nes-red); }

/* ---- Buttons ---- */
.nes-btn {
  display: inline-block;
  background: var(--nes-red);
  color: var(--nes-white);
  border: none;
  padding: 10px 16px;
  font-family: var(--font-nes);
  font-size: 8px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--nes-dark-red), 0 0 10px rgba(255,0,0,0.3);
  transition: all 0.15s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.nes-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.nes-btn:hover::before {
  width: 300px;
  height: 300px;
}

.nes-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--nes-dark-red), 0 0 20px rgba(255,0,0,0.5);
  color: var(--nes-yellow);
}

.nes-btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.nes-btn.green  {
  background: var(--nes-green);
  box-shadow: 4px 4px 0 var(--nes-dark-green), 0 0 10px rgba(0,204,0,0.3);
}
.nes-btn.green:hover {
  box-shadow: 2px 2px 0 var(--nes-dark-green), 0 0 20px rgba(0,255,0,0.5);
}

.nes-btn.blue   {
  background: var(--nes-blue);
  box-shadow: 4px 4px 0 #000088, 0 0 10px rgba(0,56,255,0.3);
}
.nes-btn.blue:hover {
  box-shadow: 2px 2px 0 #000088, 0 0 20px rgba(0,56,255,0.5);
}

.nes-btn.yellow {
  background: var(--nes-yellow);
  color: var(--nes-black);
  box-shadow: 4px 4px 0 var(--nes-brown), 0 0 10px rgba(255,255,0,0.3);
}
.nes-btn.yellow:hover {
  box-shadow: 2px 2px 0 var(--nes-brown), 0 0 20px rgba(255,255,0,0.5);
}

.nes-btn.purple {
  background: var(--nes-purple);
  box-shadow: 4px 4px 0 #440080, 0 0 10px rgba(136,0,255,0.3);
}
.nes-btn.purple:hover {
  box-shadow: 2px 2px 0 #440080, 0 0 20px rgba(136,0,255,0.5);
}

/* ---- Video Grid ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.video-card {
  background: linear-gradient(135deg, var(--nes-black) 0%, var(--bg-mid) 100%);
  border: 4px solid var(--nes-sky);
  box-shadow: 4px 4px 0 var(--nes-blue), 0 0 10px rgba(92,148,252,0.3);
  overflow: hidden;
  transition: all 0.2s ease;
  position: relative;
}

.video-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.video-card:hover::before {
  left: 100%;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--nes-blue), 0 0 25px rgba(92,148,252,0.6);
  border-color: var(--nes-light-blue);
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.video-thumb .play-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  background: var(--nes-red);
  border: 4px solid var(--nes-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.1s;
}

.video-thumb .play-btn:hover { transform: scale(1.1); }

.video-info {
  padding: 12px;
}

.video-info h3 {
  font-size: 8px;
  color: var(--nes-yellow);
  margin-bottom: 6px;
  line-height: 1.6;
}

.video-info p {
  font-size: 7px;
  color: var(--nes-gray);
  margin-bottom: 10px;
  line-height: 1.8;
}

/* ---- Game Genie Table ---- */
.code-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 8px;
}

.code-table th {
  background: var(--nes-red);
  color: var(--nes-white);
  padding: 8px 12px;
  text-align: left;
  border: 2px solid var(--nes-dark-red);
}

.code-table td {
  padding: 8px 12px;
  border: 2px solid var(--nes-dark-gray);
  color: var(--nes-white);
}

.code-table tr:nth-child(even) td { background: var(--bg-mid); }
.code-table tr:nth-child(odd)  td { background: var(--bg-dark); }
.code-table tr:hover td { background: #2a2a5e; }

.code-cell {
  font-family: monospace;
  color: var(--nes-yellow);
  letter-spacing: 2px;
  font-size: 9px;
}

/* ---- Game Canvas Area ---- */
#game-canvas-container {
  text-align: center;
  margin: 24px 0;
}

#gameCanvas {
  border: 6px solid var(--nes-white);
  box-shadow: 0 0 0 4px var(--nes-black), 4px 4px 0 var(--nes-gray);
  image-rendering: pixelated;
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

/* ---- Game Controls UI ---- */
.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 16px 0;
}

/* ---- Progress Bar ---- */
.progress-wrap {
  background: var(--nes-black);
  border: 3px solid var(--nes-white);
  height: 18px;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background: var(--nes-green);
  transition: width 0.3s;
}

/* ---- Gallery Grid ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.gallery-item {
  background: var(--nes-black);
  border: 4px solid var(--nes-white);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 4px 4px 0 var(--nes-gray);
  position: relative;
}

.gallery-item::after {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 48px;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.gallery-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--nes-yellow), 0 0 20px rgba(255,255,0,0.5);
  border-color: var(--nes-yellow);
}

.gallery-item img {
  width: 100%;
  display: block;
  image-rendering: pixelated;
}

.gallery-item .caption {
  font-size: 7px;
  color: var(--nes-yellow);
  padding: 6px 8px;
  text-align: center;
  background: var(--bg-mid);
  border-top: 2px solid var(--nes-gray);
}

/* ---- Ticker / Marquee ---- */
.ticker-wrap {
  background: linear-gradient(135deg, var(--nes-black) 0%, #1a1a1a 100%);
  border-top: 3px solid var(--nes-yellow);
  border-bottom: 3px solid var(--nes-yellow);
  box-shadow: inset 0 0 20px rgba(255,255,0,0.2);
  overflow: hidden;
  padding: 8px 0;
  position: relative;
}

.ticker-wrap::before,
.ticker-wrap::after {
  content: '★';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nes-yellow);
  font-size: 12px;
  z-index: 10;
  animation: star-twinkle 2s ease-in-out infinite;
}

.ticker-wrap::before {
  left: 10px;
}

.ticker-wrap::after {
  right: 10px;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
  50% { opacity: 0.5; transform: translateY(-50%) scale(1.2); }
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
  color: var(--nes-yellow);
  font-size: 8px;
  text-shadow: 0 0 10px var(--nes-gold);
}

@keyframes ticker-scroll {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* ---- Life / HUD elements ---- */
.hud-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--nes-black);
  border: 3px solid var(--nes-white);
  padding: 8px 16px;
  margin-bottom: 16px;
  font-size: 8px;
  flex-wrap: wrap;
}

.hud-stat { color: var(--nes-white); }
.hud-stat span { color: var(--nes-yellow); }
.lives { color: var(--nes-red); }

/* ---- Input Fields ---- */
.nes-input {
  background: var(--nes-black);
  border: 3px solid var(--nes-white);
  color: var(--nes-white);
  font-family: var(--font-nes);
  font-size: 8px;
  padding: 8px 12px;
  width: 100%;
  outline: none;
}

.nes-input:focus { border-color: var(--nes-yellow); }

.nes-select {
  background: var(--nes-black);
  border: 3px solid var(--nes-white);
  color: var(--nes-white);
  font-family: var(--font-nes);
  font-size: 8px;
  padding: 8px 12px;
  outline: none;
}

/* ---- Info Box ---- */
.info-box {
  background: linear-gradient(135deg, var(--bg-mid) 0%, #2a2a5e 100%);
  border-left: 6px solid var(--nes-yellow);
  padding: 16px;
  margin: 16px 0;
  font-size: 8px;
  line-height: 2;
  box-shadow: 4px 4px 0 var(--nes-black), 0 0 15px rgba(255,255,0,0.2);
  position: relative;
  overflow: hidden;
}

.info-box::before {
  content: '💡';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  opacity: 0.3;
  animation: bulb-pulse 2s ease-in-out infinite;
}

@keyframes bulb-pulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.1); }
}

.info-box.red {
  border-left-color: var(--nes-red);
  box-shadow: 4px 4px 0 var(--nes-black), 0 0 15px rgba(255,0,0,0.2);
}
.info-box.red::before {
  content: '⚠️';
}

.info-box.green {
  border-left-color: var(--nes-green);
  box-shadow: 4px 4px 0 var(--nes-black), 0 0 15px rgba(0,255,0,0.2);
}
.info-box.green::before {
  content: '✅';
}

.info-box.blue {
  border-left-color: var(--nes-sky);
  box-shadow: 4px 4px 0 var(--nes-black), 0 0 15px rgba(92,148,252,0.2);
}
.info-box.blue::before {
  content: 'ℹ️';
}

/* ---- Pixel Divider ---- */
.pixel-divider {
  text-align: center;
  color: var(--nes-yellow);
  font-size: 8px;
  margin: 24px 0;
  letter-spacing: 4px;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--nes-black);
  border-top: 6px solid var(--nes-red);
  text-align: center;
  padding: 24px 16px;
  margin-top: 40px;
}

.site-footer p {
  font-size: 7px;
  color: var(--nes-gray);
  line-height: 2.2;
}

.site-footer .heart { color: var(--nes-red); }

/* ---- Blinking Cursor ---- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.blink { animation: blink 1s step-end infinite; }

/* ---- Badge ---- */
.badge {
  display: inline-block;
  background: var(--nes-red);
  color: var(--nes-white);
  font-size: 7px;
  padding: 2px 6px;
  border: 2px solid var(--nes-white);
  margin-left: 6px;
}

.badge.new    { background: var(--nes-green); }
.badge.hot    { background: var(--nes-orange); color: var(--nes-black); }
.badge.classic{ background: var(--nes-purple); }

/* ---- Tooltip ---- */
[data-tip] {
  position: relative;
  cursor: help;
}

[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--nes-black);
  color: var(--nes-white);
  font-size: 7px;
  padding: 6px 10px;
  border: 2px solid var(--nes-yellow);
  white-space: nowrap;
  display: none;
  z-index: 200;
}

[data-tip]:hover::after { display: block; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .main-nav ul li a {
    padding: 10px 8px;
    font-size: 7px;
  }
  .card-grid, .video-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Page-specific hero backgrounds ---- */
.hero-wizard {
  background: linear-gradient(180deg, #000033 0%, #1a0050 40%, #3d0070 100%);
  padding: 32px 16px;
  text-align: center;
  border-bottom: 4px solid var(--nes-purple);
}

.hero-genie {
  background: linear-gradient(180deg, #001100 0%, #003300 50%, #006600 100%);
  padding: 32px 16px;
  text-align: center;
  border-bottom: 4px solid var(--nes-green);
}

.hero-mario {
  background: linear-gradient(180deg, #5c94fc 0%, #5c94fc 60%, #228b22 60%, #228b22 100%);
  padding: 48px 16px 32px;
  text-align: center;
  border-bottom: 4px solid var(--nes-brown);
}

/* ---- Sprite pixel art using box-shadow ---- */
.sprite {
  image-rendering: pixelated;
  display: inline-block;
}

/* ---- Animated coin ---- */
@keyframes coin-spin {
  0%   { transform: scaleX(1); }
  25%  { transform: scaleX(0.5); }
  50%  { transform: scaleX(0.1); }
  75%  { transform: scaleX(0.5); }
  100% { transform: scaleX(1); }
}

.coin-anim { display: inline-block; animation: coin-spin 0.8s linear infinite; color: var(--nes-yellow); }

/* ---- Mario run animation ---- */
@keyframes mario-run {
  0%   { background-position: 0 0; }
  33%  { background-position: -32px 0; }
  66%  { background-position: -64px 0; }
  100% { background-position: 0 0; }
}

/* ---- Feature highlight ---- */
.feature-highlight {
  background: linear-gradient(135deg, var(--bg-mid) 0%, #2a1a4e 50%, #3a2a6e 100%);
  border: 4px solid var(--nes-yellow);
  padding: 24px;
  margin: 24px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--nes-black), 0 0 30px rgba(255,255,0,0.3);
}

.feature-highlight::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255,255,0,0.05) 10px,
    rgba(255,255,0,0.05) 20px
  );
  animation: stripe-move 20s linear infinite;
}

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

.feature-highlight h2 {
  font-size: clamp(10px, 2vw, 16px);
  color: var(--nes-yellow);
  margin-bottom: 12px;
  text-shadow: 3px 3px 0 var(--nes-brown), 0 0 20px var(--nes-gold);
  position: relative;
  z-index: 1;
}

.feature-highlight p {
  font-size: 8px;
  color: var(--nes-white);
  line-height: 2;
  max-width: 700px;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
}

/* ---- Builder palette ---- */
.palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.palette-swatch {
  width: 28px;
  height: 28px;
  border: 3px solid var(--nes-white);
  cursor: pointer;
  transition: transform 0.1s;
}

.palette-swatch:hover,
.palette-swatch.selected {
  transform: scale(1.25);
  border-color: var(--nes-yellow);
}

/* ---- Canvas grid overlay ---- */
.builder-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.builder-tools {
  flex: 0 0 200px;
}

.builder-canvas-wrap {
  flex: 1;
  min-width: 280px;
}

/* ---- Notification toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--nes-black);
  border: 3px solid var(--nes-green);
  color: var(--nes-green);
  font-size: 8px;
  padding: 12px 16px;
  z-index: 9999;
  animation: toast-in 0.3s ease;
  max-width: 280px;
}

@keyframes toast-in {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ---- Video grid (videos.html) ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 24px 0;
}
.video-card {
  background: var(--bg-mid);
  border: 3px solid var(--nes-gray);
}
.video-card > div:first-child {
  border-bottom: 2px solid var(--nes-gray);
}
.video-info {
  padding: 12px;
}
.video-info h3 {
  color: var(--nes-yellow);
  font-size: 8px;
  margin-bottom: 8px;
}
.video-info p {
  font-size: 7px;
  color: #ccc;
  line-height: 2;
  margin-bottom: 10px;
}

/* ---- Extended buttons ---- */
.nes-btn.purple {
  background: var(--nes-purple);
  border-color: var(--nes-pink);
  color: var(--nes-white);
}
.nes-btn.purple:hover { background: #9a00e8; }

/* ---- Hero variants ---- */
.hero-wizard {
  background: linear-gradient(180deg, #0d0d2b 0%, #1a1a3e 50%, #2a2a5e 100%);
  border-bottom: 4px solid var(--nes-yellow);
}
