/* Başlık yazı tipi (Fredoka, SIL OFL lisansı: fonts/OFL.txt). Google yerine kendi sitemizden
   verilir; böylece ziyaretçinin IP adresi Google'a gitmez. */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/fredoka-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/fredoka-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/fredoka-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/fredoka-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --bg: #f7f4fc;
  --surface: #ffffff;
  --surface-soft: #f3effb;
  --line: #e6e0f3;
  --text: #2c2640;
  --muted: #8a84a0;
  --accent: #7556d9;
  --accent-dark: #5a3fbd;
  --accent-soft: #efeafd;
  --accent-mid: #d6cbf8;
  --accent-text: #5a3fbd;
  --accent-hover: #8166e0;
  --placeholder: #b6adb3;
  --danger-soft: #fff5f5;
  --danger-ring: #fde2e2;
  --backdrop: rgb(44 38 64 / 0.35);
  --sun: #ffc845;
  --gold-soft: #fff6dc;
  --gold-line: #f6dd96;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(50 30 90 / 0.04), 0 8px 24px rgb(50 30 90 / 0.07);
  --display: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

/* Gece modu: aynı mor-sarı kimlik, koyu lacivert-mor zemin üzerinde */
:root[data-theme="dark"] {
  --bg: #17142a;
  --surface: #221e38;
  --surface-soft: #2b2645;
  --line: #3a3358;
  --text: #f1eefb;
  --muted: #a39cbf;
  --accent: #8f72ef;
  --accent-dark: #6448cf;
  --accent-soft: #312a55;
  --accent-mid: #54468c;
  --accent-text: #c3b3ff;
  --accent-hover: #9d84f3;
  --gold-soft: #3a3120;
  --gold-line: #6d5826;
  --placeholder: #6f6889;
  --danger-soft: #3a2130;
  --danger-ring: #5a2a3a;
  --backdrop: rgb(5 3 15 / 0.65);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 8px 24px rgb(0 0 0 / 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.app {
  width: min(100%, 500px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* Üst çubuk: ayarlar düğmesi */
.topbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.15s ease;
}
.icon-button:hover { border-color: var(--accent-mid); transform: rotate(30deg); }
.icon-button:focus-visible { outline: 3px solid var(--accent-mid); outline-offset: 2px; }

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  animation: enter 0.3s ease-out;
}
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

h1, h2, p { margin: 0; }

.card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.stack { display: flex; flex-direction: column; gap: 14px; }

/* Giriş ekranı */
.home { justify-content: center; gap: 26px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 700;
  transform: rotate(-6deg);
  box-shadow: 0 6px 0 var(--accent-dark);
  animation: wiggle 4s ease-in-out infinite;
}
@keyframes wiggle { 50% { transform: rotate(4deg) translateY(-3px); } }

.title {
  font-family: var(--display);
  font-size: clamp(3rem, 13vw, 4.1rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}
.title.small { font-size: clamp(2.3rem, 10vw, 3rem); }
.accent { color: var(--accent); }
/* "Acaba?" kelimesinin altında elle çizilmiş gibi sarı bir dalga */
.title .accent {
  position: relative;
  display: inline-block;
  transform: rotate(-3deg);
}
.title .accent::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -0.12em;
  height: 0.22em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 Q 15 2 28 7 T 54 7 T 80 6 T 98 5' fill='none' stroke='%23ffc845' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.subtitle { color: var(--muted); font-size: 1rem; max-width: 34ch; }

/* Form */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; font-weight: 700; }
input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
input::placeholder { color: var(--placeholder); font-weight: 500; }
input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.code-input {
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.45em;
  padding-left: calc(16px + 0.45em);
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Katıl / Oda kur seçimi */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--surface-soft);
}
.segment {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.segment:hover:not(.selected) { color: var(--text); }
.segment.selected { background: var(--surface); color: var(--accent-text); box-shadow: 0 1px 2px rgb(50 30 90 / 0.08), 0 4px 12px rgb(50 30 90 / 0.08); }
.segment:focus-visible { outline: 3px solid var(--accent-mid); outline-offset: 2px; }

.step {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 900;
}
.field-error { color: #d14343; font-size: 0.85rem; font-weight: 700; }
input.invalid { border-color: #e57373; background: var(--danger-soft); }
input.invalid:focus { box-shadow: 0 0 0 4px var(--danger-ring); }
.shake { animation: shake 0.35s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Butonlar */
.button {
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s ease;
}
.button:focus-visible, .option:focus-visible, .mode-option:focus-visible, .chip-button:focus-visible {
  outline: 3px solid var(--accent-mid);
  outline-offset: 2px;
}
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.primary { background: var(--accent); color: #fff; box-shadow: 0 4px 0 var(--accent-dark); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-dark); }
.secondary { background: var(--surface); color: var(--text); border: 1.5px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.secondary:hover:not(:disabled) { background: var(--surface-soft); }
.secondary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.ghost { background: transparent; color: var(--muted); min-height: 44px; font-weight: 700; }
.ghost:hover { color: var(--text); }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Bekleme odası */
.code-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.eyebrow { color: var(--muted); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; text-align: center; }
.room-code {
  font-family: var(--display);
  color: var(--accent);
  font-size: clamp(3.2rem, 16vw, 4.2rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.18em;
  margin-right: -0.18em;
  font-variant-numeric: tabular-nums;
}
.chip-button {
  margin-top: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.chip-button:hover { border-color: var(--accent-mid); }

/* Davet */
.invite-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 8px 0 4px; }
.button.small { width: auto; min-height: 44px; padding: 8px 18px; font-size: 0.95rem; }
.invite-actions .chip-button { margin-top: 0; min-height: 44px; }
.invite-banner {
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
}

/* Kilit ve oyuncu çıkarma */
#lock-button { white-space: nowrap; }
.lock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.lock-row:has(#lock-text:empty):has(#lock-button[hidden]) { display: none; }
.kick-button {
  flex: none;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 900;
  cursor: pointer;
}
.kick-button:hover { background: var(--danger-ring); color: #e35d5d; }

.hint { color: var(--muted); font-size: 0.9rem; }
.centered { text-align: center; }
.muted-small { color: var(--muted); font-size: 0.82rem; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-title h2 { font-size: 1.05rem; font-weight: 800; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Avatarlar (karakterler) */
.avatar {
  flex: none;
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
}
.avatar svg { display: block; width: 100%; height: 100%; }
.avatar.big { width: 62px; height: 62px; }
.avatar.huge { width: 132px; height: 132px; box-shadow: 0 0 0 5px var(--surface), 0 0 0 7px var(--accent-mid); }
.options.duel .avatar.big { width: 84px; height: 84px; }

/* Karakter satırı (giriş ekranı ve ayarlar) */
.character-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.character-row:hover { border-color: var(--accent-mid); }
.character-row:focus-visible { outline: 3px solid var(--accent-mid); outline-offset: 2px; }
.character-row .avatar.big { width: 52px; height: 52px; }
.character-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.character-text strong { font-size: 0.98rem; font-weight: 800; }
.character-text span { color: var(--muted); font-size: 0.8rem; }
.character-edit {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 800;
}
.lobby-character { margin-top: 12px; }

/* Ayarlar ve karakter pencereleri */
.modal-card.sheet { text-align: left; gap: 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.close-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.close-button:hover { color: var(--text); }
.setting { display: flex; flex-direction: column; gap: 8px; }
.setting h3 { margin: 0; color: var(--muted); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.character-sheet { width: min(100%, 440px); max-height: calc(100dvh - 32px); overflow-y: auto; }
.character-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 2px; }
.character-preview .chip-button { margin-top: 4px; }
.character-tabs { grid-template-columns: repeat(3, 1fr); }
.character-tabs .segment { font-size: 0.84rem; min-height: 42px; padding: 0 4px; white-space: nowrap; }
.character-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.character-choice {
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 0 1.5px var(--line);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.character-choice svg { display: block; width: 100%; height: 100%; }
.character-choice:hover { transform: scale(1.07); }
.character-choice.selected { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--accent); }
.character-choice:focus-visible { outline: 3px solid var(--accent-mid); outline-offset: 3px; }

.player-list, .results, .award-list, .custom-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.player-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.player-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--surface-soft);
  font-weight: 700;
  animation: enter 0.3s ease-out;
}
.player-list .meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.player-list .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-list li.offline { opacity: 0.45; }
.tag { color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.tag.host { color: var(--accent-text); }

/* Modlar */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mode-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.08s ease;
}
.mode-option.wide { grid-column: 1 / -1; }
.mode-icon { font-size: 1.45rem; margin-bottom: 6px; }
.mode-option strong { font-size: 0.98rem; font-weight: 800; }
.mode-option span:last-child { color: var(--muted); font-size: 0.8rem; line-height: 1.3; }
.mode-option:disabled { cursor: default; }
.mode-option:hover:not(:disabled) { border-color: var(--accent-mid); }
.mode-option:active:not(:disabled) { transform: scale(0.98); }
.mode-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.mode-option.selected::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}
.mode-option:disabled:not(.selected) { opacity: 0.6; }

/* Soru sayısı */
.count-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.count-row h3 { margin: 0; font-size: 0.98rem; font-weight: 800; }
.count-options { grid-template-columns: repeat(3, 64px); }
.count-options .segment { min-height: 40px; font-family: var(--display); font-size: 1.05rem; }
.count-options .segment:disabled { cursor: default; }
.count-options .segment:disabled:not(.selected) { opacity: 0.55; }

/* Özel sorular */
.custom-panel { display: flex; flex-direction: column; gap: 10px; }
.custom-panel .section-title { margin-bottom: 0; }
.question-form { display: flex; gap: 8px; }
.question-form input { flex: 1; min-width: 0; }
.question-form .button { width: auto; flex: none; min-height: 52px; }
.custom-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 8px 8px 8px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.custom-list span { min-width: 0; }
.delete-question {
  flex: none;
  min-height: 32px;
  padding: 4px 10px;
  border: 0;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.bottom-actions { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }

/* Soru ve sonuç ekranları: içerik dikeyde ortalanır */
.play { justify-content: center; }
.play-body { display: flex; flex-direction: column; gap: 14px; }
.exit-button { align-self: center; width: auto; padding-inline: 20px; margin-top: 4px; }

.round-row { display: flex; align-items: center; justify-content: space-between; }
.timer-text { font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.timer-text.urgent { color: var(--accent-text); }
.timer-track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.timer-bar { width: 100%; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; }
.timer-bar.urgent { background: var(--accent-dark); }

.question-card {
  padding: 30px 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.question { font-size: clamp(1.5rem, 6.2vw, 1.95rem); line-height: 1.22; font-weight: 900; letter-spacing: -0.02em; overflow-wrap: anywhere; }

.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--line);
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.option:hover:not(:disabled) { border-color: var(--accent-mid); }
.option:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.option:disabled { cursor: default; opacity: 0.5; }
.option.selected, .option.selected:disabled {
  opacity: 1;
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 3px 0 var(--accent-mid);
}

/* Düello */
.options.duel { grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; }
.options.duel .option { flex-direction: column; justify-content: center; text-align: center; min-height: 160px; font-size: 1.1rem; gap: 12px; }
.vs {
  align-self: center;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 900;
  font-size: 0.85rem;
}

/* Sonuçlar */
.results li {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 800;
}
.results .fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--percent);
  background: var(--surface-soft);
  animation: grow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.results li.top { border-color: var(--accent-mid); }
.results li.top .fill { background: var(--accent-soft); }
.results .avatar, .results .label, .results .value { position: relative; }
.results .label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.results .value { font-size: 1.1rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.results li.top .value { color: var(--accent-text); }
@keyframes grow { from { width: 0; } }

/* Oyun sonu */
.finish-head { text-align: center; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.star-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 18px;
  border-radius: 24px;
  text-align: center;
  background: var(--gold-soft);
  border: 1.5px solid var(--gold-line);
  animation: enter 0.45s ease-out;
}
.star-emoji { font-size: 2.4rem; line-height: 1; margin-bottom: 4px; }
.star-name { font-size: 1.75rem; font-weight: 900; letter-spacing: -0.02em; overflow-wrap: anywhere; }

.award-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  animation: enter 0.4s ease-out backwards;
}
.award-emoji { flex: none; font-size: 1.4rem; }
.award-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.award-question { color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.award-name { font-weight: 800; font-size: 1.02rem; overflow-wrap: anywhere; }
.award-percent {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.85rem;
  font-weight: 900;
}

/* Onay penceresi */
.modal {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--backdrop);
  animation: fade 0.15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal-card {
  width: min(100%, 400px);
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgb(46 42 51 / 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  animation: enter 0.2s ease-out;
}
.modal-card h2 { font-size: 1.2rem; font-weight: 900; }
.modal-actions { display: flex; gap: 10px; margin-top: 10px; }

/* Bildirimler */
.banner {
  position: fixed;
  z-index: 3;
  inset: 0 0 auto;
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}
.toast {
  position: fixed;
  z-index: 6;
  left: 16px;
  right: 16px;
  bottom: max(20px, env(safe-area-inset-bottom));
  max-width: 460px;
  margin: 0 auto;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 30px rgb(46 42 51 / 0.25);
  animation: enter 0.25s ease-out;
}

@media (min-width: 640px) {
  .app { padding-top: 48px; padding-bottom: 40px; }
  .card { padding: 22px; }
}

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

/* Karakter penceresinde Kaydet düğmeleri hep altta görünür kalır */
.character-sheet .modal-actions {
  position: sticky;
  bottom: -22px;
  margin: 4px -22px -22px;
  padding: 12px 22px 22px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

/* Nasıl oynanır? düğmesi (giriş ekranı) */
.link-button {
  align-self: center;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}
.link-button:hover { background: var(--accent-soft); }
.link-button:focus-visible { outline: 3px solid var(--accent-mid); outline-offset: 2px; }

/* Rehber penceresi */
.tutorial-card { width: min(100%, 420px); max-height: calc(100dvh - 32px); overflow-y: auto; gap: 12px; }
.tut-badge { padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 0.8rem; font-weight: 800; }
.tut-scene {
  display: grid;
  place-items: center;
  height: 230px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  overflow: hidden;
  touch-action: pan-y;
}
.tut-scene > * { animation: enter 0.35s ease-out; }
.tut-title { font-family: var(--display); font-size: 1.45rem; font-weight: 700; text-align: center; }
.tut-text { color: var(--muted); font-size: 0.98rem; line-height: 1.5; text-align: center; min-height: 6em; }
.tut-text b { color: var(--text); }
.tut-dots { display: flex; justify-content: center; gap: 7px; }
.tut-dots .dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: width 0.2s ease, background-color 0.2s ease; }
.tut-dots .dot.active { width: 26px; background: var(--accent); }
.tutorial-card .modal-actions { margin-top: 2px; }

.tut-scene .avatar { width: 40px; height: 40px; box-shadow: 0 0 0 2.5px var(--surface); }
.tut-scene .avatar.big { width: 62px; height: 62px; }
.tut-pop { animation: pop 0.45s cubic-bezier(0.3, 1.5, 0.6, 1) backwards; }
.tut-pop:nth-child(2) { animation-delay: 0.15s; }
.tut-pop:nth-child(3) { animation-delay: 0.3s; }
.tut-pop:nth-child(4) { animation-delay: 0.45s; }
@keyframes pop { from { opacity: 0; transform: scale(0.3); } }
.tut-eyebrow { color: var(--muted); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.tut-chip { padding: 6px 12px; border-radius: 12px; font-size: 0.78rem; font-weight: 800; }
.tut-chip.primary { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-dark); }

/* 0: Tanıtım */
.tut-intro { position: relative; display: grid; place-items: center; width: 190px; height: 190px; }
.tut-ring { position: absolute; inset: 0; }
.tut-ring .avatar { position: absolute; width: 56px; height: 56px; }
.tut-ring .avatar:nth-child(1) { top: 0; left: 67px; }
.tut-ring .avatar:nth-child(2) { top: 67px; right: 0; }
.tut-ring .avatar:nth-child(3) { bottom: 0; left: 67px; }
.tut-ring .avatar:nth-child(4) { top: 67px; left: 0; }
.tut-logo { width: 58px; height: 58px; font-size: 2rem; }

/* 1: Oda */
.tut-room { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.tut-mini-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 18px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tut-code { font-family: var(--display); color: var(--accent); font-size: 2.3rem; line-height: 1.1; letter-spacing: 0.15em; margin-right: -0.15em; margin-bottom: 6px; }
.tut-row { display: flex; gap: 8px; }

/* 2: Modlar */
.tut-modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: 100%; max-width: 290px; position: relative; }
.tut-mode { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 13px; background: var(--surface); border: 1.5px solid var(--line); font-size: 0.85rem; font-weight: 800; }
.tut-mode i { font-style: normal; font-size: 1.15rem; }
.tut-mode.wide { grid-column: 1 / -1; }
.tut-mode.selected { border-color: var(--accent); background: var(--accent-soft); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px var(--accent-soft); } }

/* 3: Soru */
.tut-question { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 300px; }
.tut-timer { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tut-timer span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transform-origin: left; animation: countdown 6s linear infinite; }
@keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.tut-q { padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-weight: 900; font-size: 0.98rem; text-align: center; }
.tut-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tut-option { position: relative; display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); font-size: 0.82rem; font-weight: 800; }
.tut-option .avatar { width: 30px; height: 30px; box-shadow: none; }
.tut-option.selected { border-color: var(--accent); background: var(--accent-soft); animation: tap 2.4s ease-in-out infinite; }
.tut-option em { position: absolute; right: 7px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-size: 0.65rem; }
@keyframes tap { 0%, 30% { transform: scale(1); } 38% { transform: scale(0.94); } 46%, 100% { transform: scale(1); } }
.tut-secret { align-self: center; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; font-weight: 800; }

/* 4: Sonuçlar */
.tut-results { display: flex; flex-direction: column; gap: 7px; width: 100%; max-width: 290px; }
.tut-bar { position: relative; overflow: hidden; display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; }
.tut-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--surface-soft); animation: grow 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tut-bar.top { border-color: var(--accent-mid); }
.tut-bar.top::before { background: var(--accent-soft); }
.tut-bar > * { position: relative; }
.tut-bar .avatar { width: 32px; height: 32px; box-shadow: none; }
.tut-bar b { flex: 1; }
.tut-bar em { font-style: normal; font-weight: 900; }
.tut-bar.top em { color: var(--accent-text); }

/* 5: Ödüller */
.tut-awards { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 270px; }
.tut-star { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; padding: 12px; border-radius: 18px; background: var(--gold-soft); border: 1.5px solid var(--gold-line); }
.tut-star b { font-size: 1.15rem; font-weight: 900; }
.tut-crown { position: absolute; top: -4px; font-size: 1.3rem; animation: wiggle 2.5s ease-in-out infinite; z-index: 1; }
.tut-award { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 0.85rem; font-weight: 800; }
.tut-award span { flex: 1; }
.tut-award em { font-style: normal; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 0.75rem; font-weight: 900; }

/* Sevgililer modu: oyun sonu uyum kartı */
.match-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 20px 18px;
  border-radius: 24px;
  text-align: center;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent-mid);
  animation: enter 0.45s ease-out;
}
.match-emoji { font-size: 2.2rem; line-height: 1; margin-bottom: 4px; }
.match-score { font-family: var(--display); font-size: 2.4rem; font-weight: 700; color: var(--accent-text); line-height: 1.1; }
.vs.heart { background: var(--accent-soft); font-size: 1.3rem; }

/* Ben Hiç ve Bu mu O mu: iki büyük resimli seçenek */
.options.choices { grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; }
.options.choices .vs { font-size: 0.8rem; text-transform: none; }
.option.choice { flex-direction: column; justify-content: center; text-align: center; min-height: 170px; gap: 10px; padding: 16px 10px; }
.choice-emoji { font-size: 3.4rem; line-height: 1; }
.choice-label { font-size: 1.05rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.option.choice.benhic { min-height: 140px; }
.result-emoji { position: relative; font-size: 1.7rem; width: 40px; text-align: center; flex: 0 0 auto; }
.tut-modes.three { grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 300px; }
.tut-modes.three .tut-mode { flex-direction: column; gap: 2px; padding: 7px 4px; font-size: 0.72rem; text-align: center; line-height: 1.15; }

/* Sayfa altı: gizlilik bağlantısı ve iletişim */
.site-footer {
  margin-top: auto;
  padding-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}
.site-footer a { color: var(--accent-text); font-weight: 700; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.age-note { margin-top: 8px; }
