/* ===== Maple Reborn — MS2-inspired theme =====
   Palette: sky #6FB9E8 · cream #FDF6EC · ink #2A4560
   Accents: blossom #F2789F · mint #5BC79B · sun #FFB84D  */

:root {
  --sky: #6FB9E8;
  --sky-deep: #4A9AD4;
  --cream: #FDF6EC;
  --card: #FFFFFF;
  --ink: #2A4560;
  --ink-soft: #5B7A99;
  --blossom: #F2789F;
  --blossom-deep: #D45580;
  --mint: #5BC79B;
  --mint-deep: #3FA87E;
  --sun: #FFB84D;
  --sun-deep: #E09A2B;
  --edge: #E7DCC9;
  --radius: 18px;
}

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

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3, .logo-text, .btn, .tab, .stat-num {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
}

/* ===== Sky header ===== */
.sky {
  position: relative;
  background: linear-gradient(180deg, #2E3A6E 0%, #4A5BA8 34%, var(--sky-deep) 66%, var(--sky) 88%, #A8D6F2 100%);
  color: #fff;
  overflow: hidden;
  padding-bottom: 60px;
}

/* Twilight star field — three layers of box-shadow "stars", gentle twinkle */
.stars { position: absolute; inset: 0 0 40% 0; pointer-events: none; }
.stars::before, .stars::after {
  content: ""; position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #FFF;
  box-shadow:
    8vw 24px 0 #FFE9A8, 16vw 70px 0 #FFF, 24vw 12px 0 #CFE2FF,
    33vw 55px 0 #FFF, 41vw 30px 0 #FFE9A8, 52vw 80px 0 #FFF,
    61vw 20px 0 #CFE2FF, 70vw 60px 0 #FFF, 79vw 38px 0 #FFE9A8,
    88vw 15px 0 #FFF, 95vw 66px 0 #CFE2FF;
  animation: twinkle 4s ease-in-out infinite;
}
.stars::after {
  width: 1px; height: 1px; opacity: .7;
  box-shadow:
    5vw 90px 0 #FFF, 13vw 40px 0 #FFF, 21vw 100px 0 #FFF,
    29vw 26px 0 #FFF, 38vw 96px 0 #FFF, 47vw 48px 0 #FFF,
    57vw 104px 0 #FFF, 66vw 34px 0 #FFF, 76vw 92px 0 #FFF,
    85vw 50px 0 #FFF, 93vw 28px 0 #FFF;
  animation-delay: -2s;
}
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .stars::before, .stars::after { animation: none; } }
.sky-edge { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; display: block; }

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  animation: drift 60s linear infinite;
}
.cloud::before, .cloud::after {
  content: ""; position: absolute; background: inherit; border-radius: 50%;
}
.cloud-a { width: 140px; height: 44px; top: 60px; left: -160px; }
.cloud-a::before { width: 60px; height: 60px; top: -28px; left: 24px; }
.cloud-a::after  { width: 44px; height: 44px; top: -18px; left: 74px; }
.cloud-b { width: 100px; height: 32px; top: 150px; left: -120px; animation-duration: 85s; animation-delay: -30s; opacity: .7; }
.cloud-b::before { width: 44px; height: 44px; top: -20px; left: 18px; }
.cloud-b::after  { width: 32px; height: 32px; top: -12px; left: 54px; }
.cloud-c { width: 170px; height: 50px; top: 40px; left: -200px; animation-duration: 100s; animation-delay: -60s; opacity: .5; }
.cloud-c::before { width: 70px; height: 70px; top: -32px; left: 30px; }
.cloud-c::after  { width: 50px; height: 50px; top: -20px; left: 92px; }

@keyframes drift { to { transform: translateX(calc(100vw + 260px)); } }
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; left: 10%; } .cloud-b { left: 55%; } .cloud-c { left: 75%; } }

/* ===== Nav ===== */
.nav {
  position: relative; z-index: 2;
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; }
.logo-inf { width: 46px; height: 24px; overflow: visible; }
.inf-path {
  stroke-dasharray: 130;
  stroke-dashoffset: 130;
  animation: draw-inf 1.6s ease-out forwards .3s;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.2));
}
@keyframes draw-inf { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .inf-path { animation: none; stroke-dashoffset: 0; } }
.logo-text { font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.logo-text em { font-style: normal; color: #FFE9A8; }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  color: #fff; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 6px 2px; border-bottom: 3px solid transparent; transition: border-color .15s;
}
.nav-links a:hover, .nav-links a:focus-visible { border-bottom-color: #FFE9A8; }
.nav-discord {
  background: var(--blossom); border-radius: 999px; padding: 8px 18px !important;
  box-shadow: 0 3px 0 var(--blossom-deep); border-bottom: none !important;
}
.nav-discord:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--blossom-deep); }

/* ===== Hero ===== */
.hero {
  position: relative; z-index: 2;
  max-width: 720px; margin: 0 auto; text-align: center;
  padding: 48px 24px 32px;
}
.hero-eyebrow {
  display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: 1.5px;
  text-transform: uppercase; background: rgba(255,255,255,.2);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 58px); font-weight: 700; line-height: 1.1;
  text-shadow: 0 3px 0 rgba(42, 69, 96, .25);
}
.hero-sub { margin: 14px auto 26px; max-width: 480px; font-size: 17px; font-weight: 600; color: #EAF6FF; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ===== Chunky game buttons (signature) ===== */
.btn {
  display: inline-block; text-decoration: none; color: var(--ink);
  background: #fff; font-weight: 700; font-size: 16px;
  padding: 12px 28px; border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--edge);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--edge); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--edge); }
.btn-play { background: var(--sun); color: #5A3A00; box-shadow: 0 4px 0 var(--sun-deep); font-size: 18px; padding: 14px 34px; }
.btn-play:hover { box-shadow: 0 2px 0 var(--sun-deep); }
.btn-play:active { box-shadow: 0 0 0 var(--sun-deep); }
.btn-pink { background: var(--blossom); color: #fff; box-shadow: 0 4px 0 var(--blossom-deep); }
.btn-pink:hover { box-shadow: 0 2px 0 var(--blossom-deep); }
.btn-small { font-size: 14px; padding: 9px 18px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.92); color: var(--ink);
  font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 999px;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #B7B7B7; }
.status-dot.online { background: var(--mint); box-shadow: 0 0 0 4px rgba(91,199,155,.25); }
.status-dot.offline { background: #E0645C; }

/* ===== Layout ===== */
main { max-width: 1080px; margin: 0 auto; padding: 0 24px 60px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } .nav-links { gap: 12px; font-size: 14px; } }

/* ===== Stats ===== */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px; margin-top: -20px; position: relative; z-index: 3;
}
.stat-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--edge);
  padding: 18px 20px; display: flex; flex-direction: column;
}
.stat-num { font-size: 28px; font-weight: 700; color: var(--sky-deep); line-height: 1.2; }
.stat-infinity { background: #2E3A6E; box-shadow: 0 4px 0 #1E2748; }
.stat-infinity .stat-num { color: #FFE9A8; font-size: 32px; }
.stat-infinity .stat-label { color: #C9D4F2; }
.stat-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .8px; }

/* ===== Panels ===== */
.panel {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--edge);
  padding: 22px 24px; margin-top: 24px;
}
.panel-pink { border-top: 6px solid var(--blossom); }
.panel-mint { border-top: 6px solid var(--mint); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel h2 { font-size: 24px; font-weight: 700; }

/* ===== Rankings ===== */
.tabs { display: flex; gap: 6px; background: var(--cream); padding: 4px; border-radius: 999px; }
.tab {
  border: none; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--ink-soft);
  padding: 6px 16px; border-radius: 999px;
}
.tab.active { background: var(--sky-deep); color: #fff; }
.tab:focus-visible { outline: 3px solid var(--sun); }

.podium { list-style: none; display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 10px 0 18px; }
.podium li {
  background: var(--cream); border-radius: 14px; text-align: center;
  padding: 12px 10px 10px; width: 120px; position: relative;
}
.podium li:nth-child(1) { order: 2; padding-top: 20px; width: 136px; background: #FFF4DC; box-shadow: 0 4px 0 #EDD9A8; }
.podium li:nth-child(2) { order: 1; }
.podium li:nth-child(3) { order: 3; }
.podium .crown { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 22px; }
.podium .p-name { display: block; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .p-score { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.podium .p-rank { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--sky-deep); border-radius: 999px; padding: 1px 9px; margin-bottom: 4px; }
.podium li:nth-child(1) .p-rank { background: var(--sun-deep); }

.rank-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rank-table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--ink-soft); padding: 6px 8px; border-bottom: 2px solid var(--cream);
}
.rank-table td { padding: 9px 8px; border-bottom: 2px solid var(--cream); font-weight: 600; }
.rank-table td:first-child { color: var(--ink-soft); width: 36px; }
.rank-table td:nth-child(3), .rank-table th:nth-child(3) { text-align: center; width: 56px; }
.rank-table td:last-child, .rank-table th:last-child { text-align: right; }
.rank-table tr:hover td { background: #FDF9F1; }

/* ===== UGC ===== */
.ugc-feature { margin: 0; }
.ugc-img {
  height: 190px; border-radius: 14px;
  background: linear-gradient(135deg, #FBD3E0, #F2789F);
  display: flex; align-items: center; justify-content: center;
}
.ugc-img::after { content: "🏠"; font-size: 44px; }
.ugc-feature figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; }
.ugc-votes { font-size: 13px; font-weight: 700; color: var(--blossom-deep); }
.ugc-actions { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.ugc-thumbs { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ugc-thumbs li { height: 56px; border-radius: 10px; background: #FBEAF0; display: flex; align-items: center; justify-content: center; font-size: 20px; }

/* ===== Updates ===== */
.updates-list { list-style: none; }
.updates-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 4px; border-bottom: 2px solid var(--cream); font-weight: 600;
}
.updates-list li:last-child { border-bottom: none; }
.updates-list time { color: var(--ink-soft); font-size: 13px; font-weight: 700; white-space: nowrap; }
.updates-list .pin { color: var(--sun-deep); }

/* ===== Steps ===== */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.steps li { counter-increment: step; background: var(--cream); border-radius: 14px; padding: 16px; }
.steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--mint); color: #fff; font-family: 'Baloo 2', sans-serif;
  font-weight: 700; margin-bottom: 8px;
}
.steps strong { display: block; font-size: 16px; }
.steps span { font-size: 14px; color: var(--ink-soft); }
.honesty-note { margin-top: 16px; font-size: 14px; color: var(--ink-soft); font-weight: 600; }

/* ===== Footer ===== */
.footer { background: var(--ink); color: #B9CBDD; text-align: center; padding: 26px 24px; font-size: 13px; }
.footer p { max-width: 640px; margin: 0 auto; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
