:root {
  --aegean-deep: #0d2d4a;
  --aegean-blue: #145ca8;
  --aegean-sky: #e4f1fb;
  --cream: #fbf5e6;
  --cream-soft: #fffcf4;
  --sand: #edd8ad;
  --coral: #c84231;
  --coral-dark: #9e2d1e;
  --gold: #eab336;
  --green: #248451;
  --ink: #122638;
  --ink-soft: #4a6275;
}

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

html, body {
  min-height: 100%;
  font-family: 'Trebuchet MS', 'Segoe UI', Tahoma, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 25% 15%, #165278 0%, #0d3854 58%, #082336 100%);
}

/* Düşük opaklıklı Körfez kıyı & Saat Kulesi vektörel arka plan dokusu */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.065;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 520'%3E%3Cpath fill='%23ffffff' d='M0 370 Q 180 320 360 355 T 720 345 T 1080 360 T 1440 330 L 1440 520 L 0 520 Z'/%3E%3Cpath fill='%23ffffff' d='M690 348 L 690 245 L 678 245 L 683 220 L 693 220 L 697 110 L 705 76 L 713 110 L 717 220 L 727 220 L 732 245 L 720 245 L 720 348 Z'/%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='4' d='M40 430 Q 220 405 400 430 T 760 430 T 1120 430 T 1400 430'/%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='3' d='M90 465 Q 290 445 490 465 T 890 465 T 1340 465'/%3E%3C/svg%3E");
}

.lobby-shell, .game-shell { position: relative; z-index: 1; }

.admin-banner {
  background: #f59e0b;
  color: #1f1404;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 16px;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.admin-banner.maintenance { background: #dc2626; color: #fff; }

.toast-container {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-pill {
  background: #14374f;
  color: #fff8e7;
  border: 2px solid var(--gold);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
  transition: opacity .35s ease;
}
.toast-pill.fade { opacity: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid var(--aegean-deep);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  background: #f4e6c7;
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(21,60,86,.32);
  transition: transform .08s ease, filter .12s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.05); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .48; cursor: not-allowed; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.lg { padding: 12px 22px; font-size: 15px; width: 100%; }
.btn.primary { background: linear-gradient(180deg, #2b89bf 0%, #185880 100%); color: #fff; }
.btn.cta-warm {
  background: linear-gradient(180deg, #ee7c49 0%, #d96b43 52%, #b84a22 100%);
  color: #ffffff;
  border-color: #7c2a0d;
  font-size: 16px;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 18px rgba(217, 107, 67, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.btn.cta-warm:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }
.btn.accent { background: linear-gradient(180deg, #ee744c 0%, #c64823 100%); color: #fff; }
.btn.green { background: linear-gradient(180deg, #39a86b 0%, #247849 100%); color: #fff; }
.btn.gold { background: linear-gradient(180deg, #ffd464 0%, #dc9818 100%); color: #241806; }
.btn.ghost { background: var(--cream-soft); color: var(--aegean-deep); }

/* Lobby Layout */
.lobby-shell {
  min-height: 100vh;
  max-width: 1220px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lobby-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(180deg, #fffaf0 0%, #f3e4c2 100%);
  border: 2.5px solid var(--aegean-deep);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}

.brand-wrap { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--aegean-deep); }
.brand-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand-title-row h1 { font-size: 22px; font-weight: 900; color: var(--aegean-deep); line-height: 1.1; }
.brand-sub { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-top: 2px; }

.ver-badge {
  background: var(--coral);
  color: #fff;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 900;
}
.premium-chip {
  background: #0d2d4a;
  color: #ffd76a;
  border: 1.5px solid #eab336;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 2px solid var(--aegean-deep);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  cursor: pointer;
}
.pill-dist { background: var(--aegean-sky); color: var(--aegean-deep); padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.offline-pill { background: #dff4e8; color: #195d38; border: 1.5px solid #2c8c57; border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 800; }

.lang-switch { display: inline-flex; border: 2px solid var(--aegean-deep); border-radius: 8px; overflow: hidden; }
.lang-switch button { border: none; background: #fff; color: var(--aegean-deep); padding: 4px 9px; font-size: 11.5px; font-weight: 900; cursor: pointer; }
.lang-switch button.active { background: var(--aegean-deep); color: #fff; }

.lobby-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  flex: 1;
}

.lobby-card {
  background: linear-gradient(180deg, #fffbf2 0%, #f5e6c8 100%);
  border: 2.5px solid var(--aegean-deep);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
}
.lobby-side { display: flex; flex-direction: column; gap: 14px; }

.mode-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mode-card {
  position: relative;
  text-align: left;
  background: #f8f4ea;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 13px 12px 12px;
  cursor: pointer;
  opacity: 0.84;
  transition: border-color .15s, background .15s, box-shadow .15s, opacity .15s;
}
.mode-card:hover { opacity: 0.96; border-color: #6484a5; }
.mode-card.active {
  opacity: 1;
  border: 2.5px solid #1E3A5F;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(30, 58, 95, 0.14), 0 8px 20px rgba(30, 58, 95, 0.18);
}
.mode-check-badge {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  background: #1E3A5F;
  color: #ffd76a;
  font-size: 10.5px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
}
.mode-card.active .mode-check-badge { display: inline-flex; align-items: center; }
.mc-head { font-size: 15px; color: var(--aegean-deep); margin-bottom: 5px; padding-right: 64px; }
.mode-card p { font-size: 12px; color: var(--ink-soft); line-height: 1.35; font-weight: 600; }

.seats-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.seats-header h2 { font-size: 16px; color: var(--aegean-deep); }
.count-pills { display: flex; gap: 6px; }
.cnt-btn {
  width: 32px; height: 30px; border: 2px solid var(--aegean-deep); border-radius: 8px;
  background: #fff; font-weight: 900; cursor: pointer;
}
.cnt-btn.active { background: var(--aegean-deep); color: #fff; }

.seats-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.seat-row {
  display: grid;
  grid-template-columns: 94px 1fr 112px 92px;
  gap: 8px;
  align-items: center;
  background: #fffaf0;
  border: 1.5px solid #c9b58d;
  border-left-width: 5px;
  border-radius: 10px;
  padding: 7px 9px;
}
.seat-token-wrap { display: flex; align-items: center; gap: 5px; }
.seat-token-badge {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; border: 2px solid var(--aegean-deep);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.seat-token-sel { width: 46px; padding: 5px 2px !important; }
.seat-row select, .seat-row input {
  border: 1.5px solid #9eb3c2;
  border-radius: 7px;
  padding: 6px 7px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
.human-tag { text-align: center; font-size: 14px; }

.dq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.dq-row { display: flex; align-items: center; gap: 10px; background: #fffaf0; border: 1.5px solid #d5c199; border-radius: 10px; padding: 8px 10px; }
.dq-row.done { background: #e1f5e9; border-color: #2c8c57; }
.dq-ico { font-size: 18px; }
.dq-info { flex: 1; min-width: 0; }
.dq-title { font-size: 12.5px; font-weight: 800; margin-bottom: 4px; }
.dq-bar { height: 6px; background: #e3d6b8; border-radius: 999px; overflow: hidden; }
.dq-bar span { display: block; height: 100%; background: var(--aegean-blue); }
.dq-val { font-size: 12px; font-weight: 900; color: var(--aegean-deep); }

.nav-grid-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nav-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: #fffaf0; border: 2px solid var(--aegean-deep); border-radius: 11px;
  padding: 10px 6px; cursor: pointer; font-family: inherit; color: var(--aegean-deep);
}
.nav-tile:hover { background: var(--aegean-sky); }
.nav-tile span { font-size: 20px; }
.nav-tile strong { font-size: 11.5px; text-align: center; }

.season-preview-card { text-align: center; font-size: 12.5px; }
.sp-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.sp-pill {
  border: 1.8px solid #c5b490; background: #fffaf0; color: var(--aegean-deep);
  border-radius: 999px; padding: 5px 8px; font-size: 11.5px; font-weight: 800; cursor: pointer; font-family: inherit;
}
.sp-pill.active { box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.sp-effect {
  background: #fff; border: 1.5px solid #d5c299; border-radius: 9px;
  padding: 6px 9px; font-size: 11.5px; font-weight: 800; color: var(--aegean-deep); line-height: 1.35;
}

.lobby-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  color: #e4f1f8; font-size: 12px; font-weight: 700; padding: 2px 4px;
}
.lobby-footer a { color: #ffd464; text-decoration: none; font-weight: 800; }
.lobby-footer a:hover { text-decoration: underline; }

/* ====================================================================== */
/* OYUN EKRANI (MASAÜSTÜ 1280x800 + MOBİL DUYARLI)                        */
/* ====================================================================== */
.game-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-topbar {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(180deg, #fffaf0 0%, #efe0be 100%);
  border-bottom: 2.5px solid var(--aegean-deep);
}
.gt-left, .gt-right { display: flex; align-items: center; gap: 8px; min-width: 0; }

.season-pill {
  color: #fff; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 900;
  white-space: nowrap;
}
.pool-pill {
  background: #dff4e8; color: #165e37; border: 1.5px solid #2c8c57;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; white-space: nowrap;
}
.turn-banner {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 2px solid var(--aegean-deep); border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; white-space: nowrap;
}
.turn-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.game-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 12px;
  padding: 10px 14px;
}

.board-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#phaser-board-host {
  width: min(calc(100vh - 76px), 100%);
  height: min(calc(100vh - 76px), 100%);
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid var(--aegean-deep);
  box-shadow: 0 14px 36px rgba(0,0,0,.45);
  background: #f7efd8;
}

.hud-sidebar {
  width: 370px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: linear-gradient(180deg, #fffbf2 0%, #f3e3c2 100%);
  border: 2.5px solid var(--aegean-deep);
  border-radius: 14px;
  padding: 11px;
  overflow-y: auto;
}

.hud-actions-box { display: flex; flex-wrap: wrap; gap: 6px; }
.hud-actions-box .btn { flex: 1 1 46%; }
.hud-secondary-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.hud-section {
  background: #fffaf0;
  border: 1.5px solid #d2be96;
  border-radius: 10px;
  padding: 8px 9px;
}
.hud-section h4 { font-size: 12.5px; color: var(--aegean-deep); margin-bottom: 6px; }
.hud-section h4 small { font-weight: 600; color: var(--ink-soft); }

.hud-players-list { display: flex; flex-direction: column; gap: 5px; }
.hud-player-card {
  background: #fff; border: 1.5px solid #d5c7aa; border-left-width: 5px;
  border-radius: 8px; padding: 6px 8px;
}
.hud-player-card.active { background: #edf7fc; border-color: var(--aegean-blue); }
.hud-player-card.bankrupt { opacity: .55; }
.hpc-top { display: flex; justify-content: space-between; font-size: 12.5px; }
.hpc-cash { color: var(--green); }
.hpc-sub { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--ink-soft); margin-top: 2px; font-weight: 700; }
.tag { padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; }
.tag.red { background: #fde2e2; color: #a81c1c; }
.tag.green { background: #dcf5e6; color: #19693d; }

.deeds-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
.deed-chip, .keep-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff; border: 1.8px solid var(--aegean-deep); border-radius: 7px;
  padding: 3px 7px; font-size: 11px; font-weight: 800; cursor: pointer;
}
.deed-chip.mort { opacity: .55; text-decoration: line-through; }
.deed-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.keep-chip { border-color: var(--coral); background: #fff3ee; }

.feed-section { flex: 1; min-height: 120px; display: flex; flex-direction: column; }
.feed-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; max-height: 196px; padding-right: 3px; }
.feed-item { font-size: 11.5px; line-height: 1.38; padding: 5px 8px; background: #fbf4e4; border-radius: 7px; font-weight: 600; border-left: 3px solid transparent; }
.feed-item.latest { background: #fff2ce; border-left-color: #d96b43; font-weight: 800; color: #0d2d4a; box-shadow: 0 2px 6px rgba(217,107,67,.14); }

/* Tapu Kartı Hover Önizleme */
.deed-hover-card {
  position: fixed;
  z-index: 4200;
  pointer-events: none;
  width: 262px;
  background: #fffdf6;
  border: 2.5px solid var(--aegean-deep);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(8, 27, 46, 0.44);
}
.dhc-head { padding: 8px 11px; color: #fff; font-weight: 900; font-size: 13.5px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.dhc-head small { font-size: 10.5px; opacity: 0.92; font-weight: 700; }
.dhc-body { padding: 9px 11px; font-size: 12px; display: flex; flex-direction: column; gap: 5px; }
.dhc-row { display: flex; justify-content: space-between; align-items: center; }
.dhc-row strong { color: var(--aegean-deep); }
.dhc-season { background: #e8f5ee; border: 1px solid #2c8c57; border-radius: 7px; padding: 4px 7px; font-size: 11px; font-weight: 800; color: #165e37; display: flex; justify-content: space-between; }
.dhc-season.down { background: #fdeaea; border-color: #c84231; color: #9c2019; }

/* TKM Düello Modalı */
.rps-modal-card { text-align: center; }
.rps-badge { display: inline-block; background: #0d2d4a; color: #ffd76a; padding: 4px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 900; margin-bottom: 8px; }
.rps-arena {
  display: flex; align-items: center; justify-content: space-around; gap: 10px;
  background: #fff; border: 2px solid var(--aegean-deep); border-radius: 12px; padding: 14px 10px; margin: 10px 0;
}
.rps-fighter { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px; }
.rps-pick { font-size: 32px; width: 54px; height: 54px; border-radius: 50%; background: #eef6fb; border: 2px solid var(--aegean-deep); display: flex; align-items: center; justify-content: center; }
.rps-vs { font-size: 18px; font-weight: 900; color: var(--coral); }
.rps-controls { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rps-btn { min-width: 104px; padding: 10px 12px; font-size: 14px; }

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(11,29,43,.68);
  z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 14px;
}
.modal-card {
  position: relative; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(180deg, #fffbf2 0%, #f4e5c3 100%);
  border: 3px solid var(--aegean-deep); border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 22px 60px rgba(0,0,0,.55);
}
.modal-card.wide { max-width: 660px; }
.modal-close {
  position: absolute; top: 10px; right: 12px; width: 30px; height: 30px;
  border-radius: 8px; border: 1.5px solid var(--aegean-deep); background: #fff; font-weight: 900; cursor: pointer;
}
.modal-card h3, .modal-card h2 { color: var(--aegean-deep); margin-bottom: 10px; padding-right: 28px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.modal-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

.field-lbl { display: block; font-size: 12px; font-weight: 800; color: var(--aegean-deep); margin: 8px 0 4px; }
.input-ctrl {
  width: 100%; border: 2px solid #96aec0; border-radius: 8px; padding: 8px 10px;
  font-size: 13px; font-weight: 700; font-family: inherit; background: #fff; color: var(--ink);
}
.muted-note { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; line-height: 1.4; margin: 6px 0; }
.ok-note { font-size: 12.5px; color: var(--green); font-weight: 800; margin-top: 6px; }
.strong-line { font-size: 15px; font-weight: 900; margin-bottom: 8px; }

.tile-modal-head { padding-left: 10px; margin-bottom: 8px; }
.tile-meta-line { display: flex; justify-content: space-between; background: #fffaf0; padding: 8px 10px; border-radius: 8px; margin: 8px 0; font-size: 13px; }
.rent-table { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.rent-row { display: flex; justify-content: space-between; padding: 5px 9px; background: #fff; border-radius: 6px; font-size: 12.5px; }
.rent-row.active { background: #dff4e8; border: 1.5px solid var(--green); font-weight: 900; }
.tile-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.card-draw-modal { text-align: center; }
.card-deck-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 900; color: #fff; margin-bottom: 10px; }
.card-deck-badge.news { background: var(--coral); }
.card-deck-badge.izmir { background: var(--aegean-blue); }
.card-draw-desc { font-size: 14px; font-weight: 700; line-height: 1.45; margin: 8px 0; }

.auction-price-box { background: #fff; border: 2px solid var(--aegean-deep); border-radius: 12px; padding: 12px; text-align: center; margin: 8px 0; }
.auction-bid-val { font-size: 26px; font-weight: 900; color: var(--coral); }

.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.trade-col { background: #fffaf0; border: 1.5px solid #cfbd97; border-radius: 10px; padding: 10px; }
.trade-prop-list { display: flex; flex-direction: column; gap: 4px; max-height: 150px; overflow-y: auto; margin-top: 8px; }
.trade-chk { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; cursor: pointer; }

.avatar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 6px 0; }
.avatar-pick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 2px solid #b6c5d1; border-radius: 10px; background: #fff; padding: 7px 4px; cursor: pointer; font-family: inherit;
}
.avatar-pick-btn.active { border-color: var(--coral); background: #fff0ea; }
.avatar-pick-btn span { font-size: 20px; }
.avatar-pick-btn small { font-size: 10.5px; font-weight: 800; }

.room-code-banner {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  background: #fff; border: 2px dashed var(--aegean-blue); border-radius: 12px; padding: 12px; margin-bottom: 8px;
}
.room-code-val { font-size: 24px; font-weight: 900; letter-spacing: 2px; color: var(--aegean-deep); }
.room-share-actions { display: flex; gap: 6px; }
.room-players-list { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.auth-signed-box { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #e8f5ee; border: 1.5px solid #2c8c57; border-radius: 10px; padding: 8px 10px; font-size: 12.5px; }
.auth-btns-row { display: flex; gap: 6px; flex-wrap: wrap; }

.tab-bar { display: flex; gap: 6px; margin-bottom: 10px; }
.tab-btn { flex: 1; padding: 7px; border: 2px solid var(--aegean-deep); border-radius: 8px; background: #fff; font-weight: 900; cursor: pointer; }
.tab-btn.active { background: var(--aegean-deep); color: #fff; }
.lb-body { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.lb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1.5px solid #d5c6a3; border-radius: 9px; padding: 8px 11px; font-size: 13px; }
.lb-rank { font-weight: 900; color: var(--coral); width: 28px; }
.lb-name { flex: 1; }
.lb-score { color: var(--aegean-deep); }

.badges-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 380px; overflow-y: auto; }
.badge-card { background: #fff; border: 2px solid #cbd6df; border-radius: 10px; padding: 10px; text-align: center; }
.badge-card.unlocked { border-color: var(--gold); background: #fffbe9; }
.badge-card.locked { opacity: .55; }
.badge-ico { font-size: 24px; margin-bottom: 4px; }
.badge-card strong { display: block; font-size: 13px; margin-bottom: 2px; }
.badge-card small { font-size: 11px; color: var(--ink-soft); font-weight: 600; }

.share-card-preview { width: 100%; height: auto; border-radius: 10px; border: 2px solid var(--aegean-deep); margin-bottom: 10px; }
.go-rankings { display: flex; flex-direction: column; gap: 5px; }
.go-rank-row { display: flex; justify-content: space-between; background: #fff; padding: 7px 11px; border-radius: 8px; font-size: 13.5px; }
.go-rank-row.winner { background: #fef3c7; border: 2px solid var(--gold); font-weight: 900; }

.guide-list { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.45; font-weight: 600; }

/* ====================================================================== */
/* MOBİL DİKEY (<= 640px)                                                 */
/* ====================================================================== */
@media (max-width: 640px) {
  .lobby-shell { padding: 10px; }
  .lobby-grid { grid-template-columns: 1fr; }
  .mode-selector { grid-template-columns: 1fr; }
  .seat-row { grid-template-columns: 82px 1fr 86px; }
  .seat-ai-sel, .human-tag { grid-column: 2 / 4; }
  .nav-grid-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .game-shell { height: auto; min-height: 100vh; overflow: visible; }
  .game-topbar { height: auto; flex-wrap: wrap; padding: 6px 10px; }
  .game-workspace { flex-direction: column; padding: 8px; }
  #phaser-board-host { width: min(96vw, 460px); height: min(96vw, 460px); }
  .hud-sidebar { width: 100%; overflow: visible; }
  .trade-cols, .badges-grid { grid-template-columns: 1fr; }
}

/* ====================================================================== */
/* MOBİL YATAY (max-height: 520px)                                        */
/* ====================================================================== */
@media (max-height: 520px) and (orientation: landscape) {
  .game-topbar { height: 42px; padding: 4px 10px; }
  .game-workspace { padding: 6px 10px; gap: 8px; }
  #phaser-board-host { width: calc(100vh - 56px); height: calc(100vh - 56px); }
  .hud-sidebar { width: 300px; padding: 8px; }
}
