/* =====================================================
   GILBERT'S PAGE — style.css
   Superhero theme: bold, action-packed, comic book feel
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:     #CC0000;
  --red2:    #FF3333;
  --blue:    #1565C0;
  --blue2:   #1E88E5;
  --gold:    #FFD700;
  --gold2:   #FFC107;
  --green:   #2E7D32;
  --dark:    #0D1B3E;
  --darker:  #060D1F;
  --light:   #F4F4F4;
  --muted:   #555;
}

html, body {
  font-family: 'Nunito', sans-serif;
  background: var(--light);
  color: #1a1a1a;
  min-height: 100vh;
}

/* ── PASSWORD GATE ──────────────────────────────────── */
.pw-gate {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--darker) 0%, #3D0000 50%, var(--dark) 100%);
  z-index: 9999;
  transition: opacity 0.4s ease;
}
.pw-gate.unlocking { opacity: 0; pointer-events: none; }

.pw-box {
  background: #fff;
  border-radius: 24px;
  padding: 2.5rem 2.8rem;
  text-align: center;
  box-shadow: 0 0 0 4px var(--gold), 0 20px 60px rgba(0,0,0,0.5);
  max-width: 380px; width: 90%;
}
.pw-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.pw-title { font-family: 'Bangers', cursive; font-size: 2.4rem; letter-spacing: 1px; }
.pw-sub   { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }

.pw-form  { display: flex; flex-direction: column; gap: 0.75rem; }
.pw-input {
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0; border-radius: 50px;
  font-family: 'Nunito', sans-serif; font-size: 1rem;
  outline: none; transition: border-color 0.2s;
  text-align: center;
}
.pw-input:focus { border-color: var(--red); }

.pw-btn {
  padding: 0.75rem; border: none; border-radius: 50px; cursor: pointer;
  background: linear-gradient(90deg, var(--red), var(--blue));
  color: #fff; font-family: 'Bangers', cursive; font-size: 1.3rem;
  letter-spacing: 1px;
  transition: opacity 0.2s, transform 0.1s;
}
.pw-btn:hover  { opacity: 0.9; }
.pw-btn:active { transform: scale(0.97); }

.pw-error { color: var(--red); font-size: 0.85rem; margin-top: 0.75rem; display: none; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX( 8px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX( 5px); }
}

/* ── BACK LINK ──────────────────────────────────────── */
.back-link {
  position: fixed; top: 14px; left: 16px; z-index: 500;
  background: rgba(0,0,0,0.55);
  color: #fff; text-decoration: none;
  padding: 6px 14px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 700;
  transition: background 0.2s;
}
.back-link:hover { background: rgba(0,0,0,0.8); }

/* ── MUSIC BUTTON ───────────────────────────────────── */
.music-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  width: 60px; height: 60px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--red), var(--gold));
  font-size: 1.7rem; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  transition: transform 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.music-btn:hover  { transform: scale(1.1); }
.music-btn.playing { animation: music-pulse 1.2s ease-in-out infinite; }

@keyframes music-pulse {
  0%,100% { box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
  50%     { box-shadow: 0 4px 28px rgba(204,0,0,0.8), 0 0 0 10px rgba(204,0,0,0.15); }
}

/* ── HERO ───────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 80% 50%, rgba(123,0,0,0.6) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 50%, rgba(13,27,62,0.8) 0%, transparent 55%),
    linear-gradient(135deg, var(--darker) 0%, #1A0030 45%, #4A0000 100%);
  text-align: center;
  padding: 6rem 1.5rem 4rem;
}

/* Floating art */
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.art-item {
  position: absolute;
  font-size: 2.2rem;
  opacity: 0.5;
  animation: float-art 6s ease-in-out infinite;
}
.art-item.a1  { top:  6%; left:  4%; font-size: 3rem; animation-delay: 0s; }
.art-item.a2  { top:  8%; left: 20%; animation-delay: -1.1s; }
.art-item.a3  { top: 15%; right: 8%; animation-delay: -2.3s; }
.art-item.a4  { top: 30%; left:  6%; animation-delay: -0.7s; }
.art-item.a5  { top:  5%; left: 50%; animation-delay: -3.1s; font-size: 2.8rem; }
.art-item.a6  { top: 45%; right: 5%; animation-delay: -1.8s; font-size: 2.5rem; }
.art-item.a7  { top: 60%; left:  8%; animation-delay: -2.9s; }
.art-item.a8  { top: 70%; right:10%; animation-delay: -0.4s; font-size: 2.5rem; }
.art-item.a9  { top: 10%; right:22%; animation-delay: -4.0s; }
.art-item.a10 { bottom:12%; left: 15%; animation-delay: -1.5s; }
.art-item.a11 { top: 40%; left: 30%; animation-delay: -3.5s; font-size: 2.8rem; }
.art-item.a12 { top:  3%; right:40%; animation-delay: -2.0s; }
.art-item.a13 { bottom:20%; right:25%; animation-delay: -0.9s; }
.art-item.a14 { bottom:10%; left:40%; animation-delay: -3.7s; }
.art-item.a15 { bottom: 6%; right: 5%; animation-delay: -1.3s; font-size: 2.6rem; }
.art-item.a16 { top: 25%; left: 45%; animation-delay: -4.5s; }

@keyframes float-art {
  0%,100% { transform: translateY(0)    rotate(0deg)   scale(1);    }
  33%     { transform: translateY(-14px) rotate( 8deg)  scale(1.06); }
  66%     { transform: translateY( 8px) rotate(-5deg)  scale(0.96); }
}

/* Action words */
.action-word {
  position: absolute;
  font-family: 'Bangers', cursive;
  color: var(--gold);
  text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  pointer-events: none;
  animation: pow-pulse 2.5s ease-in-out infinite;
}
.pow { top: 15%; left:  5%; font-size: clamp(2rem, 5vw, 3.5rem); transform: rotate(-15deg); animation-delay: 0s; }
.bam { bottom:18%; right: 6%; font-size: clamp(2.2rem,5.5vw,4rem);  transform: rotate( 12deg); animation-delay: 0.9s; }
.zap { top: 42%; right:12%; font-size: clamp(1.8rem, 4vw, 2.8rem); transform: rotate(-8deg); animation-delay: 1.7s; }

@keyframes pow-pulse {
  0%,100% { transform: scale(1)    rotate(-15deg); }
  50%     { transform: scale(1.15) rotate(-15deg); }
}
.bam { animation-name: bam-pulse; }
@keyframes bam-pulse {
  0%,100% { transform: scale(1)    rotate(12deg); }
  50%     { transform: scale(1.15) rotate(12deg); }
}
.zap { animation-name: zap-pulse; }
@keyframes zap-pulse {
  0%,100% { transform: scale(1)    rotate(-8deg); }
  50%     { transform: scale(1.12) rotate(-8deg); }
}

/* Hero content */
.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--darker);
  font-family: 'Bangers', cursive;
  font-size: 1.1rem;
  letter-spacing: 3px;
  padding: 6px 20px;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: 'Bangers', cursive;
  font-size: clamp(3.5rem, 12vw, 7rem);
  color: #fff;
  line-height: 1.05;
  text-shadow: 4px 4px 0 rgba(0,0,0,0.4);
  letter-spacing: 2px;
}
.name-highlight {
  color: var(--gold);
  display: block;
  text-shadow: 4px 4px 0 var(--red), 8px 8px 0 rgba(0,0,0,0.3);
}

.hero-sub {
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  margin: 1rem 0 2rem;
}

.hero-btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: linear-gradient(90deg, var(--red), var(--red2));
  color: #fff;
  font-family: 'Bangers', cursive;
  font-size: 1.5rem;
  letter-spacing: 2px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(204,0,0,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hero-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(204,0,0,0.6); }

/* ── SHARED SECTION STYLES ──────────────────────────── */
.section     { padding: 4rem 1.5rem; }
.section-alt { background: #e8f0e8; }
.section-dark {
  background: linear-gradient(135deg, var(--darker) 0%, #0D1B3E 100%);
  color: #fff;
}

.container { max-width: 900px; margin: 0 auto; }

.section-title {
  font-family: 'Bangers', cursive;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--dark);
}
.section-title.light { color: var(--gold); }

.section-lead {
  text-align: center;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-weight: 600;
}
.section-lead.light { color: rgba(255,255,255,0.75); }

/* Fade-in */
.js .fade-in            { opacity: 0; transform: translateY(32px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .fade-in.visible    { opacity: 1; transform: translateY(0); }

/* ── ABOUT ──────────────────────────────────────────── */
.about-card {
  display: flex; flex-wrap: wrap; gap: 2rem;
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border-left: 6px solid var(--red);
}
.about-bio { flex: 1 1 280px; }
.about-bio p { line-height: 1.7; font-size: 1.05rem; }

.badge-row  { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.2rem; }
.badge {
  display: inline-block;
  background: var(--dark);
  color: var(--gold);
  font-family: 'Bangers', cursive;
  font-size: 1rem;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 50px;
}
.badge-eagle { background: var(--green); color: #fff; }

.fave-list {
  flex: 1 1 220px;
  list-style: none;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.fave-list li { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.fave-list .icon { font-size: 1.5rem; }

/* ── SUPERHEROES GRID ───────────────────────────────── */
.heroes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.hero-card {
  border-radius: 18px;
  padding: 1.6rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}
.hero-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 36px rgba(0,0,0,0.4);
}
.hero-card::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.08;
  background: radial-gradient(circle at 50% 0%, #fff 0%, transparent 70%);
}

/* Per-hero colors */
.batman   { background: #1A1A2E; border: 2px solid #FFD700; }
.spiderman{ background: #8B0000; border: 2px solid #1565C0; }
.cap      { background: #0D47A1; border: 2px solid #C62828; }
.ironman  { background: #7B0000; border: 2px solid #FFD700; }
.hulk     { background: #1B5E20; border: 2px solid #7B1FA2; }
.msmarvel { background: #880E4F; border: 2px solid #FFD700; }

.hc-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.hc-name  {
  font-family: 'Bangers', cursive;
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 0.2rem;
}
.hc-sub   { font-size: 0.8rem; color: rgba(255,255,255,0.65); margin-bottom: 0.75rem; }
.hc-power {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
}

/* ── PAW PATROL ─────────────────────────────────────── */
.pups-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.pup-card {
  border-radius: 16px;
  padding: 1.2rem 0.8rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  font-size: 0.95rem;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  border-top: 5px solid #ccc;
  font-weight: 700;
  transition: transform 0.2s;
}
.pup-card:hover { transform: translateY(-4px); }
.pup-card span  { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.pup-emoji { font-size: 2.2rem; }

/* Pup signature colors */
.chase    { border-color: #1E88E5; }
.marshall { border-color: #E53935; }
.rubble   { border-color: #FF8F00; }
.skye     { border-color: #EC407A; }
.rocky    { border-color: #43A047; }
.zuma     { border-color: #00ACC1; }

.paw-callout {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  background: #1565C0;
  color: #fff;
  border-radius: 16px;
  padding: 1.2rem 2rem;
}
.paw-emoji-big { font-size: 2.5rem; }
.paw-quote {
  font-family: 'Bangers', cursive;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  letter-spacing: 1px;
}

/* ── BUILDER ────────────────────────────────────────── */
.build-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.build-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.build-card:hover { transform: translateY(-5px); }
.build-card.magnetiles { border-top: 6px solid #7B1FA2; }
.build-card.clixos     { border-top: 6px solid #E65100; }

.build-shapes { font-size: 1.8rem; letter-spacing: 4px; margin-bottom: 0.5rem; }
.build-emoji  { font-size: 3rem; margin-bottom: 0.5rem; }
.build-card h3 {
  font-family: 'Bangers', cursive;
  font-size: 1.8rem;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}
.build-card p { color: var(--muted); font-weight: 600; }

/* ── HOT WHEELS ─────────────────────────────────────── */
.race-track {
  position: relative;
  background: #1c1c1c;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 3px solid #333;
}
.lane {
  position: relative;
  height: 52px;
  border-bottom: 1px dashed rgba(255,255,255,0.15);
  overflow: hidden;
}
.lane:last-of-type { border-bottom: none; }

/* Center stripe */
.race-track::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 50%;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 28px, transparent 28px 56px);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

.racer {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-size: 2rem;
  animation: race-car linear infinite;
}
.r1 { animation-duration: 2.4s; }
.r2 { animation-duration: 3.1s; animation-delay: -0.9s; }
.r3 { animation-duration: 3.8s; animation-delay: -2.1s; }
.r4 { animation-duration: 2.9s; animation-delay: -1.6s; }

@keyframes race-car {
  from { left: 105%; }
  to   { left: -12%; }
}

.flag-end {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 2.5rem; z-index: 2; pointer-events: none;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}
.v-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.1rem 0.5rem;
  text-align: center;
  font-size: 2rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.v-card:hover { transform: translateY(-4px); }
.v-card span  { display: block; font-size: 0.75rem; font-weight: 700; color: var(--muted); margin-top: 0.3rem; }

/* ── ADVENTURES ─────────────────────────────────────── */
.owen-card {
  display: flex; gap: 1.5rem; align-items: center;
  background: #fff;
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border-left: 6px solid #E65100;
  margin-bottom: 1.75rem;
}
.owen-avatar {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  background: #E65100;
  color: #fff;
  font-family: 'Bangers', cursive;
  font-size: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  border: 4px solid var(--gold);
}
.owen-info h3 {
  font-family: 'Bangers', cursive;
  font-size: 1.8rem;
  letter-spacing: 1px;
  color: var(--dark);
  margin-bottom: 0.4rem;
}
.owen-info p { line-height: 1.6; font-weight: 600; color: #333; }

.adventure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.adv-item {
  background: #fff;
  border-radius: 14px;
  padding: 1.2rem 0.5rem;
  text-align: center;
  font-size: 2rem;
  line-height: 1.4;
  box-shadow: 0 3px 10px rgba(0,0,0,0.07);
  font-weight: 700;
  color: var(--dark);
  font-size: 1.8rem;
  transition: transform 0.2s;
}
.adv-item:hover { transform: translateY(-4px); }
.adv-item br + * { font-size: 0.85rem; color: var(--muted); }

/* ── FOOTER ─────────────────────────────────────────── */
.footer {
  background: var(--darker);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.95rem;
}
.footer-tag { margin-top: 0.4rem; opacity: 0.6; }
.footer-home {
  display: inline-block;
  margin-top: 1rem;
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}
.footer-home:hover { text-decoration: underline; }

/* ── SPIDEY GAME ────────────────────────────────────── */
#spidey-canvas {
  display: block;
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
  border: 3px solid var(--red);
  box-shadow: 0 8px 36px rgba(0,0,0,0.6);
  touch-action: none;
}
.game-hint {
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 0.75rem;
  letter-spacing: 0.5px;
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 640px) {
  .heroes-grid  { grid-template-columns: repeat(2, 1fr); }
  .pups-grid    { grid-template-columns: repeat(2, 1fr); }
  .vehicle-grid { grid-template-columns: repeat(3, 1fr); }
  .build-cards  { grid-template-columns: 1fr; }
  .adventure-grid { grid-template-columns: repeat(2, 1fr); }
  .owen-card    { flex-direction: column; text-align: center; }
  .action-word  { display: none; }
}
