/*
 * The player website: a look-alike of the 2007 VMK site, built mobile first.
 * Colours come from the archived stylesheets (global.css, home.css,
 * register.css); the art is our own. See docs/VMK-WEBSITE-PLAN.md.
 */

@font-face { font-family: Fredoka; font-weight: 500; font-display: swap; src: url("/site/fonts/fredoka-500.woff2") format("woff2"); }
@font-face { font-family: Fredoka; font-weight: 600; font-display: swap; src: url("/site/fonts/fredoka-600.woff2") format("woff2"); }
@font-face { font-family: Fredoka; font-weight: 700; font-display: swap; src: url("/site/fonts/fredoka-700.woff2") format("woff2"); }

:root {
  --ink: #0B1F5E;
  --ink-muted: #4A5A7F;
  --chrome: #003399;
  --lime: #ADD938;
  --lime-deep: #7FB51F;
  --orange: #FFA600;
  --orange-edge: #E9A400;
  --sky: #1FA4CF;
  --sky-edge: #1689B0;
  --cyan: #53CDE0;
  --gold: #FFC968;
  --link: #3A33B8;
  --link-hover: #221C8A;
  --error: #AA0000;
  --display: Fredoka, Verdana, sans-serif;
  --body: Verdana, Tahoma, Geneva, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--lime);
  color: var(--ink);
  font: 14px/1.55 var(--body);
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- top bar: stands in for the Disney.com chrome strip ---- */
.topbar { background: var(--chrome); color: #FFFFFF; }
.topbar .wrap { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font: 700 20px/1 var(--display); color: #FFFFFF; text-decoration: none; }
.brand span { color: var(--gold); }
.brand:hover { color: #FFFFFF; }
.account { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: bold; }
.account a { color: #FFFFFF; padding: 12px 6px; }
.account .hi { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account .hi-name { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.initial {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--ink); font: 700 14px/1 var(--display);
}
.account a.btn-register {
  padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, #FFC24A 0%, #FF9500 100%);
  border: 2px solid #FFE3A3; box-shadow: 0 2px 0 #B35F00;
}

/* ---- hero: night sky, fireworks, the Play Now disc ---- */
/* The sky tiles at its own size, so a wide window gets more stars, not bigger fireworks. */
.hero {
  position: relative; overflow: hidden; color: #FFFFFF;
  background: url("/site/sky.svg") repeat-x center top / 400px 300px,
    linear-gradient(180deg, #071645 0%, #0F2F7A 55%, #2466C9 100%);
}
.hero-hills { position: absolute; left: 0; bottom: -1px; width: 100%; height: 90px; }
.hero .wrap { position: relative; padding-top: 32px; padding-bottom: 110px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.hero-text { flex: 1 1 320px; min-width: 0; }
.overline { margin: 0 0 8px; font-size: 12px; font-weight: bold; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); }
.hero h1 { margin: 0; font-weight: 700; font-size: 54px; line-height: 1; text-shadow: 0 3px 0 #0A2470, 0 0 18px rgba(43, 238, 255, 0.45); }
.hero h1 span { color: var(--gold); }
.hero h1.greeting { font-size: 44px; line-height: 1.05; text-shadow: 0 3px 0 #0A2470; }
.tagline { margin: 8px 0 0; font: 500 20px/1.3 var(--display); color: #DDEBFF; }
.hero-lede { margin: 14px 0 0; max-width: 460px; font-size: 15px; color: #EAF2FF; }
.hero-play { flex: 0 0 auto; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.play-disc {
  position: relative; width: 168px; height: 168px; border-radius: 50%; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none;
  background: radial-gradient(circle at 50% 35%, #A8EC4A 0%, #6CC52A 45%, #3E9412 100%);
  border: 6px solid #13296B; box-shadow: 0 0 0 3px #3FA2E8, 0 10px 24px rgba(0, 0, 0, 0.45);
  transition: filter 140ms ease;
}
.play-disc:hover { filter: brightness(1.08); }
.play-disc::before {
  content: ""; position: absolute; top: 8px; left: 22px; right: 22px; height: 62px; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
}
.play-disc > span { position: relative; }
.play-disc .play { font: 700 34px/0.95 var(--display); color: #FFFFFF; text-align: center; text-shadow: 0 2px 0 #1F5A08; }
.play-disc .free { margin-top: 4px; padding: 0 8px; border-radius: 6px; font: 700 17px/1.4 var(--display); color: #C2410C; background: #FFF7D6; }
.play-disc .game { font: 600 14px/1.4 var(--display); color: var(--ink); }
/* Outside operating hours: the same disc, dimmed, saying when it opens. */
.play-disc.closed { background: radial-gradient(circle at 50% 35%, #9AA8C7 0%, #6B7A9E 45%, #44507A 100%); cursor: default; }
.play-disc.closed:hover { filter: none; }
.play-disc.closed .play { text-shadow: 0 2px 0 #2B3456; }
.play-disc.closed .game { margin-top: 6px; padding: 0 12px; text-align: center; color: #FFFFFF; font-size: 13px; }
.online-chip { margin: 0; padding: 6px 12px; border-radius: 999px; font-size: 13px; background: rgba(7, 22, 69, 0.6); }

/* ---- section strip ---- */
.sections { background: #FFFFFF; border-bottom: 4px solid var(--lime-deep); }
.sections .wrap { padding: 0 8px; display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; }
.sections a { display: inline-block; padding: 14px 12px; font-size: 13px; font-weight: bold; color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; }
.sections a[aria-current="page"] { color: var(--chrome); border-bottom-color: #FF9500; }

/* ---- page body ---- */
.home-main { flex: 1 0 auto; padding-top: 24px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 24px; }
/* One column on a phone: My VMK comes before the news. */
@media (max-width: 760px) {
  .home-main.signed-in .col-side { order: -1; }
}
.col-wide { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

/* Folder-tab panels (the home page's orange tabs) */
.folder-tab {
  display: inline-block; padding: 8px 18px 6px; border-radius: 12px 12px 0 0; border: 2px solid var(--orange-edge); border-bottom: none;
  background: linear-gradient(180deg, #FFDB4D 0%, #FFC21A 100%);
}
.folder-tab h2 { margin: 0; font-weight: 700; font-size: 20px; color: var(--ink); }
.folder-body {
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  border: 2px solid var(--orange-edge); border-radius: 0 14px 14px 14px;
  background: linear-gradient(170deg, #FFC21A 0%, #FFA600 70%, #FF9500 100%);
}
.news-item { padding: 14px 16px; border-radius: 10px; background: #FFFBEA; }
.news-item .date { margin: 0; font-size: 12px; font-weight: bold; color: #8A4B00; }
.news-item h3 { margin: 2px 0 6px; font-weight: 600; font-size: 18px; }
.news-item p { margin: 0; }
.news-item ul { margin: 6px 0 0; padding-left: 20px; }

/* The dark "Top players" board, here holding staff-featured rooms */
.board {
  overflow: hidden; color: #FFFFFF; border: 3px solid #3B3B3B; border-radius: 14px;
  background: repeating-linear-gradient(180deg, #232323 0px, #232323 2px, #1A1A1A 2px, #1A1A1A 4px);
}
.board h2 { margin: 0; padding: 10px 16px; font: bold 12px/1.4 var(--body); letter-spacing: 1.5px; text-transform: uppercase; background: #000000; }
.board-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.board ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.room-row { display: flex; gap: 12px; align-items: center; }
.room-icon {
  flex: 0 0 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: #2F3B66; border: 2px solid #2BEEFF;
}
.room-row .label { margin: 0; font-size: 11px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; color: #2BEEFF; }
.room-row .name { margin: 2px 0 0; font: 600 18px/1.25 var(--display); overflow-wrap: anywhere; }
.room-row .owner { margin: 0; font-size: 12px; color: #C9CED9; }
.board .empty { margin: 0; color: #E3E6EC; }

/* My VMK (the signed-in sidebar) */
.myvmk { overflow: hidden; background: #FFFFFF; border: 2px solid #E07800; border-radius: 14px; }
.myvmk h2 {
  margin: 0; padding: 10px 16px; font-weight: 700; font-style: italic; font-size: 22px; color: #FFFFFF;
  background: linear-gradient(180deg, #FFA43A 0%, #F07A00 100%); text-shadow: 0 2px 0 #A34E00;
}
.myvmk-body { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.me { display: flex; gap: 12px; align-items: center; }
.me .avatar {
  flex: 0 0 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #E6F3FB; border: 3px solid var(--sky); font: 700 24px/1 var(--display); color: var(--chrome);
}
.me .name { margin: 0; font: 600 20px/1.25 var(--display); overflow-wrap: anywhere; }
.me .since { margin: 0; font-size: 12px; color: var(--ink-muted); }
.stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.stats div { padding: 8px 4px; border-radius: 10px; }
.stats dt { font-size: 11px; font-weight: bold; }
.stats dd { margin: 2px 0 0; font: 700 20px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.stats .credits { background: #FFF4D6; } .stats .credits dt { color: #8A4B00; }
.stats .pins { background: #E6F3FB; } .stats .pins dt { color: #0B4F7A; }
.stats .friends { background: #EEF7D9; } .stats .friends dt { color: #3E6B0A; }
.myvmk h3 { margin: 0 0 6px; font: bold 12px/1.4 var(--body); letter-spacing: 1px; text-transform: uppercase; color: var(--ink-muted); }
.my-rooms { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.my-rooms li { padding: 10px 12px; border-radius: 8px; background: #F4F6FB; font-weight: bold; overflow-wrap: anywhere; }
.my-rooms li.none { font-weight: normal; color: var(--ink-muted); }
.my-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.my-links a { padding: 8px 0; font-weight: bold; }
.my-links a.staff { color: #A33A00; }

.card { padding: 16px; background: #FFFFFF; border: 2px solid var(--lime-deep); border-radius: 14px; }
.card h2 { margin: 0 0 6px; font-weight: 700; font-size: 20px; }
.card p { margin: 0 0 10px; }
.more { display: inline-block; padding: 6px 0; font-weight: bold; }

/* The four "standard content" blurbs */
.blurbs { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.blurb { padding: 16px; display: flex; gap: 12px; align-items: flex-start; background: #FFFFFF; border-radius: 14px; }
.blurb .icon { flex: 0 0 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.blurb h3 { margin: 0 0 4px; font-weight: 600; font-size: 17px; }
.blurb p { margin: 0; }

/* ---- footer: black legal strip ---- */
.footer { background: #000000; color: #C9CED9; font-size: 12px; }
.footer .wrap { padding-top: 20px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer a { color: #FFFFFF; padding: 6px 0; }
.footer p { margin: 0; }

/* ---- register and sign-in ---- */
body.auth { background: linear-gradient(180deg, var(--sky) 0%, var(--cyan) 220px, #BFF1F8 100%) no-repeat, #BFF1F8; }
.auth-main { flex: 1 0 auto; width: 100%; max-width: 480px; margin: 0 auto; padding: 28px 16px 40px; }
.tabs { display: flex; gap: 6px; padding-left: 10px; }
.tab {
  display: inline-block; padding: 10px 20px 8px; margin-top: 6px; border-radius: 12px 12px 0 0; border: 3px solid; border-bottom: none;
  font: 600 18px/1.3 var(--display); color: var(--ink); text-decoration: none;
}
.tab:hover { color: var(--ink); filter: brightness(1.05); }
.tab[aria-current="page"] { position: relative; top: 3px; margin-top: 0; font-weight: 700; background: #FFFFFF; }
.tab.register { border-color: var(--sky-edge); }
.tab.register:not([aria-current]) { background: linear-gradient(180deg, #7FD8F2 0%, var(--sky) 100%); color: #06264F; }
.tab.signin { border-color: #D9781C; }
.tab.signin:not([aria-current]) { background: linear-gradient(180deg, #FFC077 0%, #F79B41 100%); }

.auth-card {
  padding: 20px; display: flex; flex-direction: column; gap: 16px; background: #FFFFFF;
  border: 3px solid var(--sky-edge); border-radius: 16px; box-shadow: 0 8px 0 rgba(6, 38, 79, 0.15);
}
.auth-card.signin { border-color: #D9781C; box-shadow: 0 8px 0 rgba(122, 60, 0, 0.15); }
.auth-card h1 { margin: 0; font-weight: 700; font-size: 30px; line-height: 1.1; color: var(--chrome); }
.auth-card .lede { margin: 6px 0 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: bold; }
.field input {
  min-height: 46px; padding: 0 12px; font: 16px var(--body); color: var(--ink);
  background: #F7FBFF; border: 2px solid #8FB8D6; border-radius: 10px;
}
.auth-card.signin .field input { background: #FFFAF2; border-color: #E8B47F; }
.field input:focus-visible { outline-color: var(--chrome); border-color: var(--chrome); }
.field .hint { margin: 0; font-size: 12px; color: var(--ink-muted); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; cursor: pointer; }
.check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: #4FA81A; }
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px;
  background: #FFF0EE; border: 2px solid var(--error); color: #7A0000; font-weight: bold;
}
.alert svg { flex: 0 0 auto; margin-top: 1px; }
.alert p { margin: 0; }
.btn-play {
  min-height: 52px; width: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer;
  font: 700 20px/1 var(--display); color: #FFFFFF; text-shadow: 0 2px 0 #1F5A08;
  background: linear-gradient(180deg, #A8EC4A 0%, #6CC52A 45%, #3E9412 100%);
  border: 3px solid #13296B; border-radius: 999px; box-shadow: 0 4px 0 #13296B;
  transition: filter 140ms ease;
}
.btn-play:hover { filter: brightness(1.08); }
.btn-play:active { transform: translateY(2px); box-shadow: 0 2px 0 #13296B; }
.auth-card .switch { margin: 0; text-align: center; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.auth-links a { padding: 8px 0; font-weight: bold; }
.tip { margin-top: 20px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, 0.75); border-radius: 14px; }
.tip .icon { flex: 0 0 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.tip h2 { margin: 0 0 2px; font-weight: 600; font-size: 17px; }
.tip p { margin: 0; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
