/* Algotrio Yarışma — ortak stil */
:root {
  --brand: #bd1622;
  --brand-dark: #8f0f19;
  --bg: #0e0e13;
  --bg-2: #17171f;
  --bg-3: #20202b;
  --text: #f5f5f7;
  --muted: #9a9aa5;
  --ok: #26890c;
  --bad: #c62828;
  --opt-a: #e21b3c;
  --opt-b: #1368ce;
  --opt-c: #d89e00;
  --opt-d: #26890c;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1100px 550px at 50% -8%, rgba(189, 22, 34, .22), transparent 62%),
    radial-gradient(800px 480px at 105% 105%, rgba(189, 22, 34, .09), transparent 60%),
    linear-gradient(180deg, #101016 0%, #0a0a0f 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.45;
}
button { font: inherit; cursor: pointer; border: none; }
input, select, textarea { font: inherit; }
img { max-width: 100%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; font-weight: 700;
  padding: 14px 22px; border-radius: var(--radius);
  transition: transform .08s, filter .15s;
}
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.secondary { background: var(--bg-3); color: var(--text); }
.btn.ghost { background: transparent; border: 2px solid var(--bg-3); color: var(--muted); }
.btn.danger { background: #7a1220; }

.card {
  background: linear-gradient(180deg, rgba(32, 32, 43, .6), rgba(23, 23, 31, .9));
  border: 1px solid #2a2a37;
  border-radius: var(--radius); padding: 20px;
}

.logo-bar {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 22px 0 10px;
}
.logo-bar img {
  height: 40px;
  filter: drop-shadow(0 0 14px rgba(189, 22, 34, .35));
}
.logo-bar::after {
  content: '';
  width: 54px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), #ff5b67);
}

.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- Kahoot tarzı seçenek renkleri ---- */
.opt-0 { background: var(--opt-a); }
.opt-1 { background: var(--opt-b); }
.opt-2 { background: var(--opt-c); }
.opt-3 { background: var(--opt-d); }

/* ---- Katılımcı (mobil) ---- */
.phone-wrap {
  max-width: 520px; margin: 0 auto; min-height: 100dvh;
  display: flex; flex-direction: column; padding: 0 16px 24px;
}
.screen { display: none; flex: 1; flex-direction: column; }
.screen.active { display: flex; }

.join-title { font-size: 22px; font-weight: 800; text-align: center; margin: 6px 0 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input {
  width: 100%; padding: 14px 16px; border-radius: var(--radius);
  border: 2px solid #2c2c38; background: var(--bg-2); color: var(--text);
  font-size: 17px; outline: none;
}
.field input:focus { border-color: var(--brand); }

.avatar-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
}
.avatar-grid button {
  aspect-ratio: 1; border-radius: 12px; background: var(--bg-2);
  border: 2px solid #2c2c38; padding: 0; overflow: hidden;
  display: block;
}
.avatar-grid button.sel { border-color: var(--brand); box-shadow: 0 0 10px rgba(189, 22, 34, .55); }

.err { color: #ff6b6b; font-size: 14px; min-height: 20px; margin: 8px 0; text-align: center; }

.big-avatar { font-size: 72px; text-align: center; margin: 24px 0 4px; }
.lobby-nick { font-size: 26px; font-weight: 800; text-align: center; }
.pulse-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: pulse 1.2s infinite; margin-right: 8px; }
@keyframes pulse { 0%,100% { opacity: .3 } 50% { opacity: 1 } }

.q-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0 10px; font-weight: 700;
}
.timer-pill {
  background: var(--brand); border-radius: 999px; padding: 6px 16px;
  font-variant-numeric: tabular-nums; font-size: 18px; min-width: 64px; text-align: center;
}
.timer-pill.warn { animation: pulse .6s infinite; }
.q-text { font-size: 19px; font-weight: 700; margin: 6px 0 12px; }
.q-img { width: 100%; max-height: 32dvh; object-fit: contain; border-radius: var(--radius); background: #000; margin-bottom: 12px; }

.opts { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: auto; }
.opts.three { grid-template-columns: 1fr; }
.opt-btn {
  min-height: 76px; border-radius: var(--radius); color: #fff;
  font-size: 16px; font-weight: 700; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px; text-align: left;
  transition: transform .08s, opacity .2s;
}
.opt-btn:active { transform: scale(.97); }
.opt-btn .shape { font-size: 22px; flex-shrink: 0; }
.opt-btn.dim { opacity: .25; }
.opt-btn.picked { outline: 4px solid #fff; }

.result-face { font-size: 84px; text-align: center; margin-top: 40px; }
.result-title { font-size: 30px; font-weight: 900; text-align: center; margin: 8px 0; }
.result-gain { font-size: 20px; text-align: center; }
.stat-row { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.stat-box { background: var(--bg-2); border-radius: var(--radius); padding: 14px 20px; text-align: center; min-width: 110px; }
.stat-box .v { font-size: 26px; font-weight: 900; }
.stat-box .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.top3-list { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.top3-item {
  display: flex; align-items: center; gap: 12px; background: var(--bg-2);
  border-radius: var(--radius); padding: 12px 16px; font-weight: 700;
}
.top3-item .medal { font-size: 24px; }
.top3-item .pts { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- Genel tablolar (mod) ---- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #262631; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
