/* Gaming Center + World Expedition. Tokens and buttons come from ../styles.css */
body.game-body { min-height: 100svh; background: radial-gradient(ellipse 90% 50% at 50% 0%, rgba(34,100,160,.35), transparent 70%), var(--sky-0); }
.nav .nav-links { display: flex; gap: 6px; margin-left: 18px; }
.nav .nav-links a { font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--mist); text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.nav .nav-links a:hover, .nav .nav-links a[aria-current] { color: var(--white); background: rgba(255,255,255,.07); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.08); color: var(--white); cursor: pointer; display: grid; place-items: center; font-size: 18px; flex: none; text-decoration: none; }
.icon-btn:hover { background: rgba(255,255,255,.14); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* ---------- hub ---------- */
.hub-hero { padding: clamp(40px, 7vw, 84px) 0 28px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.hub-hero h1 { font-size: clamp(42px, 7vw, 80px); letter-spacing: -2.5px; }
.hub-hero h1 span { color: var(--gold); }
.hub-hero .lede { margin-top: 16px; }
.player { background: var(--land); color: var(--sky-1); border-radius: 26px; padding: 22px; box-shadow: 0 10px 0 var(--land-2), 0 30px 60px rgba(0,0,0,.4); }
.player-top { display: flex; align-items: center; gap: 14px; }
.player-lvl { width: 58px; height: 58px; border-radius: 18px; background: var(--sky-1); color: var(--gold); display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 24px; flex: none; }
.player-lvl small { display: block; font-size: 9px; letter-spacing: 1.5px; color: var(--mist); margin-bottom: -6px; }
.player-name { font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: -.8px; line-height: 1.1; }
.player-sub { font-size: 13px; color: var(--earth-ink); }
.xpbar { height: 12px; border-radius: 99px; background: rgba(141,110,99,.22); overflow: hidden; margin: 16px 0 6px; }
.xpbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: inherit; transition: width .8s cubic-bezier(.2,.9,.3,1.2); }
.player-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.player-stats div { background: rgba(255,255,255,.55); border-radius: 14px; padding: 10px; text-align: center; }
.player-stats b { display: block; font-family: var(--display); font-weight: 900; font-size: 22px; }
.player-stats span { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--earth); font-weight: 700; }

.hub-section-title { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: -.5px; margin: 34px 0 16px; display: flex; align-items: center; gap: 10px; }
.feature { position: relative; display: grid; grid-template-columns: 1fr 1fr; border-radius: 30px; overflow: hidden; text-decoration: none; color: var(--white);
  background: linear-gradient(135deg, var(--sea-0), var(--sky-2)); border: 1.5px solid rgba(110,180,255,.25); box-shadow: 0 30px 70px rgba(0,0,0,.35); transition: transform .2s; }
.feature:hover { transform: translateY(-3px); }
.feature-copy { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.feature h2 { font-size: clamp(32px, 4.5vw, 48px); }
.feature p { color: #d5e1ee; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--display); font-weight: 800; font-size: 12px; padding: 6px 10px; border-radius: 9px; background: rgba(255,255,255,.1); color: var(--mist); }
.tag.gold { background: var(--gold); color: var(--sky-1); }
.feature-art { position: relative; min-height: 280px; background: radial-gradient(circle at 50% 55%, rgba(110,180,255,.25), transparent 60%); }
.feature-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.feature-prog { width: 100%; max-width: 360px; }
.feature-prog .xpbar { background: rgba(255,255,255,.12); margin: 6px 0; }
.feature-prog small { color: var(--mist); font-size: 13px; }

.soon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.soon-card { position: relative; border-radius: 24px; padding: 22px; background: rgba(255,255,255,.04); border: 1.5px dashed rgba(159,179,200,.22); min-height: 190px; display: flex; flex-direction: column; gap: 8px; }
.soon-card .emoji { font-size: 34px; filter: grayscale(.35); }
.soon-card h3 { font-size: 20px; letter-spacing: -.4px; }
.soon-card p { color: var(--mist); font-size: 14px; }
.soon-card .badge { position: absolute; top: 18px; right: 18px; }
.soon-card.iq { border-style: solid; border-color: rgba(255,197,49,.45); background: rgba(255,197,49,.06); }
.hub-foot-cta { text-align: center; padding: 56px 0 72px; color: var(--mist); }
.hub-foot-cta .follow-row { margin-top: 18px; }

/* ---------- expedition: shared chrome ---------- */
.screen { padding-bottom: 60px; }
.screen[hidden] { display: none; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.topbar h1 { font-size: clamp(24px, 3.5vw, 34px); letter-spacing: -1px; flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 900; font-size: 15px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.07); white-space: nowrap; }
.chip.gold { color: var(--gold); }

/* worlds */
.worlds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.world-card { position: relative; text-align: left; border: 0; cursor: pointer; color: var(--white); border-radius: 26px; overflow: hidden; padding: 0; font: inherit;
  background: linear-gradient(160deg, var(--sea-0), var(--sky-1)); border: 1.5px solid rgba(110,180,255,.2); transition: transform .2s, border-color .2s; display: flex; flex-direction: column; }
.world-card:hover:not(.locked) { transform: translateY(-4px); border-color: var(--gold); }
.world-thumb { aspect-ratio: 16 / 10; position: relative; background: radial-gradient(circle at 50% 50%, rgba(34,100,160,.6), transparent 75%); }
.world-thumb svg { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
.world-thumb .bg { fill: rgba(236,229,211,.18); }
.world-thumb .c { fill: var(--land); opacity: .5; }
.world-thumb .c.f { fill: var(--teal); opacity: 1; }
.world-info { padding: 16px 18px 18px; }
.world-info h2 { font-size: 24px; letter-spacing: -.6px; }
.world-meta { display: flex; justify-content: space-between; font-family: var(--display); font-weight: 800; font-size: 13px; color: var(--mist); margin-top: 6px; }
.world-meta .s { color: var(--gold); }
.world-card .xpbar { background: rgba(255,255,255,.1); margin: 10px 0 0; height: 8px; }
.world-card.locked { cursor: not-allowed; filter: saturate(.3) brightness(.7); }
.world-card .lock { position: absolute; top: 14px; right: 14px; background: rgba(6,17,31,.8); padding: 6px 10px; border-radius: 10px; font-family: var(--display); font-weight: 800; font-size: 12px; color: var(--mist); }
.world-card .done-badge { position: absolute; top: 14px; right: 14px; background: var(--gold); color: var(--sky-1); padding: 6px 10px; border-radius: 10px; font-family: var(--display); font-weight: 900; font-size: 12px; }

/* world map + stage path */
.world-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: stretch; }
.discover { position: relative; border-radius: 24px; background: radial-gradient(circle at 50% 45%, rgba(34,100,160,.55), var(--sea-0) 75%); border: 1.5px solid rgba(110,180,255,.2); overflow: hidden; }
.discover svg { display: block; width: 100%; height: auto; }
.discover .bg { fill: rgba(236,229,211,.16); }
.discover .c { fill: rgba(236,229,211,.55); stroke: var(--sea-0); stroke-width: .8; transition: fill .4s; }
.discover .c.f { fill: var(--teal); }
.discover .dot { fill: rgba(236,229,211,.7); stroke: var(--sea-0); stroke-width: 1; }
.discover .dot.f { fill: var(--teal); }
.discover-label { position: absolute; left: 14px; bottom: 12px; font-family: var(--display); font-weight: 800; font-size: 13px; background: rgba(6,17,31,.75); padding: 6px 10px; border-radius: 10px; }
.discover-label b { color: var(--teal); }
.world-side { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.world-side p { color: var(--mist); }
.path { position: relative; max-width: 560px; margin: 26px auto 0; }
.path svg.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.trail path { fill: none; stroke: rgba(255,197,49,.35); stroke-width: 6; stroke-dasharray: 2 14; stroke-linecap: round; }
.trail path.done { stroke: var(--gold); stroke-dasharray: none; }
.node { position: absolute; translate: -50% -50%; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: var(--white); cursor: pointer; font: inherit; width: 140px; }
.node .disc { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 26px;
  background: var(--sea-1); border: 5px solid #fff; box-shadow: 0 7px 0 rgba(0,0,0,.35), 0 14px 30px rgba(0,0,0,.35); transition: transform .15s; }
.node:hover:not(:disabled) .disc { transform: translateY(-3px) scale(1.04); }
.node.cleared .disc { background: var(--teal); }
.node.current .disc { background: var(--gold); color: var(--sky-1); animation: ping-gold 2s infinite; }
.node.boss .disc { width: 96px; height: 96px; background: var(--pin); font-size: 34px; }
.node.boss.cleared .disc { background: #b8860b; }
.node:disabled { cursor: default; }
.node:disabled .disc { background: #24384f; color: var(--mist-2); border-color: #3a5068; box-shadow: 0 5px 0 rgba(0,0,0,.35); }
.node .nm { font-family: var(--display); font-weight: 800; font-size: 13px; text-align: center; line-height: 1.15; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.node:disabled .nm { color: var(--mist-2); }
.stars { display: flex; gap: 2px; font-size: 16px; line-height: 1; letter-spacing: 0; }
.stars i { font-style: normal; color: rgba(255,255,255,.18); }
.stars i.on { color: var(--gold); text-shadow: 0 2px 0 #b8860b; }

/* ---------- play ---------- */
.play-wrap { max-width: 760px; margin: 0 auto; }
.hud-row { display: flex; align-items: center; gap: 12px; padding: 16px 0 10px; }
.hearts { font-size: 22px; letter-spacing: 2px; white-space: nowrap; }
.hearts .lost { filter: grayscale(1); opacity: .3; }
.qbar { flex: 1; height: 12px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.qbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: inherit; transition: width .4s; }
.timer { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 8px; }
.timer[hidden] { display: none; }
.timer span { display: block; height: 100%; width: 100%; background: var(--pin); border-radius: inherit; transform-origin: left; }
.stage-label { font-family: var(--display); font-weight: 800; font-size: 13px; color: var(--mist); letter-spacing: 1.5px; text-transform: uppercase; }
.qcard { background: rgba(6,17,31,.55); border: 1.5px solid rgba(110,180,255,.2); border-radius: 28px; padding: clamp(18px, 3vw, 28px); box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: pop .35s cubic-bezier(.3,1.4,.5,1); }
.qmode { display: inline-block; font-family: var(--display); font-weight: 900; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; padding: 5px 9px; border-radius: 8px; background: rgba(255,197,49,.14); color: var(--gold); }
.qprompt { font-family: var(--display); font-weight: 900; font-size: clamp(22px, 3.4vw, 30px); letter-spacing: -.6px; line-height: 1.15; margin: 10px 0 16px; }
.qprompt em { font-style: normal; color: var(--gold); }
.qvisual { display: grid; place-items: center; margin-bottom: 18px; }
.flag-big { width: min(340px, 80%); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 16px 40px rgba(0,0,0,.45); background: #fff; }
.flag-sm { width: 44px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 2px rgba(255,255,255,.8); vertical-align: middle; }
.shape-box { width: min(300px, 80%); aspect-ratio: 1; border-radius: 22px; background: radial-gradient(circle at 40% 35%, var(--sea-1), var(--sea-0)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.1); position: relative; overflow: hidden; }
.shape-box svg { width: 100%; height: 100%; }
.shape-box path { fill: var(--land); stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { font-family: var(--display); font-weight: 800; font-size: 17px; text-align: left; padding: 16px 18px; border-radius: 16px; border: 0; cursor: pointer; color: var(--sky-1); background: var(--white);
  box-shadow: 0 5px 0 #c9d4e0; transition: transform .12s, background .2s; display: flex; align-items: center; gap: 12px; min-height: 64px; line-height: 1.2; }
.opt kbd { font-family: inherit; font-size: 12px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--sky-1); color: var(--white); flex: none; }
.opt:hover:not(:disabled) { transform: translateY(-2px); }
.opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #c9d4e0; }
.opt:disabled { cursor: default; opacity: .5; }
.opt.ok { background: var(--teal); color: #fff; opacity: 1; box-shadow: 0 5px 0 #1f7a6f; }
.opt.no { background: var(--pin); color: #fff; opacity: 1; box-shadow: 0 5px 0 #c1121f; animation: shake .35s; }
.opts.flags .opt { padding: 10px; justify-content: center; position: relative; }
.opts.flags .opt img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.opts.flags .opt kbd { position: absolute; top: 14px; left: 14px; }
.opts.duel { grid-template-columns: 1fr 1fr; }
.opts.duel .opt { flex-direction: column; text-align: center; justify-content: center; padding: 18px 12px; gap: 10px; font-size: 18px; }
.opts.duel .opt img { width: 90px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.opts.duel .opt .pop { font-size: 14px; font-weight: 700; opacity: 0; transition: opacity .3s; }
.opts.duel.revealed .opt .pop { opacity: 1; }
.locate { position: relative; border-radius: 20px; overflow: hidden; background: radial-gradient(circle at 50% 45%, var(--sea-1), var(--sea-0) 80%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.1); touch-action: manipulation; }
.locate svg { display: block; width: 100%; height: auto; }
.locate .bg { fill: rgba(236,229,211,.22); pointer-events: none; }
.locate .c { fill: var(--land); stroke: var(--sea-0); stroke-width: 1; cursor: pointer; transition: fill .15s; }
@media (hover: hover) { .locate .c:hover { fill: #fff3cf; } }
.locate .hit { fill: transparent; cursor: pointer; }
.locate .dot { fill: var(--land); stroke: var(--sea-0); stroke-width: 1.5; pointer-events: none; }
.locate .c.ok, .locate .dot.ok { fill: var(--teal); }
.locate .c.no, .locate .dot.no { fill: var(--pin); }
.locate.done .c, .locate.done .hit { cursor: default; pointer-events: none; }
.locate-tip { position: absolute; pointer-events: none; background: #fff; color: var(--sky-1); font-family: var(--display); font-weight: 800; font-size: 13px; padding: 5px 9px; border-radius: 9px; translate: -50% -130%; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.locate-tip[hidden] { display: none; }
.feedback { margin-top: 16px; border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; animation: pop .3s cubic-bezier(.3,1.4,.5,1); }
.feedback[hidden] { display: none; }
.feedback.ok { background: rgba(42,157,143,.18); border: 1.5px solid rgba(42,157,143,.6); }
.feedback.no { background: rgba(230,57,70,.14); border: 1.5px solid rgba(230,57,70,.55); }
.feedback .fb-text { flex: 1; font-size: 15px; color: #d5e1ee; }
.feedback .fb-text b { color: #fff; font-family: var(--display); }
.feedback .fb-title { display: block; font-family: var(--display); font-weight: 900; font-size: 18px; }
.feedback.ok .fb-title { color: #5fd3c4; } .feedback.no .fb-title { color: #ff8a93; }
.xp-float { position: fixed; z-index: 70; pointer-events: none; font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--gold); text-shadow: 0 3px 0 #b8860b; animation: floatUp .9s ease-out forwards; }
@keyframes floatUp { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -60px); } }

/* results */
.result { max-width: 520px; margin: 30px auto 0; text-align: center; background: var(--land); color: var(--sky-1); border-radius: 30px; padding: 30px 26px; box-shadow: 0 10px 0 var(--land-2), 0 40px 80px rgba(0,0,0,.5); animation: pop .5s cubic-bezier(.3,1.5,.5,1); }
.result .big-stars { display: flex; justify-content: center; gap: 10px; font-size: 64px; line-height: 1; margin: 6px 0 10px; }
.result .big-stars i { font-style: normal; color: rgba(141,110,99,.25); transform: scale(.4); opacity: 0; }
.result .big-stars i.show { animation: starIn .5s cubic-bezier(.3,1.8,.5,1) forwards; }
.result .big-stars i.on { color: var(--gold); text-shadow: 0 5px 0 #b8860b; }
@keyframes starIn { to { transform: scale(1); opacity: 1; } }
.result h2 { font-size: 38px; letter-spacing: -1.4px; }
.result .res-sub { color: var(--earth-ink); margin: 6px 0 18px; }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.res-stats div { background: rgba(255,255,255,.6); border-radius: 14px; padding: 10px 6px; }
.res-stats b { display: block; font-family: var(--display); font-weight: 900; font-size: 24px; }
.res-stats span { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--earth); font-weight: 700; }
.res-new { margin-bottom: 18px; font-size: 14px; color: var(--earth-ink); }
.res-new .flag-sm { width: 30px; margin: 2px; }
.res-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn-dark { background: var(--sky-1); color: var(--white); box-shadow: 0 5px 0 #000; }
.loading { text-align: center; color: var(--mist); padding: 80px 0; font-family: var(--display); font-weight: 800; }

@media (max-width: 960px) {
  .hub-hero, .world-head { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
  .feature-art { min-height: 200px; order: -1; }
  .worlds, .soon-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav .nav-links { margin-left: 4px; }
  .nav .nav-links a { padding: 8px; font-size: 13px; }
  .worlds, .soon-grid { grid-template-columns: 1fr; }
  .opts { grid-template-columns: 1fr; gap: 10px; }
  .opts.flags, .opts.duel { grid-template-columns: 1fr 1fr; }
  .opt { min-height: 54px; padding: 12px 14px; font-size: 16px; }
  .node { width: 110px; } .node .disc { width: 62px; height: 62px; font-size: 22px; } .node.boss .disc { width: 80px; height: 80px; }
  .result .big-stars { font-size: 52px; }
}

/* fixes after device testing */
.locate svg { max-height: 64vh; margin: 0 auto; }
@media (max-width: 640px) {
  .game-body .nav { gap: 10px; }
  .game-body .nav .nav-links a[href="/"] { display: none; }
  .game-body .hud-rank { display: none; }
  .feedback { flex-wrap: wrap; }
  .feedback .fb-text { flex: 1 1 60%; }
  .feedback .btn { flex: 1 1 100%; justify-content: center; }
}
