@import url("./answer-feedback.css");

:root {
  color-scheme: dark;
  --bg: #08162c;
  --panel: #10223f;
  --line: #2c4263;
  --lime: #9bc1ff;
  --blue: #a8caff;
  --gray: #b6c5dc;
  --text: #ffffff;
  font:
    16px/1.5 "Avenir Next",
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
a {
  color: var(--blue);
}
button,
input,
select {
  font: inherit;
}
button,
a.button {
  cursor: pointer;
}
button {
  background: none;
  color: inherit;
  border: 0;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.skip {
  position: fixed;
  top: -60px;
  z-index: 20;
  background: var(--panel);
  padding: 10px;
}
.skip:focus {
  top: 0;
}
.top {
  height: 76px;
  padding: 0 clamp(16px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand,
.account {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand {
  letter-spacing: -1px;
  font-size: 19px;
  font-weight: 900;
}
.brand img {
  width: 38px;
}
.account {
  color: var(--gray);
  font-size: 14px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #1c3a68;
  color: var(--blue);
  border-radius: 50%;
  font-weight: 800;
}
.layout {
  max-width: 1570px;
  margin: auto;
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 66px);
  padding: 30px clamp(16px, 5vw, 80px) 60px;
}
.side {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.side button {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 8px;
  color: var(--gray);
  min-height: 44px;
  font-weight: 600;
}
.side button.on,
.side button:hover {
  background: #173461;
  color: var(--lime);
}
.side svg,
.ico {
  width: 20px;
  height: 20px;
  flex: none;
}
.sep {
  height: 1px;
  background: var(--line);
  margin: 13px 0;
}
.hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(105deg, #0c2555, #143d79);
  border: 1px solid #315b98;
  border-radius: 20px;
}
.hero img {
  position: absolute;
  right: -6%;
  width: 68%;
  height: 100%;
  object-fit: cover;
}
.hero .copy {
  position: relative;
  z-index: 1;
  padding: clamp(22px, 3vw, 50px);
  background: linear-gradient(90deg, #0c2555 65%, transparent);
  width: 56%;
}
.hero h1 {
  font-size: clamp(38px, 4.4vw, 72px);
  line-height: 1;
  letter-spacing: -0.065em;
  margin: 6px 0 22px;
}
.hero h1 span {
  display: block;
  color: var(--lime);
}
.hero p {
  max-width: 31ch;
  margin-bottom: 22px;
}
.button,
.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 9px;
  font-weight: 750;
  text-decoration: none;
}
.primary {
  background: #0955c5;
  color: #ffffff;
}
.secondary,
.button {
  background: #183358;
  color: var(--text);
  border: 1px solid var(--line);
}
.danger {
  background: #552d34;
  color: #ffced1;
}
.actions,
.split,
.tabs,
.scoreline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.split {
  justify-content: space-between;
}
.section {
  margin: 26px 0 12px;
}
h1,
h2,
h3 {
  line-height: 1.14;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(28px, 3.4vw, 54px);
}
h2 {
  font-size: 25px;
  margin: 0;
}
h3 {
  font-size: 20px;
  margin: 0 0 8px;
}
p,
.muted,
small {
  color: var(--gray);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.card,
.box,
.mode {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 19px;
  text-align: left;
}
.mode {
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition:
    transform 0.16s,
    border-color 0.16s;
}
.mode:hover {
  border-color: var(--lime);
  transform: translateY(-2px);
}
.mode .mark {
  font-size: 26px;
  color: var(--lime);
}
.mode:nth-child(3n + 2) .mark {
  color: var(--blue);
}
.mode strong {
  font-size: 20px;
}
.mode small {
  margin-top: auto;
}
.modehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel {
  max-width: 820px;
  margin: auto;
}
.box {
  margin: 12px 0;
}
.form {
  display: grid;
  gap: 14px;
}
.form label {
  display: grid;
  gap: 5px;
}
.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.check input {
  width: 20px;
  height: 20px;
}
input,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #091a34;
  color: white;
  border: 1px solid #58759f;
}
button svg {
  vertical-align: middle;
}
.pill {
  color: var(--lime);
  background: #173461;
  border-radius: 20px;
  font-size: 13px;
  padding: 5px 12px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border: 0;
}
.value {
  font-size: 30px;
  font-weight: 800;
  color: var(--lime);
}
.scoreline {
  justify-content: space-between;
}
.scoreline strong {
  font-size: 24px;
}
.arena {
  padding: clamp(18px, 4vw, 50px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  margin: 35px 0;
  font-size: clamp(22px, 3vw, 48px);
  font-weight: 850;
  line-height: 1.15;
}
.pair span {
  flex: 1;
}
.pair i {
  color: var(--lime);
  font-size: 20px;
}
.timer {
  font:
    700 20px ui-monospace,
    monospace;
  color: var(--lime);
}
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.choices button {
  text-align: left;
  justify-content: flex-start;
}
.choices b {
  background: #244572;
  color: var(--blue);
  padding: 2px 8px;
  border-radius: 4px;
}
.good {
  color: var(--lime);
}
.bad {
  color: #ffafb7;
}
.qr {
  width: 130px;
  display: block;
  margin-top: 12px;
}
.obs {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding: 4vw;
  background: radial-gradient(ellipse at center, #142953, #08162c);
}
.obs .arena {
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.obs .pair {
  font-size: 5vw;
}
.obs .scoreline {
  font-size: 2vw;
}
.obs .scoreline strong {
  font-size: 3vw;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #183358;
  padding: 11px 18px;
  border-radius: 9px;
  max-width: 90vw;
  box-shadow: 0 4px 24px #0006;
}
#toast:empty {
  display: none;
}
.tabs button {
  min-height: 42px;
  border-bottom: 2px solid transparent;
  color: var(--gray);
}
.tabs button.on {
  color: var(--lime);
  border-color: var(--lime);
}
.links a {
  overflow-wrap: anywhere;
}
.countdown {
  text-align: center;
  font-size: clamp(40px, 8vw, 96px);
  color: var(--lime);
  animation: pulse 1s infinite;
}
@keyframes pulse {
  50% {
    transform: scale(1.08);
  }
}
footer {
  margin-top: 28px;
  font-size: 12px;
  color: var(--gray);
}
@media (max-width: 1050px) {
  .layout {
    grid-template-columns: 155px minmax(0, 1fr);
    gap: 20px;
    padding-inline: 20px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero img {
    right: -13%;
  }
}
@media (max-width: 740px) {
  .layout {
    display: block;
    padding: 10px 14px 38px;
  }
  .top {
    height: 58px;
    padding: 0 14px;
  }
  .side {
    flex-direction: row;
    overflow: auto;
    margin: 0 -14px 14px;
    padding: 3px 14px;
    gap: 3px;
  }
  .side button {
    flex-shrink: 0;
    font-size: 14px;
    padding: 8px;
  }
  .side .sep {
    display: none;
  }
  .hero {
    min-height: 236px;
  }
  .hero .copy {
    width: 66%;
    padding: 18px;
  }
  .hero h1 {
    font-size: 37px;
  }
  .hero img {
    width: 68%;
    right: -19%;
  }
  .hero p {
    font-size: 13px;
    max-width: 22ch;
  }
  .grid {
    gap: 9px;
  }
  .mode,
  .card {
    padding: 13px;
  }
  .pair {
    gap: 8px;
  }
  .choices {
    grid-template-columns: 1fr;
  }
  .row {
    flex-wrap: wrap;
  }
  .account {
    max-width: 45%;
    overflow: hidden;
  }
  .box {
    padding: 14px;
  }
  .obs .choices {
    grid-template-columns: 1fr 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.obs {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  padding: 3vh 3vw;
  gap: 1vh;
  overflow: hidden;
}
.obs .section {
  margin: 1vh 0;
}
.obs .arena {
  aspect-ratio: auto;
  min-height: 0;
}
.obs footer {
  display: none;
}

@media (display-mode: standalone) {
  body {
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
      env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
}
.country-game {max-width:760px;margin:0 auto;padding:clamp(18px,5vw,52px)}
.country-game h1 {font-size:clamp(2.4rem,8vw,4.6rem);letter-spacing:-.06em;line-height:1.04;margin:.3em 0;color:var(--lime)}
.country-game #panel {padding:clamp(14px,3vw,26px);background:var(--panel);border:1px solid var(--line);border-radius:20px}
.country-game #panel h2 {margin:.6em 0 .35em}
.country-game button,.country-game input {border-radius:10px;padding:10px 15px;min-height:48px;margin:4px;border:1px solid var(--line);background:#1d3243;max-width:100%}
.country-game button[aria-pressed=true],.country-game button:hover {background:var(--lime);color:var(--bg)}
.country-game input {color:var(--text);background:var(--bg)}
.country-game #clock {display:block;color:var(--lime);font-size:2em;font-variant-numeric:tabular-nums}
.country-game #error,.country-game #msg {color:#ffc5b9}

.archive-practice form:not([hidden]), .archive-practice #options { display: grid; gap: .7rem; }
.archive-practice label { display: block; min-width: 0; }
.archive-practice input, .archive-practice button { margin: 0; }
.archive-practice input[type=checkbox] { width: 1.25rem; min-height: 1.25rem; vertical-align: middle; }
.archive-practice section { overflow-wrap: anywhere; }

/* Result colors must remain legible even under the country button hover rules. */
.country-game .answer-option.correct,
.country-game .answer-option.correct:hover {
  color: var(--answer-good);
  background: var(--answer-good-bg);
  border: 2px solid var(--answer-good);
}
.country-game .answer-option.wrong,
.country-game .answer-option.wrong:hover {
  color: var(--answer-bad);
  background: var(--answer-bad-bg);
  border: 2px solid var(--answer-bad);
}
.country-game button:disabled { cursor: default; }

/* Shared OF identity: Parliament blue, deep navy and clear white type. */
.top { background: #0b1c36; }
.brand img { width: 42px; height: 42px; border-radius: 10px; }
.hero { min-height: 350px; background: #0c2555; }
.hero img { inset: 0; width: 100%; height: 100%; object-position: center; opacity: .85; }
.hero .copy { width: 100%; background: linear-gradient(90deg, #0c2555 10%, #0c2555ed 38%, #0c255520 100%); }
.hero h1 { max-width: 15ch; font-size: clamp(38px, 4.3vw, 67px); letter-spacing: -.055em; }
.hero h1 span { color: #fff; }
.hero .eyebrow { color: #b5d1ff; font-size: 11px; letter-spacing: .15em; font-weight: 800; margin: 0 0 15px; max-width: none; }
.hero p { color: #d9e6fa; }
.primary:hover { background: #1464dc; }
.mode { min-height: 165px; background: linear-gradient(140deg, #152d50, #10223f); }
.mode .mark { color: #a8caff; }
.arena .timer { background: #1a345a; color: #d4e4ff; border-radius: 8px; padding: 4px 9px; }
@media (max-width: 740px) {
  .brand { font-size: 16px; letter-spacing: -.5px; gap: 8px; }
  .brand img { width: 34px; height: 34px; border-radius: 8px; }
  .hero { min-height: 300px; }
  .hero .copy { width: 100%; padding: 24px 20px; background: linear-gradient(90deg, #0c2555ed 5%, #0c2555a8 100%); }
  .hero img { inset: 0; width: 100%; object-position: 68% center; }
  .hero h1 { font-size: clamp(36px, 8vw, 48px); }
  .hero p { max-width: 30ch; font-size: 14px; }
  .hero .eyebrow { font-size: 10px; letter-spacing: .1em; }
  .mode { min-height: 150px; }
}

/* Canlı Oyna navigation shares the existing menu rhythm. */
.side .live-nav{display:flex;align-items:center;gap:12px;padding:12px 14px;color:inherit;text-decoration:none;border-radius:12px;font-weight:600}.side .live-nav svg{width:22px;height:22px;flex-shrink:0}.side .live-nav:hover,.side .live-nav:focus-visible{background:var(--panel,#10294a)}

/* Readability: pair every text treatment with its surface. Result colors stay semantic. */
:root {
  --ink-on-dark: #ffffff;
  --ink-on-light: #08162c;
}
input::placeholder,
textarea::placeholder {
  color: #d6e1f2;
  opacity: 1;
}
/* Browser autofill may use a light surface even when color-scheme is dark. */
input:autofill,
input:-webkit-autofill {
  color: var(--ink-on-light);
  -webkit-text-fill-color: var(--ink-on-light);
  caret-color: var(--ink-on-light);
  box-shadow: 0 0 0 1000px #edf3ff inset;
}
::selection {
  color: var(--ink-on-light);
  background: #c9ddff;
}
/* Both rings remain visible when a control changes between dark and light. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--ink-on-dark);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--ink-on-light);
}
input:autofill:focus-visible,
input:-webkit-autofill:focus-visible {
  box-shadow:
    0 0 0 1000px #edf3ff inset,
    0 0 0 3px var(--ink-on-light);
}
button:disabled {
  opacity: 1;
  cursor: default;
}
/* Non-answer disabled actions stay legible and visibly unavailable. */
button:disabled:not(.answer-option) {
  color: var(--ink-on-dark);
  background: #30425e;
  border: 1px dashed #8ba2c3;
}

:root {
  --gray: var(--ink-on-dark);
}
a,
.avatar,
.side button.on,
.side button:hover,
.pill,
.value,
.countdown,
.tabs button.on,
.choices b,
.hero .eyebrow,
.hero p,
.arena .timer,
.country-game h1,
.country-game #clock {
  color: var(--ink-on-dark);
}
/* Include free-text feedback fields, which otherwise use native browser colors. */
textarea {
  font: inherit;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #58759f;
  border-radius: 8px;
  color: var(--ink-on-dark);
  background: #091a34;
}
select option {
  color: var(--ink-on-dark);
  background: #091a34;
}
.country-game button[aria-pressed="true"]:not(.correct):not(.wrong),
.country-game button:hover:enabled:not(.correct):not(.wrong) {
  color: var(--ink-on-light);
  background: var(--lime);
}
/* Hover must not make a disabled pending control look available. */
.country-game button:disabled:not(.answer-option),
.country-game button:disabled:not(.answer-option):hover {
  color: var(--ink-on-dark);
  background: #30425e;
}

/* Visible control boundaries on the dark panels, without changing result hues. */
.secondary,
.button,
input,
select,
textarea,
.country-game input,
.country-game button:not(.answer-option) {
  border-color: #7896bf;
}
.primary {
  border: 1px solid #8bb9ff;
}

/* Clubhouse v14: live competition is the primary entry, game flows unchanged. */
.club-hero{position:relative;isolation:isolate;min-height:520px;overflow:hidden;border:1px solid #245291;border-radius:24px;background:#092153 url('/assets/club-stadium.png') center 55%/cover no-repeat;display:grid;place-items:start center;text-align:center;box-shadow:0 18px 65px #0004}
.club-hero::before{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(180deg,#06152e88 0%,#071a3b55 48%,#06162a05 100%)}
.club-hero-copy{padding:35px 24px 120px;width:100%;display:flex;flex-direction:column;align-items:center}
.club-hero h1{font-size:clamp(35px,5.7vw,84px);font-weight:950;font-style:italic;letter-spacing:-.045em;line-height:1.08;margin:0;color:#fff;text-shadow:0 3px 12px #0009}
.club-tagline{font-size:clamp(18px,2.2vw,30px);font-weight:650;font-style:italic;margin:16px 0 32px;color:#fff;text-shadow:0 2px 8px #000}
.club-live{display:flex;align-items:center;justify-content:center;gap:22px;width:min(100%,650px);min-height:114px;padding:14px 24px;border:2px solid #34e8ff;border-radius:25px;background:linear-gradient(125deg,#027eff,#0046dc 60%,#0764ff);box-shadow:inset 0 1px 9px #a6faff99,0 0 25px #005fff88;text-decoration:none;color:white;transition:transform .18s,filter .18s}
.club-live>svg{width:45px;height:52px;fill:currentColor;flex-shrink:0}
.club-live>span:not(.club-arrow){display:flex;flex-direction:column;align-items:center}
.club-live strong{font-size:clamp(26px,3.4vw,48px);font-weight:950;font-style:italic;line-height:1.1;white-space:nowrap;letter-spacing:-.025em}
.club-live small{font-size:clamp(14px,1.6vw,21px);line-height:1.45;margin-top:5px;font-weight:600}
.club-arrow{font-size:60px;line-height:1;font-weight:800}
.club-live:hover{filter:brightness(1.12);transform:translateY(-2px)}
.club-private{display:flex;align-items:center;justify-content:center;gap:20px;width:min(90%,540px);margin-top:24px;padding:15px 22px;min-height:64px;border:2px solid #17bcff;border-radius:19px;background:linear-gradient(110deg,#092345eb,#07142cef);color:white;text-decoration:none;box-shadow:inset 0 0 14px #0057ab77}
.club-private svg{width:30px;height:30px;flex-shrink:0}
.club-private span:first-of-type{font-size:clamp(18px,2vw,27px);font-style:italic;font-weight:900;letter-spacing:-.02em}
.club-private span:last-child{font-size:34px;line-height:1}
.club-private:hover{background:#123c72}
.club-ranking{position:relative;overflow:hidden;width:100%;margin-top:20px;min-height:145px;border:1px solid #187ff7;border-radius:20px;display:flex;justify-content:space-between;align-items:center;padding:18px 38px;text-align:left;background:linear-gradient(90deg,#082656f5,#0b2148a6),url('/assets/club-stadium.png') center 34%/cover;color:#fff}
.club-ranking>span{font-size:clamp(27px,3vw,42px);font-weight:900;font-style:italic}
.club-ranking>span::after{content:"";display:block;width:92px;height:3px;margin-top:12px;background:#22c7ff}
.club-ranking:hover{border-color:#54e4ff}
.club-trophy{width:125px;height:125px;filter:drop-shadow(0 5px 12px #0008)}
@media(min-width:1100px){.layout{grid-template-columns:215px minmax(0,1fr);gap:28px;padding-inline:32px}.top{padding-inline:38px}}
@media(max-width:740px){.club-hero{min-height:440px;border-radius:19px;background-position:50% center}.club-hero-copy{padding:30px 14px 95px}.club-hero h1{font-size:clamp(31px,8.2vw,54px)}.club-tagline{font-size:18px;margin:14px 0 27px}.club-live{min-height:100px;gap:12px;padding:16px 13px;border-radius:20px}.club-live>svg{width:25px;height:36px}.club-live strong{font-size:clamp(24px,6.4vw,40px)}.club-live small{font-size:14px}.club-arrow{font-size:36px}.club-private{width:95%;gap:11px;padding:14px 12px}.club-private span:first-of-type{font-size:18px}.club-private svg{width:23px}.club-ranking{min-height:118px;padding:16px 23px}.club-trophy{width:88px;height:88px}}
@media(prefers-reduced-motion:reduce){.club-live{transition:none}.club-live:hover{transform:none}}

/* Solo survival: isolated styles leave live/private/duo flows unchanged. */
.solo-intro h1{margin-top:6px}.solo-rules{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.solo-rules strong{border:1px solid #7896bf;border-radius:12px;padding:9px 14px;background:#102c50}.solo-ranking-note{color:#d7e8ff}.solo-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:16px 0 24px}.solo-level{display:flex;flex-direction:column;min-width:0}.solo-level h3{font-size:24px;margin-top:0}.solo-level p{line-height:1.6}.solo-level .primary{margin-top:auto;min-height:48px}.solo-status{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin-bottom:18px;padding:12px 16px;background:#102c50;border:1px solid #7896bf;border-radius:12px;color:#eef6ff}.solo-replay{display:flex;flex-wrap:wrap;gap:12px;margin:18px 0}.solo-replay button{min-height:48px}@media(max-width:740px){.solo-levels{grid-template-columns:1fr}.solo-status{flex-direction:column}.solo-replay{flex-direction:column}.solo-replay button{width:100%}}
