/* Guess the Country by the Food — styles. Recreates the approved Claude Design mock. */

@keyframes gc-pop   { 0%{transform:scale(.9);opacity:0} 100%{transform:scale(1);opacity:1} }
@keyframes gc-fade  { from{opacity:0} to{opacity:1} }
@keyframes gc-shake { 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)} 30%,50%,70%{transform:translateX(-5px)} 40%,60%{transform:translateX(5px)} }
@keyframes gc-pulse { 0%,100%{box-shadow:0 0 0 0 transparent} 50%{box-shadow:0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent)} }
@keyframes gc-bubble{ from{opacity:0;transform:translateX(-50%) scale(.9)} to{opacity:1;transform:translateX(-50%) scale(1)} }

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

.gc-root {
  --accent: #ff8a34;
  --accent-ink: #14140f;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.gc-dark {
  --bg:#0d0d0f; --surface:#1a1a1f; --surface2:#232329; --line:#2c2c34; --ink:#f4f4f0;
  --muted:#a6a6b0; --tert:#6e6e78; --greyA:#232329; --greyB:#1c1c22; --greyInk:#4a4a54; --greySub:#3a3a42;
  --overlay:rgba(9,9,11,.88); --arrowBg:rgba(13,13,15,.7);
}
.gc-light {
  --bg:#f7f7f2; --surface:#ffffff; --surface2:#eeeee8; --line:#e2e2da; --ink:#1a1a17;
  --muted:#57574e; --tert:#8a8a80; --greyA:#e8e8e1; --greyB:#dddcd4; --greyInk:#b6b6ab; --greySub:#c6c6bc;
  --overlay:rgba(30,30,26,.45); --arrowBg:rgba(255,255,255,.78);
}

.gc-wrap { max-width: 1280px; margin: 0 auto; padding: 18px 20px 48px; }

/* Topbar */
.gc-top { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding-bottom:16px; border-bottom:1px solid var(--line); margin-bottom:18px; }
.gc-title { font-size:clamp(17px,4.4vw,21px); font-weight:800; letter-spacing:-.02em; line-height:1.1; color:var(--ink); }
.gc-title span { color: var(--accent); }
.gc-sub { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; margin-top:3px; }
.gc-top-right { display:flex; gap:8px; flex-shrink:0; align-items:stretch; }
.gc-iconbtn { width:auto; min-width:46px; padding:0 12px; border-radius:999px; background:var(--surface);
  border:1px solid var(--line); color:var(--ink); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.gc-iconbtn:hover { border-color: var(--tert); }
.gc-pill { background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:7px 14px; text-align:center; min-width:78px; }
.gc-pill-label { font-size:10px; color:var(--tert); text-transform:uppercase; letter-spacing:.1em; }
.gc-pill-val { font-size:17px; font-weight:800; line-height:1.1; font-variant-numeric:tabular-nums; }
.gc-pill-val.score { color: var(--accent); }
.gc-pill-val.round { color: var(--ink); }

/* Body layout */
.gc-body { display:flex; flex-wrap:wrap; gap:18px; align-items:flex-start; }
.gc-left  { flex:2 1 420px; min-width:min(100%,340px); }
.gc-right { flex:1 1 320px; min-width:min(100%,300px); }

/* Image frame */
.gc-frame { position:relative; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--surface); }
.gc-stage { position:relative; width:100%; aspect-ratio:4/3; background:var(--greyB); display:flex; align-items:center; justify-content:center; }
.gc-stage img { width:100%; height:100%; object-fit:cover; display:block; cursor:zoom-in; }
.gc-stage.greybox { background-image:repeating-linear-gradient(45deg,var(--greyA) 0,var(--greyA) 14px,var(--greyB) 14px,var(--greyB) 28px); }
.gc-greylabel { text-align:center; }
.gc-greylabel .big { font-size:clamp(26px,6vw,44px); font-weight:900; letter-spacing:.12em; color:var(--greyInk); }
.gc-greylabel .sub { font-size:12px; color:var(--greySub); text-transform:uppercase; letter-spacing:.14em; margin-top:6px; }
.gc-arrow { position:absolute; top:50%; transform:translateY(-50%); width:44px; height:44px; border-radius:999px;
  border:1px solid var(--line); background:var(--arrowBg); backdrop-filter:blur(6px); color:var(--ink);
  font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.gc-arrow.prev { left:10px; } .gc-arrow.next { right:10px; }
.gc-pos { position:absolute; bottom:10px; left:50%; transform:translateX(-50%); background:var(--arrowBg);
  backdrop-filter:blur(6px); border:1px solid var(--line); border-radius:999px; padding:4px 12px;
  font-size:12px; font-weight:600; color:var(--ink); font-variant-numeric:tabular-nums; }

/* Tier ladder */
.gc-tiers { display:flex; gap:8px; margin-top:12px; }
.gc-tier-wrap { position:relative; flex:1; min-width:0; }
.gc-tier { width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  border-radius:10px; padding:11px 6px; font-family:inherit; text-align:center; transition:transform .16s,border-color .16s;
  background:transparent; border:1px dashed var(--line); color:var(--tert); cursor:not-allowed; opacity:.5; }
.gc-tier .emoji { font-size:23px; line-height:1; }
.gc-tier .lbl { font-size:14px; font-weight:700; letter-spacing:.01em; color:inherit; }
.gc-tier.unlocked { background:var(--surface); border:1px solid var(--line); color:var(--ink); cursor:pointer; opacity:1; }
.gc-tier.unlocked:hover { transform:translateY(-1px); border-color:var(--tert); }
.gc-tier.active { background:var(--accent); border:1px solid var(--accent); color:#14140f; cursor:pointer; opacity:1; }
.gc-tier.active:hover { transform:translateY(-1px); }
.gc-tier.next { background:transparent; border:1px dashed var(--accent); color:var(--muted); cursor:pointer; opacity:1; animation:gc-pulse 1.8s ease-in-out infinite; }
.gc-tier.next:hover { transform:translateY(-3px); color:var(--ink); }
.gc-bubble { position:absolute; top:calc(100% + 9px); left:50%; transform:translateX(-50%); z-index:30;
  background:var(--accent); color:var(--accent-ink); font-size:12px; font-weight:700; padding:8px 12px;
  border-radius:9px; white-space:nowrap; cursor:pointer; box-shadow:0 8px 24px rgba(0,0,0,.35);
  animation:gc-bubble .18s cubic-bezier(.34,1.56,.64,1); }
.gc-bubble .caret { position:absolute; bottom:100%; left:50%; transform:translateX(-50%); border:6px solid transparent; border-bottom-color:var(--accent); }

/* Guess panel */
.gc-col { display:flex; flex-direction:column; gap:14px; }
.gc-guessbar { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:12px 15px;
  display:flex; align-items:center; justify-content:space-between; gap:10px; }
.gc-guessbar .lead { display:flex; align-items:center; gap:10px; }
.gc-cap { font-size:12px; color:var(--tert); text-transform:uppercase; letter-spacing:.09em; }
.gc-dots { display:flex; gap:6px; }
.gc-dot { width:12px; height:12px; border-radius:999px; background:var(--line); }
.gc-dot.on { background:var(--accent); }
.gc-worth { font-size:14px; color:var(--muted); }
.gc-worth b { color:var(--accent); font-variant-numeric:tabular-nums; }

.gc-inputwrap { position:relative; }
.gc-input { width:100%; height:50px; background:var(--surface); border:1px solid var(--line); border-radius:12px;
  color:var(--ink); font-size:16px; padding:0 15px; outline:none; font-family:inherit; }
.gc-input:focus { border-color:var(--accent); }
.gc-input.shake { border-color:#ff5d5d; animation:gc-shake .42s ease; }
.gc-drop { position:absolute; top:56px; left:0; right:0; z-index:20; background:var(--surface); border:1px solid var(--line);
  border-radius:12px; overflow:hidden; box-shadow:0 12px 40px rgba(0,0,0,.4); max-height:320px; overflow-y:auto; animation:gc-fade .12s ease; }
.gc-opt { display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:transparent; border:none;
  border-bottom:1px solid var(--surface2); padding:12px 15px; cursor:pointer; font-size:15px; font-family:inherit; color:var(--ink); }
.gc-opt:last-child { border-bottom:none; }
.gc-opt:hover { background:var(--surface2); }
.gc-opt.tried { color:var(--muted); }
.gc-opt .flag { font-size:22px; line-height:1; }
.gc-opt .nm { font-weight:600; flex:1; min-width:0; }
.gc-opt .tag { font-size:11px; text-transform:uppercase; letter-spacing:.09em; color:var(--tert); }

.gc-tried-h { font-size:12px; color:var(--tert); text-transform:uppercase; letter-spacing:.09em; margin-bottom:8px; }
.gc-chips { display:flex; flex-wrap:wrap; gap:7px; }
.gc-chip { display:inline-flex; align-items:center; gap:6px; background:var(--bg); border:1px solid var(--line);
  border-radius:999px; padding:5px 11px 5px 9px; font-size:13px; color:var(--muted); }
.gc-chip .flag { font-size:15px; }

/* Answer / game-over cards */
.gc-verdict { display:flex; align-items:center; gap:12px; border-radius:12px; padding:14px 15px; animation:gc-shake .45s ease; }
.gc-verdict.win  { background:rgba(56,208,138,.12); border:1px solid #38d08a; }
.gc-verdict.lose { background:rgba(255,93,93,.1);  border:1px solid #ff6b6b; }
.gc-verdict .flag { font-size:28px; line-height:1; }
.gc-verdict .k { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.gc-verdict.win  .k { color:#38d08a; }
.gc-verdict.lose .k { color:#ff8a8a; }
.gc-verdict .country { font-size:20px; font-weight:800; letter-spacing:-.01em; color:var(--ink); }
.gc-card { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 15px; }
.gc-card .rest { font-size:15px; font-weight:700; color:var(--ink); }
.gc-card .city { font-size:13px; color:var(--muted); margin-top:2px; }
.gc-maplink { display:inline-flex; align-items:center; gap:6px; margin-top:11px; font-size:13px; font-weight:600; color:var(--accent); text-decoration:none; }
.gc-scorebox { display:flex; justify-content:space-between; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 15px; }
.gc-scorebox .cap { font-size:11px; color:var(--tert); text-transform:uppercase; letter-spacing:.09em; }
.gc-scorebox .big { font-size:26px; font-weight:900; line-height:1.1; font-variant-numeric:tabular-nums; }
.gc-scorebox .big.score { color:var(--accent); } .gc-scorebox .big.cleared { color:var(--ink); }
.gc-btn { width:100%; height:50px; background:var(--accent); border:none; border-radius:12px; color:var(--accent-ink);
  font-size:16px; font-weight:800; cursor:pointer; font-family:inherit; }
.gc-btn:active { transform:scale(.97); }

/* Zoom hint badge on the image */
.gc-zoomhint { position:absolute; top:10px; right:10px; display:flex; align-items:center; gap:5px;
  background:var(--arrowBg); backdrop-filter:blur(6px); border:1px solid var(--line); border-radius:999px;
  padding:5px 10px; font-size:11px; font-weight:600; color:var(--ink); pointer-events:none;
  text-transform:uppercase; letter-spacing:.06em; opacity:.9; }
.gc-zoomhint svg { display:block; }

/* Scale the whole game up a notch on large desktop displays */
@media (min-width: 1100px) {
  .gc-title { font-size:24px; }
  .gc-pill-val { font-size:19px; }
  .gc-input { height:54px; font-size:17px; }
  .gc-btn { height:54px; font-size:17px; }
  .gc-tier .lbl { font-size:15px; }
  .gc-tier .emoji { font-size:25px; }
}

/* ---- Lightbox (click-to-zoom) ---- */
.gc-lb { position:fixed; inset:0; z-index:1000; background:rgba(6,6,8,.94);
  display:none; align-items:center; justify-content:center; touch-action:none; overscroll-behavior:contain; }
.gc-lb.open { display:flex; animation:gc-fade .14s ease; }
.gc-lb-stage { position:relative; width:100%; height:100%; overflow:hidden;
  display:flex; align-items:center; justify-content:center; }
.gc-lb-img { max-width:96vw; max-height:92vh; user-select:none; -webkit-user-drag:none;
  transform-origin:0 0; will-change:transform; cursor:grab; touch-action:none; }
.gc-lb-img.grabbing { cursor:grabbing; }
.gc-lb-close { position:absolute; top:14px; right:16px; width:46px; height:46px; border-radius:999px;
  background:rgba(20,20,24,.8); border:1px solid rgba(255,255,255,.18); color:#fff; font-size:22px;
  cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:2; }
.gc-lb-nav { position:absolute; top:50%; transform:translateY(-50%); width:52px; height:52px; border-radius:999px;
  background:rgba(20,20,24,.72); border:1px solid rgba(255,255,255,.18); color:#fff; font-size:26px;
  cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:2; }
.gc-lb-nav.prev { left:14px; } .gc-lb-nav.next { right:14px; }
.gc-lb-hint { position:absolute; bottom:16px; left:50%; transform:translateX(-50%);
  background:rgba(20,20,24,.72); border:1px solid rgba(255,255,255,.16); color:#e8e8ea; border-radius:999px;
  padding:7px 14px; font-size:12px; font-weight:500; z-index:2; white-space:nowrap; }
.gc-lb-pos { position:absolute; top:16px; left:50%; transform:translateX(-50%);
  background:rgba(20,20,24,.72); border:1px solid rgba(255,255,255,.16); color:#fff; border-radius:999px;
  padding:5px 13px; font-size:12px; font-weight:600; z-index:2; font-variant-numeric:tabular-nums; }

/* Gentle fade when a new clue (tier/round) is revealed — smooths the transition */
@keyframes gc-cluein { from { opacity: 0 } to { opacity: 1 } }
.gc-stage img.gc-cluein { animation: gc-cluein .30s ease; }

/* ---- Leaderboard (M2) — matches the existing card/overlay system ---- */
.gc-lbbox { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 15px; }
.gc-lbtitle { font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--ink); display:flex; align-items:center; gap:7px; }
.gc-lb-form { display:flex; gap:9px; margin-top:11px; }
.gc-lb-form .gc-input { height:46px; }
.gc-lb-form .gc-btn { height:46px; width:auto; padding:0 20px; flex-shrink:0; }
.gc-lb-err { margin-top:9px; font-size:13px; color:#ff8a8a; }
.gc-lb-rankline { margin-top:9px; font-size:13px; color:var(--muted); }
.gc-lb-rankline b { color:var(--accent); font-variant-numeric:tabular-nums; }
.gc-lb-empty { padding:26px 10px; text-align:center; color:var(--muted); font-size:14px; }

.gc-lbtable { margin-top:11px; display:flex; flex-direction:column; }
.gc-lbrow { display:grid; grid-template-columns:34px 1fr auto auto; align-items:center; gap:10px;
  padding:9px 10px; border-radius:8px; font-size:14px; }
.gc-lbrow + .gc-lbrow { border-top:1px solid var(--surface2); }
.gc-lbrow .rk { font-weight:800; color:var(--tert); font-variant-numeric:tabular-nums; text-align:right; }
.gc-lbrow .nm { font-weight:600; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gc-lbrow .rd { font-size:13px; color:var(--muted); font-variant-numeric:tabular-nums; min-width:52px; text-align:right; }
.gc-lbrow .sc { font-weight:800; color:var(--accent); font-variant-numeric:tabular-nums; min-width:52px; text-align:right; }
.gc-lbrow.head { padding-bottom:6px; border-top:none; }
.gc-lbrow.head span { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--tert); }
.gc-lbrow.head .sc, .gc-lbrow.head .rd { color:var(--tert); }
.gc-lbrow.me { background:color-mix(in srgb, var(--accent) 16%, transparent); }
.gc-lbrow.me .rk { color:var(--accent); }

/* Leaderboard modal (opened from the header) — reuses the lightbox overlay pattern */
.gc-modal { position:fixed; inset:0; z-index:900; background:var(--overlay); display:flex; align-items:center;
  justify-content:center; padding:20px; animation:gc-fade .14s ease; }
.gc-modal-card { width:100%; max-width:460px; max-height:min(80vh,640px); background:var(--surface);
  border:1px solid var(--line); border-radius:16px; box-shadow:0 24px 70px rgba(0,0,0,.5);
  display:flex; flex-direction:column; overflow:hidden; animation:gc-pop .18s cubic-bezier(.34,1.56,.64,1); }
.gc-modal-head { display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:16px 18px; border-bottom:1px solid var(--line); }
.gc-modal-close { width:38px; height:38px; border-radius:999px; background:var(--surface2); border:1px solid var(--line);
  color:var(--ink); font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.gc-modal-close:hover { border-color:var(--tert); }
.gc-modal-body { padding:8px 16px 18px; overflow-y:auto; }

/* ---- Top nav: back to the main site (M2) ---- */
.gc-nav { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.gc-back { display:inline-flex; align-items:center; gap:7px; color:var(--muted); text-decoration:none;
  font-size:13px; font-weight:600; padding:7px 13px 7px 10px; border:1px solid var(--line);
  border-radius:999px; background:var(--surface); transition:border-color .16s, color .16s; }
.gc-back:hover { color:var(--ink); border-color:var(--tert); }
.gc-back svg { display:block; }
.gc-brand { display:inline-flex; align-items:baseline; color:var(--ink); text-decoration:none;
  font-size:14px; font-weight:800; letter-spacing:-.01em; }
.gc-brand i { width:5px; height:5px; border-radius:999px; background:var(--accent); margin-left:3px; display:inline-block; }
