/* Modern renk şeması (Aydınlık / Karanlık Mod) ve tasarım tokenları */
:root {
  color-scheme: light dark;

  --ink-light: #153047;
  --ink-dark: #e8f1f5;
  --muted-light: #6d7d8b;
  --muted-dark: #9cb0be;
  --paper-light: #f8f5ed;
  --paper-dark: #0f1d29;
  --card-light: #fffdf8;
  --card-dark: #172a3a;
  --surface-light: #e8eee9;
  --surface-dark: #1f3649;
  --border-light: #cad4cc;
  --border-dark: #2c465b;
  --tile-bg-light: #fdfcf7;
  --tile-bg-dark: #192e3f;
  --tile-border-light: #aab9b0;
  --tile-border-dark: #355269;
  --tile-shadow-light: #d8e0da;
  --tile-shadow-dark: #0d1923;
  --key-bg-light: #dce4dd;
  --key-bg-dark: #243c50;
  --key-shadow-light: #c3cec4;
  --key-shadow-dark: #132330;
  --glow-1-light: #e9efdc;
  --glow-1-dark: #17323b;
  --glow-2-light: #f6e1c6;
  --glow-2-dark: #282338;

  --ink: var(--ink-light);
  --muted: var(--muted-light);
  --paper: var(--paper-light);
  --card: var(--card-light);
  --surface: var(--surface-light);
  --border-subtle: var(--border-light);
  --tile-bg: var(--tile-bg-light);
  --tile-border: var(--tile-border-light);
  --tile-shadow: var(--tile-shadow-light);
  --key-bg: var(--key-bg-light);
  --key-shadow: var(--key-shadow-light);
  --glow-1: var(--glow-1-light);
  --glow-2: var(--glow-2-light);

  @media (prefers-color-scheme: dark) {
    --ink: var(--ink-dark);
    --muted: var(--muted-dark);
    --paper: var(--paper-dark);
    --card: var(--card-dark);
    --surface: var(--surface-dark);
    --border-subtle: var(--border-dark);
    --tile-bg: var(--tile-bg-dark);
    --tile-border: var(--tile-border-dark);
    --tile-shadow: var(--tile-shadow-dark);
    --key-bg: var(--key-bg-dark);
    --key-shadow: var(--key-shadow-dark);
    --glow-1: var(--glow-1-dark);
    --glow-2: var(--glow-2-dark);
  }

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
    --ink: var(--ink-dark);
    --muted: var(--muted-dark);
    --paper: var(--paper-dark);
    --card: var(--card-dark);
    --surface: var(--surface-dark);
    --border-subtle: var(--border-dark);
    --tile-bg: var(--tile-bg-dark);
    --tile-border: var(--tile-border-dark);
    --tile-shadow: var(--tile-shadow-dark);
    --key-bg: var(--key-bg-dark);
    --key-shadow: var(--key-shadow-dark);
    --glow-1: var(--glow-1-dark);
    --glow-2: var(--glow-2-dark);
  }

  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
    --ink: var(--ink-light);
    --muted: var(--muted-light);
    --paper: var(--paper-light);
    --card: var(--card-light);
    --surface: var(--surface-light);
    --border-subtle: var(--border-light);
    --tile-bg: var(--tile-bg-light);
    --tile-border: var(--tile-border-light);
    --tile-shadow: var(--tile-shadow-light);
    --key-bg: var(--key-bg-light);
    --key-shadow: var(--key-shadow-light);
    --glow-1: var(--glow-1-light);
    --glow-2: var(--glow-2-light);
  }

  @supports (color: light-dark(white, black)) {
    --ink: light-dark(var(--ink-light), var(--ink-dark));
    --muted: light-dark(var(--muted-light), var(--muted-dark));
    --paper: light-dark(var(--paper-light), var(--paper-dark));
    --card: light-dark(var(--card-light), var(--card-dark));
    --surface: light-dark(var(--surface-light), var(--surface-dark));
    --border-subtle: light-dark(var(--border-light), var(--border-dark));
    --tile-bg: light-dark(var(--tile-bg-light), var(--tile-bg-dark));
    --tile-border: light-dark(var(--tile-border-light), var(--tile-border-dark));
    --tile-shadow: light-dark(var(--tile-shadow-light), var(--tile-shadow-dark));
    --key-bg: light-dark(var(--key-bg-light), var(--key-bg-dark));
    --key-shadow: light-dark(var(--key-shadow-light), var(--key-shadow-dark));
    --glow-1: light-dark(var(--glow-1-light), var(--glow-1-dark));
    --glow-2: light-dark(var(--glow-2-light), var(--glow-2-dark));
  }
}

[hidden] {
  display: none !important;
}

/* Ana Menü, Oyun Kur ve Ayarlar Sekmeleri */
.main-menu,
.setup-view,
.settings-view {
  padding: 10px 0 10px;
  animation: menuFadeIn 0.24s ease-out;
}
@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.menu-hero {
  margin-bottom: 14px;
  display: grid;
  gap: 12px;
}
.menu-hero h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4.6vw, 38px);
  line-height: 1.06;
  letter-spacing: -1.6px;
}
.menu-hero h2 em {
  font-style: normal;
  color: var(--exact);
}
.menu-hero .subtitle {
  max-width: none !important;
  width: 100%;
  margin: 7px 0 0;
  line-height: 1.45;
}
.home-cta-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.home-play-btn {
  margin-top: 0;
  font-size: 15px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgb(40 125 115 / 0.25);
}
.home-stack {
  display: grid;
  gap: 16px;
}
.setup-only-card,
.settings-card {
  max-width: 540px;
  margin: 0 auto;
}
.settings-card h3 {
  margin: 4px 0 16px;
  font-size: 22px;
  letter-spacing: -0.8px;
}
.settings-list {
  display: grid;
  gap: 11px;
}
.settings-item {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.settings-item strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.settings-item small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}
.settings-toggle-btn {
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.settings-toggle-btn.is-active,
.settings-toggle-btn:hover {
  border-color: var(--exact);
}
.settings-extra {
  margin-top: 14px;
}
.menu-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 10px 28px rgb(21 48 71 / 0.06);
}
.setup-card h3 {
  margin: 4px 0 14px;
  font-size: 22px;
  letter-spacing: -0.8px;
}
.setup-card label,
.setup-card .field-group {
  display: grid;
  gap: 6px;
  margin: 11px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.setup-card input,
.setup-card select {
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
}
.mode-picker {
  position: relative;
}
.mode-picker-trigger {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 9px 12px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mode-picker-trigger[aria-expanded="true"] {
  border-color: var(--exact);
  box-shadow: 0 0 0 3px rgb(40 125 115 / 0.15);
}
.mode-picker-current {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mode-picker-arrow {
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}
.mode-picker-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 5px;
  box-shadow: 0 12px 28px rgb(15 29 41 / 0.22);
  display: grid;
  gap: 3px;
}
.mode-picker-option {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.mode-picker-option:hover,
.mode-picker-option.is-selected {
  background: var(--surface);
  color: var(--exact);
}
.mode-icon-wrap {
  width: 39px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--exact);
  flex-shrink: 0;
}
.mode-icon {
  width: 39px;
  height: 20px;
  display: block;
}
.menu-settings-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 14px 0 10px;
}
.setting-chip {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.setting-chip span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.chip-toggle {
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
}
.chip-toggle:hover {
  border-color: var(--exact);
}
.menu-cta-row {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.menu-cta-row .modal-start {
  margin-top: 0;
  font-size: 15px;
  padding: 14px;
}
.menu-rules-btn {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px;
  font-size: 12.5px;
  font-weight: 700;
}
.menu-rules-btn:hover {
  border-color: var(--exact);
}

/* Günün Kelimesi Kartı */
.wotd-card {
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--exact);
}
.wotd-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.wotd-single-line {
  white-space: nowrap;
}
.wotd-word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 8px;
}
.wotd-badge {
  font: 700 10.5px "DM Mono", monospace;
  background: var(--surface);
  color: var(--exact);
  border: 1px solid var(--border-subtle);
  padding: 5px 11px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}
.wotd-word {
  display: block;
  font: 800 28px "DM Mono", monospace;
  letter-spacing: 3px;
  color: var(--exact);
  margin: 0;
}
.wotd-meaning {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  border-radius: 10px;
  padding: 11px 13px;
}
.wotd-meaning small {
  display: block;
  font: 600 10px "DM Mono", monospace;
  color: var(--muted);
  margin-bottom: 4px;
}
.wotd-meaning ol {
  margin: 4px 0 0;
  padding-left: 18px;
}
.wotd-meaning li + li {
  margin-top: 4px;
}

/* Ana Menü Rekor Puanlar Kartı */
.records-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.records-card-header span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.menu-records-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.menu-records-grid div {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 11px 10px;
  text-align: center;
}
.menu-records-grid span {
  display: block;
  font: 700 9px "DM Mono", monospace;
  color: var(--muted);
  letter-spacing: 0.6px;
}
.menu-records-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink);
}

html, body {
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.key, .tile, button, select {
  user-select: none;
  -webkit-user-select: none;
}
body {
  background:
    radial-gradient(circle at 13% 10%, var(--glow-1) 0, transparent 27rem),
    radial-gradient(circle at 89% 86%, var(--glow-2) 0, transparent 29rem),
    var(--paper);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.topbar { border-bottom-color: var(--border-subtle); padding-bottom: 9px; }
.brand-mark { background: #153047; color: #fff; }
.icon-button {
  border-color: var(--border-subtle);
  background: var(--card);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  transition: background 0.15s ease, transform 0.12s ease;
}
.icon-button:hover { background: var(--surface); }
.new-button {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-subtle);
}

/* Tema değiştirici ikon ve erişilebilir metin dallanması */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.theme-icon-light,
.theme-label-light { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) {
    .theme-icon-dark,
    .theme-label-dark { display: none; }
    .theme-icon-light,
    .theme-label-light { display: inline; }
  }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  .theme-icon-dark,
  .theme-label-dark { display: none; }
  .theme-icon-light,
  .theme-label-light { display: inline; }
}

/* Alfabetik harf seçici ve kalıcı kutu görünümü */
.keyboard.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  max-width: 540px;
  margin: auto;
}
.alphabet-grid .key {
  width: 100%;
  min-width: 0;
  background: var(--key-bg);
  color: var(--ink);
  box-shadow: inset 0 -2px var(--key-shadow);
}
.alphabet-grid .key.wide { grid-column: span 2; }
.alphabet-grid .key.exact { background: var(--exact); color: #fff; box-shadow: none; }
.alphabet-grid .key.present { background: var(--present); color: #fff; box-shadow: none; }
.alphabet-grid .key.absent { background: var(--absent); color: #fff; box-shadow: none; opacity: 0.72; }

.tile:not(.filled):not(.exact):not(.present):not(.absent):not(.timeout):not(.invalid) {
  background: var(--tile-bg);
  border-color: var(--tile-border);
  box-shadow: inset 0 -3px 0 var(--tile-shadow);
}
.tile.filled:not(.exact):not(.present):not(.absent):not(.timeout):not(.invalid) {
  background: var(--card);
  border-color: var(--exact);
}
.tile.invalid,
.tile.timeout {
  background: #d94336;
  border-color: #b52d22;
  color: #fff;
  box-shadow: inset 0 -3px 0 #962218;
  animation: rowBurnShake 0.36s ease;
}
@keyframes rowBurnShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.match-strip {
  margin: 10px 0 0;
  grid-template-columns: 130px 1fr;
}
.turn-card { background: var(--surface); }
.turn-card span { color: var(--muted); }
.turn-card small { color: var(--muted); }
.score-card { background: #153047; color: #fff; }
.stage-track {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: flex-start;
}
.stage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.stage {
  background: var(--card);
  border-color: var(--border-subtle);
  color: var(--muted);
}
.stage-dots {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
  min-height: 8px;
}
.stage-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--border-subtle);
  background: var(--card);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.stage-dot.done {
  background: #d7a13f;
  border-color: #d7a13f;
}
.stage-dot.won {
  background: var(--exact);
  border-color: var(--exact);
}
.stage-dot.lost {
  background: #d94336;
  border-color: #d94336;
}
.stage-dot.active {
  background: var(--exact);
  border-color: var(--exact);
  transform: scale(1.28);
  box-shadow: 0 0 0 2px rgb(40 125 115 / 0.28);
}
.records div {
  background: var(--card);
  border-color: var(--border-subtle);
}
.records span { color: var(--muted); }

/* Çoklu oyuncu yan yana skor tablosu */
.match-strip.is-multi {
  grid-template-columns: 1fr auto;
}
.multi-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.multi-scoreboard[hidden] { display: none; }
.player-pill {
  background: var(--surface);
  border: 2px solid var(--border-subtle);
  border-radius: 11px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.player-pill.active-turn {
  border-color: var(--exact);
  box-shadow: 0 0 0 3px rgb(40 125 115 / 0.2);
  transform: translateY(-1px);
}
.player-turn-badge {
  font: 700 9px "DM Mono", monospace;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--border-subtle);
  color: var(--muted);
}
.player-pill.active-turn .player-turn-badge {
  background: var(--exact);
  color: #fff;
}
.player-pill strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.player-pill b {
  font: 800 17px "DM Mono", monospace;
  color: var(--exact);
}

/* Süre uyarısı ve sabit genişlikli kutular */
.progress-card {
  background: #153047;
  min-width: 88px;
  width: 88px;
  padding: 10px 8px;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease;
}
.progress-card strong {
  display: block;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.progress-card.urgent {
  background: #b54032;
}

.game-shell {
  padding-top: max(18px, calc(var(--cutout-top, env(safe-area-inset-top, 18px)) - 4px));
  padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  transition: filter 0.24s ease, opacity 0.24s ease;
}

/* Klasik Mobil Alt Navigasyon Çubuğu (5 Sekme: Ana Menü · Oyna · Mağaza · Sıralama · Ayarlar) */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--card);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -6px 24px rgb(15 29 41 / 0.12);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 760px;
  margin: 0 auto;
  padding: 5px 4px max(8px, env(safe-area-inset-bottom, 8px));
  gap: 3px;
}
.bottom-nav-item {
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 6px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 700;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}
.bottom-nav-item:active {
  transform: scale(0.96);
}
.bottom-nav-item.active {
  background: var(--surface);
  border-color: var(--exact);
  color: var(--exact);
}
.bottom-nav-icon {
  font-size: 17px;
  line-height: 1;
}
.bottom-nav-label {
  font-size: 10.5px;
  letter-spacing: -0.1px;
  white-space: nowrap;
}
.game-shell.is-paused {
  filter: blur(24px);
  opacity: 0.03;
  pointer-events: none;
  user-select: none;
}

.hero {
  padding: 6px 0 6px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}
.hero-center {
  text-align: center;
}
.hero h2 {
  font-size: clamp(19px, 3.6vw, 28px);
  text-align: center;
  margin: 0;
}
.hero-stage-points {
  margin: 3px 0 0;
  font: 700 12px "DM Mono", monospace;
  color: var(--exact);
}
.points-badge-card {
  background: var(--exact);
  box-shadow: 4px 4px 0 #1b5851;
}
.points-badge-card span {
  color: #dcf2ee;
}
.board { gap: 4px; }
.tile { width: 44px; height: 35px; font-size: 20px; }
.message { margin: 5px 0 4px; height: 16px; font-size: 12px; }
.keyboard.alphabet-grid { gap: 5px; }
.keyboard.alphabet-grid .key { height: 40px; font-size: 15px; font-weight: 700; }
.legend { margin-top: 6px; }

.pause-button {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.12s ease;
}
.pause-button:hover:not(:disabled) { background: var(--surface); }
.pause-button:active:not(:disabled) { transform: scale(0.97); }
.pause-button:disabled { opacity: 0.45; cursor: default; }

.exit-top-button {
  border: 1px solid #dfbeb7;
  border-radius: 10px;
  padding: 8px 11px;
  background: #fdf2ef;
  color: #9e3f32;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.12s ease;
}
.exit-top-button:hover:not(:disabled) { background: #f8e2dc; }
.exit-top-button:active:not(:disabled) { transform: scale(0.97); }
.exit-top-button:disabled { opacity: 0.45; cursor: default; }

.rules-sections {
  padding-left: 18px;
  padding-inline-start: 18px;
  margin: 12px 0 14px;
  display: grid;
  gap: 14px;
}
.rules-sections .rules-table {
  margin-left: -18px;
  width: calc(100% + 18px);
}
.rules-sections > li > b {
  color: var(--ink);
  font-size: 14px;
}

/* Oyun Kuralları Sabit Yükseklikli Modal & Akordiyon Menü */
#rulesDialog[open] {
  display: flex;
  flex-direction: column;
  max-width: 480px;
  width: calc(100% - 24px);
  height: min(840px, 95vh);
  max-height: 95vh;
  overflow: hidden;
  padding: 22px 18px 16px;
  box-sizing: border-box;
}

.rules-modal-header {
  flex-shrink: 0;
  margin-bottom: 8px;
}
.rules-modal-header h2 {
  margin: 4px 0 0;
  font-size: 24px;
  letter-spacing: -1px;
}

.rules-modal-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}
.rules-modal-content::-webkit-scrollbar {
  width: 5px;
}
.rules-modal-content::-webkit-scrollbar-track {
  background: transparent;
}
.rules-modal-content::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.rules-accordions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.rules-accordion {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.rules-accordion[open] {
  background: var(--card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  border-color: rgba(40, 125, 115, 0.35);
}
.rules-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  list-style: none;
  background: transparent;
  transition: background 0.15s ease;
}
.rules-accordion-header::-webkit-details-marker {
  display: none;
}
.rules-accordion-header:hover {
  background: rgba(0, 0, 0, 0.02);
}
.rules-accordion-header-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
}
.rules-accordion-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--exact);
  font: 700 11.5px "DM Mono", monospace;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.rules-accordion[open] .rules-accordion-num {
  background: var(--exact);
  color: #fff;
  border-color: var(--exact);
}
.rules-accordion-chevron {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: transform 0.25s ease, color 0.2s ease;
  flex-shrink: 0;
}
.rules-accordion[open] .rules-accordion-chevron {
  transform: rotate(180deg);
  color: var(--exact);
}
.rules-accordion-body {
  padding: 12px 14px 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--card);
}
.rules-accordion-body .rules-table {
  margin: 8px 0;
  width: 100%;
}
.rules-modal-footer {
  flex-shrink: 0;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.rules-modal-footer .examples {
  margin: 0;
}
.rules-dash-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--ink);
}
.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  font-size: 12.5px;
}
.rules-table th,
.rules-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.rules-table tr:last-child td {
  border-bottom: none;
}
.rules-table th {
  font: 700 10.5px "DM Mono", monospace;
  color: var(--muted);
  background: var(--card);
  letter-spacing: 0.4px;
}
.rules-table td:first-child {
  font-weight: 700;
  color: var(--ink);
}
.points-vertical-table td:not(:first-child) {
  font: 700 12px "DM Mono", monospace;
  color: var(--exact);
  white-space: nowrap;
}
.rules-table td:not(:first-child) {
  white-space: nowrap;
}
.gem-rules-table th:last-child,
.gem-rules-table td:last-child,
.gem-spend-table th:last-child,
.gem-spend-table td:last-child {
  text-align: right !important;
}
.xp-rules-table th:not(:first-child),
.xp-rules-table td:not(:first-child):not([colspan]) {
  text-align: right !important;
}
.points-vertical-table th:nth-child(n+3),
.points-vertical-table td:nth-child(n+3) {
  text-align: right !important;
}
.level-rewards-table th:not(:first-child),
.level-rewards-table td:not(:first-child) {
  text-align: right !important;
}

.result-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.result-actions .modal-start { margin-top: 0; }
.earned-points-highlight {
  display: inline-block;
  font: 800 18px "DM Mono", monospace;
  color: var(--exact);
  background: var(--surface);
  border: 1.5px solid var(--exact);
  padding: 2px 9px;
  border-radius: 8px;
  margin: 0 3px;
}

/* Diyaloglar, TDK sözlük anlam kutusu ve maç özeti */
.modal {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--border-subtle);
}
.modal ol,
.examples p,
.setup-note { color: var(--muted); }
.mini { background: var(--surface); color: var(--ink); }
.setup-modal label { color: var(--muted); }
.setup-modal input,
.setup-modal select {
  border-color: var(--border-subtle);
  background: var(--paper);
  color: var(--ink);
}
.modal-start {
  background: #287d73;
  color: #fff;
}
.modal-start:hover { background: #216860; }

.answer-pill {
  background: var(--surface);
  color: var(--muted);
}
.meaning-box {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed var(--border-subtle);
  font: 400 13px/1.45 "DM Sans", sans-serif;
  color: var(--ink);
  letter-spacing: normal;
  text-align: left;
}
.meaning-box small {
  display: block;
  font: 600 10px "DM Mono", monospace;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.meaning-box ol {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 12.5px;
}

.match-summary {
  margin-top: 14px;
  padding: 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  text-align: center;
}
.match-summary[hidden] { display: none; }
.summary-winner {
  font-weight: 800;
  font-size: 15px;
  color: var(--exact);
  margin-bottom: 9px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.summary-card {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 8px 10px;
}
.summary-card.leader {
  border-color: var(--exact);
}
.summary-card strong {
  display: block;
  font-size: 13px;
}
.summary-card b {
  display: block;
  font: 700 18px "DM Mono", monospace;
  color: var(--exact);
  margin-top: 2px;
}
.summary-card small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.pause-modal { text-align: center; }
.pause-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 20px;
}
.pause-actions {
  display: grid;
  gap: 10px;
}
.pause-actions .modal-start { margin-top: 0; }
.modal-exit {
  width: 100%;
  border: 1px solid #dfbeb7;
  border-radius: 10px;
  background: #fdf2ef;
  color: #9e3f32;
  padding: 13px;
  font-weight: 700;
  transition: background 0.15s ease;
}
.modal-exit:hover { background: #f8e2dc; }

/* Oyun Sonu (Finale) Kutlama Pop-up Stilleri */
.result-modal.is-finale {
  position: relative;
  overflow-x: hidden;
  width: min(520px, calc(100vw - 24px));
  border: 2px solid var(--exact);
  box-shadow: 0 24px 60px rgb(15 29 41 / 0.42), 0 0 0 4px rgb(40 125 115 / 0.18);
}
.finale-confetti {
  position: absolute;
  inset: 0 0 auto 0;
  height: 220px;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.confetti-piece {
  position: absolute;
  top: -14px;
  width: 8px;
  height: 14px;
  border-radius: 3px;
  opacity: 0.9;
  animation: confettiFall 2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  80% { opacity: 0.9; }
  100% { transform: translateY(210px) rotate(520deg) scale(0.7); opacity: 0; }
}
.finale-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px 14px 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgb(40 125 115 / 0.18), transparent 72%),
    var(--surface);
  border: 1px solid var(--border-subtle);
}
.finale-trophy {
  font-size: 46px;
  line-height: 1;
  margin-bottom: 6px;
  display: inline-block;
  filter: drop-shadow(0 6px 12px rgb(215 161 63 / 0.35));
  animation: trophyBounce 1.4s ease-in-out infinite alternate;
}
@keyframes trophyBounce {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-5px) scale(1.07); }
}
.finale-rank-badge {
  display: inline-block;
  font: 800 10.5px "DM Mono", monospace;
  letter-spacing: 0.9px;
  padding: 4px 11px;
  border-radius: 99px;
  background: var(--exact);
  color: #fff;
  margin-bottom: 6px;
}
.finale-headline {
  margin: 4px 0 10px;
  font-size: clamp(20px, 3.8vw, 25px);
  line-height: 1.25;
  letter-spacing: -0.7px;
  color: var(--ink);
}
.finale-score-box {
  background: var(--card);
  border: 1.5px solid var(--exact);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 8px 0 11px;
  box-shadow: 0 6px 18px rgb(40 125 115 / 0.1);
}
.finale-score-label {
  display: block;
  font: 700 9.5px "DM Mono", monospace;
  color: var(--muted);
  letter-spacing: 0.7px;
}
.finale-score-big {
  display: block;
  font: 800 clamp(30px, 6vw, 40px) "DM Mono", monospace;
  color: var(--exact);
  line-height: 1.1;
  margin: 4px 0 6px;
}
.finale-score-big i {
  font-style: normal;
  font-size: 14px;
  color: var(--muted);
}
.finale-stats-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink);
}
.finale-stages-recap {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.finale-stage-pill {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.finale-stage-pill b {
  font: 700 10px "DM Mono", monospace;
  color: var(--muted);
}
.finale-duel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 10px 0;
}
.finale-duel-card {
  background: var(--card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 11px;
  padding: 10px 8px;
}
.finale-duel-card.winner {
  border-color: var(--exact);
  box-shadow: 0 0 0 2px rgb(40 125 115 / 0.2);
}
.finale-duel-card strong {
  display: block;
  font-size: 14px;
}
.finale-duel-card b {
  display: block;
  font: 800 22px "DM Mono", monospace;
  color: var(--exact);
  margin: 2px 0;
}
.finale-duel-card b i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.finale-duel-card small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.finale-stages-recap.compact {
  gap: 4px;
  margin: 4px 0 0;
}
.finale-stages-recap.compact .finale-stage-pill {
  padding: 2px 5px;
}
.finale-motivation {
  margin: 9px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 600;
}
.modal-start.is-finale-btn {
  font-size: 16px;
  padding: 15px;
  background: linear-gradient(135deg, #287d73, #1e625a);
  box-shadow: 0 8px 20px rgb(40 125 115 / 0.35);
  animation: finaleCtaPulse 1.5s ease-in-out infinite alternate;
}
@keyframes finaleCtaPulse {
  from { transform: scale(1); }
  to { transform: scale(1.02); }
}

dialog:modal {
  overscroll-behavior: contain;
}
dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgb(24 48 57 / 0);
  backdrop-filter: blur(0px);
  transition-property: background-color, backdrop-filter, display, overlay;
  transition-duration: 0.24s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}
dialog {
  opacity: 0;
  transform: scale(0.86);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.24s;
  transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-behavior: allow-discrete;
}
dialog[open]:where(:not([data-closing])) {
  opacity: 1;
  transform: scale(1);
  @starting-style {
    opacity: 0;
    transform: scale(0.86);
  }
  &::backdrop {
    background-color: rgb(15 29 41 / 0.68);
    backdrop-filter: blur(4px);
    @starting-style {
      background-color: rgb(15 29 41 / 0);
      backdrop-filter: blur(0px);
    }
  }
}
:is(#pauseDialog, #confirmExitDialog)[open]:where(:not([data-closing]))::backdrop {
  background-color: rgb(12 24 35 / 0.94);
  backdrop-filter: blur(26px);
  @starting-style {
    background-color: rgb(12 24 35 / 0);
    backdrop-filter: blur(0px);
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog {
    transform: none;
    transition-duration: 0.1s;
  }
  @starting-style {
    dialog[open]:where(:not([data-closing])) {
      transform: none;
    }
  }
  .progress-card.urgent {
    animation: none;
  }
}
@media (max-width: 560px) {
  .keyboard.alphabet-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
  .game-shell {
    padding-top: max(16px, calc(var(--cutout-top, env(safe-area-inset-top, 16px)) - 4px));
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }
  .progress-card {
    min-width: 72px;
    width: 72px;
    padding: 7px 5px;
  }
  .progress-card strong { font-size: 18px; }
  .subtitle,
  .menu-hero .subtitle {
    max-width: none !important;
    width: 100%;
  }
  .hero { padding: 5px 2px 4px; }
  .tile { width: min(42px, calc((100vw - 64px) / var(--length))); height: 32px; font-size: 18px; }
  .keyboard.alphabet-grid .key { height: 37px; font-size: 14.5px; font-weight: 700; }
  .legend { margin-top: 5px; }
  .pause-button { padding: 7px 9px; font-size: 11px; }
  .match-strip { grid-template-columns: 115px 1fr; gap: 8px; margin-top: 8px; }
  .match-strip.is-multi { grid-template-columns: 1fr; gap: 6px; }
  .match-strip.is-multi .stage-track { justify-content: center; }
  .player-pill { padding: 6px 8px; }
  .player-pill strong { font-size: 12px; }
  .player-pill b { font-size: 14px; }
  .home-cta-stack { grid-template-columns: 1fr; }
}

.settings-version-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.settings-cloud-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(40, 125, 115, 0.12);
  border: 1px solid var(--exact);
  color: var(--exact);
  font-weight: 700;
  font-size: 12px;
}

/* ==========================================================================
   Google Girişi, Liderlik Tablosu & Hesap Kartı Stilleri
   ========================================================================== */
.lb-empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  background: var(--surface);
  border: 1px dashed var(--border-subtle);
  border-radius: 12px;
  margin: 12px 0;
}
.google-login-btn {
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13.5px;
  box-shadow: 0 2px 6px rgba(60,64,67,0.15);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.google-login-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 3px 8px rgba(60,64,67,0.22);
}
.google-login-btn:active {
  transform: scale(0.98);
}
.google-login-btn.large {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  border-radius: 12px;
}
.google-login-btn.small {
  padding: 8px 12px;
  font-size: 12px;
}
.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.btn-gift-tag {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 6px;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.35);
  white-space: nowrap;
}
.auth-gift-pill {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.18));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.auth-gift-pill strong {
  color: #d97706;
}
[data-theme="dark"] .auth-gift-pill strong {
  color: #fbbf24;
}
.settings-gift-note {
  font-size: 12px;
  color: #d97706;
  font-weight: 600;
  margin-top: 8px;
  text-align: center;
  line-height: 1.4;
}
[data-theme="dark"] .settings-gift-note {
  color: #fbbf24;
}

/* İlk Açılış Hoş Geldiniz Diyaloğu */
.auth-modal {
  text-align: center;
}
.auth-welcome-icon {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 8px;
}
.auth-welcome-desc {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 8px 0 18px;
}
.auth-actions {
  display: grid;
  gap: 10px;
}
.auth-guest-btn {
  width: 100%;
  padding: 13px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}
.auth-hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 14px;
  line-height: 1.4;
}

/* Devam Eden Oyun Bildirim Butonu */
.settings-resume-box {
  margin-bottom: 14px;
}
.settings-resume-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
  transition: transform 0.16s ease, filter 0.16s ease;
}
.settings-resume-btn:active {
  transform: scale(0.98);
  filter: brightness(0.95);
}

/* Ayarlar Sekmesi: Google Hesap Kartı */
.settings-account-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.settings-account-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: grid;
  place-items: center;
  overflow: visible;
  flex-shrink: 0;
  position: relative;
}
.settings-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.settings-account-info {
  flex: 1;
  min-width: 0;
}
.settings-account-info strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-account-info small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}
.settings-level-pill {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--card);
  border: 1px solid var(--border-subtle);
  color: var(--exact);
}
.settings-account-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}
.settings-signout-btn {
  border: 1.5px solid #d94336;
  background: transparent;
  color: #d94336;
  font-weight: 700;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
}
.settings-signout-btn:hover {
  background: rgba(217, 67, 54, 0.08);
}

/* Liderlik Tablosu Sekmesi */
.leaderboard-view {
  padding: 10px 0 10px;
  animation: menuFadeIn 0.24s ease-out;
}
.leaderboard-card {
  max-width: 600px;
  margin: 0 auto;
}
.lb-header-row h3 {
  margin: 4px 0 4px;
  font-size: 22px;
  letter-spacing: -0.8px;
}
.my-standing-card {
  background: linear-gradient(135deg, rgba(40,125,115,0.08), rgba(215,161,63,0.1)), var(--surface);
  border: 1.5px solid var(--exact);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0;
  box-shadow: 0 6px 18px rgba(40,125,115,0.1);
}
.standing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.standing-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.standing-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  display: grid;
  place-items: center;
  overflow: visible;
  flex-shrink: 0;
  position: relative;
}
.standing-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.standing-user strong {
  display: block;
  font-size: 14.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.standing-badge,
.lb-level-badge,
.settings-level-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  padding: 2.5px 8.5px;
  border-radius: 99px;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

/* ==========================================================================
   Asimetrik Tırtıklı 3D Arka Bant Rozetleri (Bronz, Gümüş Grisi, Altın)
   ========================================================================== */
.title-metallic-bronze,
.title-metallic-silver,
.title-metallic-gold {
  border-radius: 0 !important;
  border: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.45) !important;
  border-bottom: 1.5px solid rgba(0, 0, 0, 0.28) !important;
  padding: 3.5px 14px 3.5px 12px !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)) !important;
  box-shadow: none !important;
  letter-spacing: 0.3px !important;
  clip-path: polygon(
    0% 0%,
    calc(100% - 5px) 0%,
    100% 18%,
    calc(100% - 4px) 36%,
    100% 54%,
    calc(100% - 4px) 72%,
    100% 90%,
    calc(100% - 5px) 100%,
    0% 100%,
    4.5px 50%
  ) !important;
}

.title-metallic-bronze {
  background: #9a542b !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(45, 18, 5, 0.7);
}

.title-metallic-silver {
  background: #6e7d91 !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.7);
}

.title-metallic-gold {
  background: #cfa00c !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(60, 35, 0, 0.75);
}

/* Tüm Profil ve Avatar Fotoğraflarının Kesin Yuvarlak Olması */
.avatar-wrap,
.avatar-wrap .avatar-img-circle,
.avatar-wrap .avatar-img-circle img,
.standing-avatar,
.standing-avatar img,
.lb-avatar,
.lb-avatar img,
.settings-account-avatar,
.settings-account-avatar img {
  border-radius: 50% !important;
  object-fit: cover !important;
  aspect-ratio: 1 / 1 !important;
}
.standing-rank-box {
  text-align: center;
  background: var(--ink);
  color: #fff;
  padding: 6px 12px;
  border-radius: 10px;
  flex-shrink: 0;
}
.standing-rank-box span {
  display: block;
  font-size: 9px;
  font-family: "DM Mono", monospace;
  color: #b8d0c8;
  letter-spacing: 0.6px;
}
.standing-rank-box strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
}
.standing-progress-wrap {
  margin-top: 12px;
}
.standing-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.standing-progress-bar {
  height: 7px;
  border-radius: 99px;
  background: var(--border-subtle);
  overflow: hidden;
}
.standing-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--exact), #d7a13f);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.standing-guest-banner {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(215, 161, 63, 0.12);
  border: 1px solid #d7a13f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.standing-guest-banner p {
  margin: 0;
  font-size: 11.5px;
  color: var(--ink);
  line-height: 1.35;
}

/* Liderlik Sıralama Türü Seçici (Kariyer vs Oyun Rekorları) */
.lb-type-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-soft, rgba(0,0,0,0.05));
  padding: 4px;
  border-radius: 12px;
  margin: 10px 0 12px;
  border: 1px solid var(--border-subtle);
}
.lb-type-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.lb-type-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.lb-sub-score {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 1px;
}

/* Liderlik Sekme Butonları */
.lb-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 14px 0 12px;
}
.lb-tab {
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  padding: 8px 4px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-align: center;
}
.lb-tab.active {
  background: var(--exact);
  color: #fff;
  border-color: var(--exact);
  box-shadow: 0 4px 12px rgba(40,125,115,0.25);
}

/* Liderlik Listesi */
.leaderboard-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}
.lb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.lb-item.rank-1 {
  border-color: #d7a13f;
  background: linear-gradient(90deg, rgba(215,161,63,0.16), var(--surface));
}
.lb-item.rank-2 {
  border-color: #a9b2b4;
  background: linear-gradient(90deg, rgba(169,178,180,0.16), var(--surface));
}
.lb-item.rank-3 {
  border-color: #cd7f32;
  background: linear-gradient(90deg, rgba(205,127,50,0.14), var(--surface));
}
.lb-item.is-current-user {
  border-color: var(--exact);
  box-shadow: 0 0 0 2px rgba(40,125,115,0.3);
  background: linear-gradient(90deg, rgba(40,125,115,0.14), var(--surface));
}
.lb-rank {
  font-size: 14px;
  font-weight: 800;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
  color: var(--muted);
}
.lb-item.rank-1 .lb-rank,
.lb-item.rank-2 .lb-rank,
.lb-item.rank-3 .lb-rank {
  font-size: 23px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1.5px 3px rgba(0, 0, 0, 0.25));
}

.lb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  overflow: visible;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  position: relative;
}
.lb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lb-info {
  flex: 1;
  min-width: 0;
}
.lb-info strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-level-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--exact);
}
.lb-score {
  text-align: right;
  flex-shrink: 0;
}
.lb-score strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.lb-score small {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
}

/* ==========================================================================
   Harf İzinde — Bildirim Çubuğu (Toast) & Oturum Açma Yükleme Ekranı
   ========================================================================== */
.app-toast {
  position: fixed;
  top: max(20px, env(safe-area-inset-top, 20px));
  left: 50%;
  transform: translateX(-50%) translateY(-25px);
  background: rgba(15, 29, 41, 0.94);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 90vw;
  text-align: center;
}
.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.auth-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 26, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9999;
  color: #fff;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.auth-loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.auth-spinner {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #4285F4;
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}
.auth-loading-text {
  font-size: 0.95rem;
  color: #f0f4f8;
  letter-spacing: 0.2px;
}
.auth-cancel-btn {
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #f0f4f8;
  padding: 8px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.auth-cancel-btn:active {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(0.96);
}

/* ==========================================================================
   Harf İzinde — AdMob Reklam ve Oyun Ekonomisi Stilleri (Altın & XP)
   ========================================================================== */
.header-coin-badge,
.header-gem-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #0f1d29;
  border: 1px solid rgba(245, 158, 11, 0.65);
  padding: 4px 11px;
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 8px rgba(15, 29, 41, 0.22), 0 0 12px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, box-shadow 0.2s ease;
}
.header-coin-badge .coin-count-badge,
.header-gem-badge .gem-count-badge {
  color: #ffffff;
  font-weight: 800;
}
.header-coin-badge:active,
.header-gem-badge:active {
  transform: scale(0.96);
  background: #172d3e;
}

.header-xp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.45);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 0.84rem;
  font-weight: 700;
  color: #047857;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.12);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, box-shadow 0.2s ease;
}
.header-xp-badge .xp-count-badge {
  color: #065f46;
  font-weight: 800;
}
.header-xp-badge:active {
  transform: scale(0.96);
  background: rgba(16, 185, 129, 0.24);
}
.header-lvl-pill {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-size: 0.68rem;
  padding: 1.5px 5px;
  border-radius: 6px;
  font-weight: 800;
  line-height: 1;
}

@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .header-xp-badge {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.45);
    color: #34d399;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.18);
  }
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .header-xp-badge .xp-count-badge {
    color: #6ee7b7;
  }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .header-xp-badge {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.18);
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .header-xp-badge .xp-count-badge {
  color: #6ee7b7;
}

.badge-pulse {
  transform: scale(1.24) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.7) !important;
}
.xp-badge-pulse {
  transform: scale(1.24) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.7) !important;
}

/* Altın Para (Gold Coin) İkonu & Efektleri - ZARİF, KİBAR VE KOMPAKT BOYUT */
.gold-coin-icon {
  width: 0.9em !important;
  height: 0.9em !important;
  max-width: 14px !important;
  max-height: 14px !important;
  vertical-align: -0.12em !important;
  display: inline-block !important;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(217, 119, 6, 0.45));
}

.header-gem-badge .gold-coin-icon {
  width: 0.95rem !important;
  height: 0.95rem !important;
  max-width: 14px !important;
  max-height: 14px !important;
  vertical-align: -0.12em !important;
}

.shop-balance-pill .gold-coin-icon {
  width: 0.95rem !important;
  height: 0.95rem !important;
  max-width: 14px !important;
  max-height: 14px !important;
  vertical-align: -0.12em !important;
}

.rules-table .gold-coin-icon {
  width: 0.82em !important;
  height: 0.82em !important;
  max-width: 13px !important;
  max-height: 13px !important;
  vertical-align: -0.08em !important;
}

.shop-pkg-icon .gold-coin-icon {
  width: 38px !important;
  height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.22)) !important;
}

.gem-modal-icon.gold-coin-icon {
  width: 1.15rem !important;
  height: 1.15rem !important;
  max-width: 18px !important;
  max-height: 18px !important;
}

.flying-particle img {
  width: 1.1rem !important;
  height: 1.1rem !important;
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.65));
}

.gold-coin,
.coin-icon,
.gem-icon,
.header-gem-badge span:first-child,
.economy-modal-icon.gem-icon,
.gem-modal-icon,
.finale-reward-card.gem-reward .reward-icon,
.ad-reward-pill.coin-reward,
.flying-particle.gem-particle,
.flying-particle.gold-particle {
  display: inline-block !important;
  filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.75)) brightness(1.1) !important;
  vertical-align: -0.06em;
  line-height: 1;
}

/* Uçan Havada Parçacık Animasyonu (XP & Altın) */
.flying-particle {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  font-size: 1.55rem;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.5));
  transition: transform 0.82s cubic-bezier(0.2, 0.85, 0.32, 1.15), opacity 0.82s ease;
  will-change: transform, opacity;
}
.flying-particle.gem-particle,
.flying-particle.gold-particle {
  filter: drop-shadow(0 3px 10px rgba(245, 158, 11, 0.85)) brightness(1.15) !important;
}

/* Oyun Sonu Kazanımlar Kutusu */
.finale-rewards-box {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0 6px 0;
  text-align: center;
}
.finale-rewards-title {
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.finale-rewards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.finale-reward-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
}
.finale-reward-card.xp-reward {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #eab308;
}
.finale-reward-card.gem-reward {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #dc2626;
}
.finale-reward-card .reward-icon {
  font-size: 1.4rem;
}
.finale-reward-card strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: "DM Mono", monospace;
  line-height: 1.1;
}
.finale-reward-card small {
  font-size: 0.72rem;
  color: var(--muted);
}
.finale-records-banner {
  margin-top: 8px;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(239, 68, 68, 0.18));
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Profil & Sıralama Avatar Seviye Rozetleri */
.avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}
.avatar-wrap .avatar-img-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--exact);
  color: #fff;
  font-weight: 700;
}
.avatar-wrap .avatar-img-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-lvl-badge {
  position: absolute;
  bottom: -6px;
  right: -4px;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  padding: 2.5px 4.5px;
  border-radius: 6px;
  border: 1.5px solid var(--card, #fff);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  letter-spacing: -0.2px;
  z-index: 2;
  white-space: nowrap;
}

/* İpucu Harfi Rehber / Hayalet Kutu Stili (Yazmaya başlayınca serbest kalır) */
.tile.hint-placeholder {
  background: rgba(40, 125, 115, 0.12) !important;
  color: var(--exact) !important;
  border-color: rgba(40, 125, 115, 0.65) !important;
  border-style: dashed !important;
  font-weight: 800 !important;
  box-shadow: 0 0 12px rgba(40, 125, 115, 0.22);
  position: relative;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tile.hint-placeholder::after {
  content: "💡";
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 10px;
  line-height: 1;
  opacity: 0.9;
}

/* Seviye Atlama Kutlama Modalı */
.levelup-modal {
  text-align: center;
  border: 2px solid rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 16px 48px rgba(239, 68, 68, 0.3) !important;
}
.levelup-badge-big {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 800;
  font-family: "DM Mono", monospace;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.6);
  border: 3px solid #fecaca;
  animation: pulse-gem 1.5s infinite;
}
@keyframes pulse-gem {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.in-game-action-bar {
  display: flex;
  justify-content: center;
  margin: 6px 0 2px 0;
}
.game-hint-btn {
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
}
.game-hint-btn:active:not(:disabled) {
  transform: scale(0.96);
  background: var(--surface);
}
.game-hint-btn.used, .game-hint-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(1);
}
.admob-player-modal {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.admob-player-modal.active {
  opacity: 1;
  pointer-events: auto;
}
.admob-player-shell {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top, 16px)) 16px max(16px, env(safe-area-inset-bottom, 16px)) 16px;
  box-sizing: border-box;
}
.admob-player-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}
.admob-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #bbb;
}
.admob-g-icon {
  width: 20px;
  height: 20px;
  background: #fff;
  color: #4285F4;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}
.admob-timer-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admob-timer-text {
  font-size: 0.85rem;
  color: #ddd;
  background: rgba(255,255,255,0.15);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.admob-close-btn {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.admob-player-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}
.admob-ad-card {
  background: linear-gradient(145deg, #162432, #0d1721);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  color: #fff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.admob-ad-media {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 16px auto;
}
.admob-ad-logo {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: #287D73;
  color: #fff;
  font-size: 42px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", monospace;
  box-shadow: 0 8px 20px rgba(40,125,115,0.4);
}
.admob-ad-info h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: #fff;
}
.admob-ad-info p {
  font-size: 0.88rem;
  color: #a0b2c1;
  line-height: 1.45;
  margin-bottom: 12px;
}
.admob-ad-stars {
  color: #E3A72F;
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.admob-ad-stars span {
  color: #8899a6;
  font-size: 0.8rem;
  margin-left: 4px;
}
.admob-cta-btn {
  display: block;
  background: #4285F4;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}
.admob-player-footer {
  text-align: center;
  color: #888;
  font-size: 0.75rem;
}
.economy-modal-icon {
  font-size: 42px;
  text-align: center;
  margin-bottom: 8px;
}
.economy-modal-badge {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}
.economy-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.economy-btn.disabled, .economy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mağaza (Shop) Ekranı */
.shop-view {
  max-width: 680px;
  margin: 0 auto;
  padding: 10px 14px 40px;
}
.shop-card {
  background: var(--card);
  border: 1.5px solid rgba(21, 48, 71, 0.16) !important;
  border-radius: 18px;
  padding: 20px !important;
  box-shadow: 0 8px 24px rgba(21, 48, 71, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .shop-card {
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .shop-card {
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.shop-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.shop-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f1d29;
  border: 1px solid rgba(220, 38, 38, 0.55);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.88rem;
  color: #94a3b8;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 29, 41, 0.2);
}
.shop-balance-pill strong {
  color: #ffffff;
  font-size: 1.05rem;
  font-family: "DM Mono", monospace;
  font-weight: 800;
}

/* Reklamı Kaldır Hero Kartı */
.shop-hero-noads {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(13, 148, 136, 0.16));
  border: 2px solid #10b981;
  border-radius: 16px;
  padding: 16px 18px;
  margin: 16px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.18);
}
.shop-noads-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.shop-noads-icon {
  width: 56px;
  height: 56px;
  background: transparent !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  box-shadow: none !important;
}
.shop-noads-badge-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.22));
  flex-shrink: 0;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.shop-noads-badge-img:hover {
  transform: scale(1.06);
}
.shop-noads-info h4 {
  margin: 0 0 3px 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}
.shop-noads-info p {
  margin: 0 0 6px 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}
.shop-noads-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.shop-noads-perks span {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(22, 160, 133, 0.16);
  color: #138d75;
  padding: 2px 6px;
  border-radius: 6px;
}
[data-theme="dark"] .shop-noads-perks span {
  color: #48bb78;
  background: rgba(72, 187, 120, 0.2);
}

.shop-buy-btn {
  background: linear-gradient(135deg, var(--exact), #1f645c);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(40, 125, 115, 0.35);
  transition: transform 0.14s ease, filter 0.14s ease;
}
.shop-buy-btn:active {
  transform: scale(0.96);
}
.shop-buy-btn.is-owned {
  background: rgba(22, 160, 133, 0.15) !important;
  color: #16a085 !important;
  border: 1px solid rgba(22, 160, 133, 0.4) !important;
  box-shadow: none !important;
  cursor: default !important;
}

/* Paketler Başlığı ve Izgara */
.shop-section-title {
  margin: 18px 0 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}
.shop-section-title h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.shop-section-title small {
  font-size: 0.76rem;
  color: var(--muted);
}

.shop-packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.shop-pkg-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.shop-pkg-card:hover {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.08);
  transform: translateY(-2px);
}
.shop-pkg-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.shop-pkg-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shop-pkg-icon {
  width: 38px;
  height: 38px;
  background: transparent !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  box-shadow: none !important;
}
.shop-pkg-text strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.shop-footer-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px dashed var(--border-subtle);
  border-radius: 10px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.shop-footer-note p {
  margin: 0 0 6px 0;
  line-height: 1.4;
}
.shop-restore-link {
  background: none;
  border: none;
  color: var(--exact);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
}
.shop-restore-link:hover {
  opacity: 0.8;
}

/* Dikkat Çekici Altın Mağazası Butonu & Rozetler */
.shop-promo-btn {
  font-size: 1.05rem !important;
  padding: 13px 18px !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%) !important;
  border-color: #b91c1c !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease !important;
}
.shop-promo-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5) !important;
  transform: translateY(-2px);
}
.shop-promo-btn:active {
  transform: scale(0.97);
}

.shop-perk-hint {
  font-size: 0.84rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.shop-badge-perk {
  display: inline-flex;
  align-items: center;
  background: rgba(234, 179, 8, 0.16);
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #ca8a04;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.2px;
}
[data-theme="dark"] .shop-badge-perk {
  color: #facc15;
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.4);
}

/* Altın Modalı Kompakt Başlık & Butonlar */
.gem-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.22));
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.gem-modal-icon {
  line-height: 1;
  width: 30px;
  height: 30px;
  background: rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.gem-modal-title-box {
  text-align: left;
}
.gem-modal-kicker {
  display: block;
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #d97706;
  line-height: 1.1;
  margin-bottom: 2px;
}
.gem-modal-balance-title {
  margin: 0 !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: var(--ink) !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  line-height: 1.2 !important;
}
.gem-modal-balance-title b {
  color: #d97706;
  font-family: "DM Mono", monospace;
  font-size: 1.18rem;
}

.gem-modal-back-btn {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1.5px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 11px 16px !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease !important;
}
.gem-modal-back-btn:hover {
  background: var(--card) !important;
  border-color: var(--border) !important;
}
.gem-modal-back-btn:active {
  transform: scale(0.97);
}

@media (max-width: 480px) {
  .shop-hero-noads {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .shop-noads-content {
    flex-direction: column;
  }
  .shop-noads-perks {
    justify-content: center;
  }
  .shop-packages-grid {
    grid-template-columns: 1fr;
  }
}

/* 7. Satır (Kurtarma / Son Şans Satırı) */
.tile.extra-chance-tile {
  border-color: #f59e0b !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35) !important;
  animation: pulse-gold 1.5s infinite alternate ease-in-out;
}

@keyframes pulse-gold {
  0% { border-color: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.25); }
  100% { border-color: #fbbf24; box-shadow: 0 0 16px rgba(245, 158, 11, 0.55); }
}

/* ==========================================================================
   Özel Profil Resmi (Avatar) & Kullanıcı Adı (Nick) Özelleştirme Alanı
   ========================================================================== */
.settings-account-avatar {
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}
.settings-account-avatar:hover {
  transform: scale(1.04);
  filter: brightness(1.05);
}

.settings-avatar-action-row {
  margin-top: 10px;
}
.settings-avatar-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 11px;
  background: var(--surface, #fff);
  color: var(--ink, #0f172a);
  border: 1.5px solid var(--border-subtle, #cbd5e1);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.settings-avatar-btn:hover {
  background: var(--card, #fff);
  border-color: var(--exact, #287d73);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}
.settings-avatar-btn:active {
  transform: scale(0.98);
}

/* Kullanıcı Adı / Rumuz Düzenleme Kartı */
.settings-nickname-card {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-subtle, rgba(0,0,0,0.1));
  border-radius: 12px;
  padding: 11px 13px;
  margin-top: 12px;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}
@media (prefers-color-scheme: dark) {
  .settings-nickname-card {
    background: rgba(255, 255, 255, 0.04);
  }
}
.nickname-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}
.nickname-sublabel {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}
.nickname-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
#settingsNicknameInput {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1.5px solid var(--border-subtle, #cbd5e1);
  background: var(--surface, #fff);
  color: var(--ink, #0f172a);
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 700;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#settingsNicknameInput:focus {
  border-color: var(--exact, #287d73);
  box-shadow: 0 0 0 3px rgba(40, 125, 115, 0.2);
}
.nickname-save-btn {
  padding: 9px 16px;
  border-radius: 9px;
  background: var(--exact, #287d73);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 6px rgba(40, 125, 115, 0.3);
}
.nickname-save-btn:hover {
  background: #20625a;
}
.nickname-save-btn:active {
  transform: scale(0.96);
}
.nickname-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1px;
}
.nickname-privacy-note {
  font-size: 0.73rem;
  color: var(--muted);
  opacity: 0.9;
  line-height: 1.3;
}
.nickname-revert-btn {
  background: transparent;
  border: none;
  color: var(--exact, #287d73);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s ease;
}
.nickname-revert-btn:hover {
  opacity: 0.75;
}

/* Avatar Seçim Modalı */
.avatar-modal {
  max-width: 440px;
  width: 92%;
  padding: 22px 18px 18px;
  border-radius: 20px;
}
.avatar-modal-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
  margin-bottom: 14px;
}
.avatar-gender-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.avatar-gender-tabs::-webkit-scrollbar {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .avatar-gender-tabs {
    background: rgba(255, 255, 255, 0.06);
  }
}
.avatar-gender-btn {
  flex: 1;
  min-width: 0;
  padding: 7px 4px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.avatar-gender-btn.active {
  background: var(--card, #fff);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.avatar-grid-wrapper {
  max-height: 290px;
  overflow-y: auto;
  padding: 4px 2px;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}
@media (max-width: 380px) {
  .avatar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.avatar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 7px 4px 6px;
  border-radius: 13px;
  border: 2px solid transparent;
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
  position: relative;
}
.avatar-card:hover {
  transform: translateY(-2px);
  border-color: rgba(40, 125, 115, 0.4);
}
.avatar-card.selected {
  border-color: var(--exact, #287d73);
  background: rgba(40, 125, 115, 0.14);
}
.avatar-card-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #f1f5f9;
  border: 1.5px solid var(--border-subtle);
  display: grid;
  place-items: center;
}
.avatar-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-card-name {
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.avatar-card-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--exact, #287d73);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.avatar-google-revert-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  justify-content: center;
}
.avatar-google-revert-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.avatar-google-revert-btn:hover {
  background: var(--card);
  border-color: var(--exact);
  transform: translateY(-1px);
}
.avatar-google-revert-btn img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==========================================================================
   Google Play Satın Alma Bilgilendirme Modalı (Web & Güvenlik)
   ========================================================================== */
.gp-purchase-modal {
  max-width: 440px;
  width: calc(100vw - 32px);
  border-radius: 20px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.35);
  background: var(--surface, #ffffff);
  color: var(--ink, #1e293b);
  overflow: hidden;
}
.gp-purchase-content {
  padding: 24px 20px 20px;
}
.gp-purchase-badge-wrap {
  text-align: center;
}
.gp-play-logo-svg {
  filter: drop-shadow(0 4px 12px rgba(66, 133, 244, 0.28));
}
.gp-product-highlight {
  transition: transform 0.15s ease;
}
.gp-play-store-btn {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 14px rgba(1, 135, 95, 0.35);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.gp-play-store-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(1, 135, 95, 0.45);
}






