/* ============================================================
   KELİME ZİNCİRİ — style.css
   Modern Dark Mode, Glassmorphism & Responsive Tasarım
   ============================================================ */

:root {
  --bg-gradient: linear-gradient(135deg, #0d0614 0%, #170926 40%, #08030d 100%);
  --panel-bg: rgba(26, 12, 42, 0.75);
  --panel-border: rgba(168, 85, 247, 0.3);
  --primary-color: #a855f7;
  --primary-hover: #9333ea;
  --accent-color: #eab308;
  --accent-glow: rgba(234, 179, 8, 0.5);
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --success-color: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-pixel: 'Press Start 2P', monospace;
  --font-heading: 'Russo One', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: url('bg.jpg') center/cover no-repeat fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

#app {
  width: 100vw;
  height: 100vh;
  display: flex;
  position: relative;
}

/* ============================================================
   ORIENTATION WARNING (YATAY EKRAN ENGELLEME)
   ============================================================ */
#orientation-warning {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #0b0614;
  color: #ef4444;
  font-family: var(--font-pixel), var(--font-body);
  font-size: 0.85rem;
  z-index: 99999999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  gap: 16px;
}

#orientation-warning .phone-rotate-icon {
  color: #a855f7;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.6));
  animation: rotatePhone 2.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

#orientation-warning p {
  letter-spacing: 1.5px;
  line-height: 1.6;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  max-width: 320px;
}

@keyframes rotatePhone {
  0%, 15% { transform: rotate(0deg); }
  45%, 65% { transform: rotate(-90deg); }
  90%, 100% { transform: rotate(0deg); }
}

@media screen and (orientation: landscape) and (max-height: 650px) {
  #orientation-warning {
    display: flex !important;
  }
  #app {
    display: none !important;
  }
}

.screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.hidden {
  display: none !important;
}

/* LOBBY GLASS PANEL & LAYOUT (DEV 3D KİRLİ GRİ BUTON/KONSOL KUTUSU) */
.lobby-glass-panel {
  width: min(94vw, 520px) !important;
  max-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background: #1c1b20;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 12px 0 #111014, /* 3D Dev Buton Taban Alt Görsel Derinliği */
    0 12px 0 1.5px rgba(255, 255, 255, 0.9), /* 3D Taban Etrafındaki İnce Beyaz Çizgi */
    0 24px 50px rgba(0, 0, 0, 0.8),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -3px 0 rgba(0, 0, 0, 0.4);
  z-index: 10;
  padding: 26px 28px;
  gap: 16px;
}

.lobby-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
}

/* Pixel font başlık */
.logo-title {
  font-family: var(--font-pixel);
  font-size: clamp(0.85rem, 3vw, 1.1rem);
  color: #fff;
  letter-spacing: 2px;
  line-height: 1.5;
  text-align: center;
  text-shadow:
    0 0 6px rgba(168, 85, 247, 0.4),
    0 0 12px rgba(168, 85, 247, 0.2),
    0 2px 0 rgba(88, 28, 135, 0.9);
}

/* Lobi alt metni */
.logo-sub {
  font-size: 0.58rem;
  font-family: var(--font-pixel);
  color: var(--text-muted);
  letter-spacing: 0.3px;
  line-height: 1.8;
  max-width: 360px;
  text-align: center;
}

/* Lobby aksiyon satırı */
.lobby-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  width: 100%;
}

.players-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-bottom: 4px;
}

.players-header h3 {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--accent-color);
  letter-spacing: 1px;
}

/* PLAYERS GRID (GÖMÜLÜ İÇ EKRAN YUVASI) */
.players-list-wrapper {
  max-height: 260px;
  overflow-y: auto;
  padding: 12px;
  background: rgba(14, 13, 17, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow:
    inset 0 4px 12px rgba(0, 0, 0, 0.6),
    inset 0 0 1px rgba(168, 85, 247, 0.2);
}

.players-list-wrapper::-webkit-scrollbar {
  width: 6px;
}
.players-list-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.players-list-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.players-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

/* Oyuncu kartı — 3D Yarı Saydam Beyaz Çip (Glassmorphism) */
.player-card-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  box-shadow: 0 3px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.18s ease;
}

.player-card-chip:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 3px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.player-card-index {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--accent-color);
  flex-shrink: 0;
  min-width: 14px;
  text-align: center;
}

.player-card-name {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.player-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.player-card-badges {
  display: none; /* sadece isim göster */
}

.host-crown {
  display: none;
}

/* ============================================================
   3D BUTON SİSTEMİ (Derinlik & Basma Hissiyatı)
   ============================================================ */

.btn-3d {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  user-select: none;
  width: 100%;
}

/* Buton yüzü (üst katman) */
.btn-3d .btn-3d-face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  line-height: 1.5;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: transform 0.08s ease;
  pointer-events: none;
}

/* OYUNU BASLA butonu */
.btn-3d.start-game-btn {
  flex: 2;
  width: 100%;
  box-shadow:
    0 6px 0 #5b21b6,
    0 8px 16px rgba(88, 28, 135, 0.4),
    0 0 15px rgba(168, 85, 247, 0.15);
}

.btn-3d.start-game-btn .btn-3d-face {
  background: linear-gradient(180deg, #c084fc 0%, #a855f7 45%, #9333ea 100%);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.btn-3d.start-game-btn:hover {
  box-shadow:
    0 5px 0 #5b21b6,
    0 7px 14px rgba(88, 28, 135, 0.4),
    0 0 18px rgba(168, 85, 247, 0.2);
  transform: translateY(1px);
}

.btn-3d.start-game-btn:active {
  box-shadow:
    0 2px 0 #5b21b6,
    0 3px 8px rgba(88, 28, 135, 0.5);
  transform: translateY(4px);
}

.btn-3d.start-game-btn:active .btn-3d-face {
  transform: translateY(-2px);
}

/* SIRAYI KARIŞTIR butonu */
.btn-3d.shuffle-btn {
  flex: 1;
  box-shadow:
    0 5px 0 #92400e,
    0 7px 14px rgba(146, 64, 14, 0.35),
    0 0 10px rgba(234, 179, 8, 0.10);
}

.btn-3d.shuffle-btn .btn-3d-face {
  background: linear-gradient(180deg, #fde68a 0%, #eab308 45%, #ca8a04 100%);
  color: #1c1000;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
  font-size: 0.5rem;
  padding: 14px 12px;
}

.btn-3d.shuffle-btn:hover {
  box-shadow:
    0 4px 0 #92400e,
    0 6px 12px rgba(146, 64, 14, 0.35),
    0 0 12px rgba(234, 179, 8, 0.15);
  transform: translateY(1px);
}

.btn-3d.shuffle-btn:active {
  box-shadow:
    0 2px 0 #92400e,
    0 3px 8px rgba(146, 64, 14, 0.4);
  transform: translateY(3px);
}

.btn-3d.shuffle-btn:active .btn-3d-face {
  transform: translateY(-1px);
}

/* TEKRAR OYNA (REMATCH) 3D BUTONU */
.btn-3d.restart-game-btn {
  width: 100%;
  box-shadow:
    0 6px 0 #047857,
    0 6px 12px rgba(16, 185, 129, 0.2),
    0 0 8px rgba(16, 185, 129, 0.1);
}

.btn-3d.restart-game-btn .btn-3d-face {
  background: linear-gradient(180deg, #34d399 0%, #10b981 45%, #059669 100%);
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  font-size: 0.75rem;
  padding: 16px 24px;
}

.btn-3d.restart-game-btn:hover {
  box-shadow:
    0 5px 0 #047857,
    0 6px 12px rgba(16, 185, 129, 0.22),
    0 0 10px rgba(16, 185, 129, 0.15);
  transform: translateY(1px);
}

.btn-3d.restart-game-btn:active {
  box-shadow:
    0 2px 0 #047857,
    0 3px 8px rgba(16, 185, 129, 0.5);
  transform: translateY(4px);
}

.btn-3d.restart-game-btn:active .btn-3d-face {
  transform: translateY(-2px);
}



/* ============================================================
   OYUN EKRANI (DEV 3D KİRLİ GRİ KONSOL PANELİ)
   ============================================================ */

.game-console-panel {
  width: min(94vw, 680px) !important;
  height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background: #1c1b20;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 12px 0 #111014,
    0 12px 0 1.5px rgba(255, 255, 255, 0.9),
    0 24px 50px rgba(0, 0, 0, 0.8),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -3px 0 rgba(0, 0, 0, 0.4);
  z-index: 10;
  padding: 20px 24px;
  gap: 12px;
}

/* 1. ÜST HUD BARI */
.game-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.hud-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(14, 13, 17, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.hud-label {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.hud-val {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: #fff;
}

.hud-pill.timer-pill {
  border-color: rgba(234, 179, 8, 0.3);
  background: rgba(30, 20, 10, 0.8);
}

.hud-pill.turn-pill {
  transition: all 0.2s ease;
}

.hud-pill.timer-pill.urgent,
.hud-pill.turn-pill.urgent {
  background: rgba(80, 15, 15, 0.9);
  border-color: rgba(239, 68, 68, 0.8);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.spectator-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.25) 0%, rgba(161, 98, 7, 0.35) 100%);
  border: 1.5px solid rgba(234, 179, 8, 0.6);
  color: #fde68a;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
  margin-bottom: 4px;
  align-self: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.hud-timer-num {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--accent-color);
}

/* 2. İSTENEN HARF BANNERI */
.target-letter-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(14, 13, 17, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.target-letter-title {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.letter-badge-3d {
  font-family: var(--font-pixel);
  font-size: 1.3rem;
  color: #fff;
  background: linear-gradient(180deg, #c084fc 0%, #a855f7 100%);
  padding: 4px 14px;
  border-radius: 8px;
  box-shadow: 0 3px 0 #6b21a8;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

/* 3. AKTİF OYUNCULAR ÇUBUĞU (AYRI SATIRLAR & SÜRÜKLE-KAYDIR MEKANİZMASI) */
.active-players-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.players-strip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
}

.players-strip-row.active-dragging {
  cursor: grabbing;
}

.players-strip-row::-webkit-scrollbar {
  height: 4px;
}

.players-strip-row::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: 4px;
}

.players-strip-row.eliminated-row {
  opacity: 0.85;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 6px;
}

.active-player-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  box-sizing: border-box;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 2px 0 #cbd5e1;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  text-align: center;
}

.active-player-chip .chip-name {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-player-chip.turn-now {
  border-color: #a855f7;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5), 0 3px 0 #9333ea;
  transform: translateY(-2px);
}

.active-player-chip.eliminated {
  opacity: 0.4;
  background: #cbd5e1;
  box-shadow: none;
}

.chip-eliminated-tag {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: #ef4444;
}

/* 4. KELİME AKIŞ (GÖMÜLÜ EKRAN SLOTU) */
.word-stream-container {
  flex: 1;
  max-height: 280px;
  overflow-y: auto;
  padding: 12px;
  background: rgba(14, 13, 17, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.6);
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE & Edge */
}

.word-stream-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.word-stream-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.initial-word-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px dashed rgba(168, 85, 247, 0.4);
  border-radius: 8px;
}

.word-sender {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--text-muted);
}

.initial-word-text {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--accent-color);
  letter-spacing: 1px;
}

.word-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(28, 24, 38, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.word-card.my-word {
  border-color: rgba(234, 179, 8, 0.4);
  background: rgba(35, 28, 20, 0.9);
}

.word-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.word-author {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--primary-color);
}

.status-badge {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.status-badge.status-valid {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.status-badge.status-rejected,
.status-badge.status-invalid {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.word-card.local-error-card {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(45, 15, 20, 0.9);
  animation: fadeInHowToModal 0.2s ease-out;
}

.word-text {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}

.word-text.error-msg-text {
  color: #fca5a5;
  font-size: 0.6rem;
}

.word-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.reject-btn {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  padding: 4px 8px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ef4444;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reject-btn:hover {
  background: #ef4444;
  color: #fff;
}

.reject-info {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--text-muted);
}

/* 5. KELİME GİRİŞ DOCK'U */
.word-input-container {
  width: 100%;
}

.input-wrapper-3d {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 13, 17, 0.85);
  border: 1.5px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 6px 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
  min-height: 48px;
}

.input-prefix-badge {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: #fff;
  background: var(--primary-color);
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 0 #7c3aed;
  flex-shrink: 0;
}

#word-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  letter-spacing: 0.3px;
  padding: 0 8px;
  height: 36px;
  line-height: 36px;
  box-sizing: border-box;
  text-transform: uppercase;
}

#word-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
}

.send-word-btn {
  width: auto !important;
  flex-shrink: 0;
  box-shadow: 0 4px 0 #5b21b6;
}

.send-word-btn .btn-3d-face {
  background: linear-gradient(180deg, #c084fc 0%, #a855f7 100%);
  color: #fff;
  padding: 10px 14px;
}

/* ============================================================
   NASIL OYNANIR (GLOBAL FLOATING BUTTON & MODAL - ORİJİNAL)
   ============================================================ */

.global-how-to-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5), 0 0 10px rgba(168, 85, 247, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.global-how-to-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.7);
}

.how-to-btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-how-to-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 8, 16, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.global-how-to-box {
  background: #1c1b20;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 10px 0 #111014,
    0 10px 0 1.5px rgba(255, 255, 255, 0.9),
    0 20px 40px rgba(0, 0, 0, 0.8),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -3px 0 rgba(0, 0, 0, 0.4);
  padding: 28px;
  width: min(92vw, 540px);
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  color: #f8fafc;
}

.global-how-to-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.global-how-to-close:hover {
  color: #fff;
}

.global-how-to-title {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--accent-color);
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-align: center;
}

.global-how-to-subtitle {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-align: center;
}

.global-how-to-content .rules-section {
  margin-bottom: 14px;
  background: rgba(14, 13, 17, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
}

.global-how-to-content h4 {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.global-how-to-content p, .global-how-to-content li {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.global-how-to-content ul {
  padding-left: 18px;
}

/* ============================================================
   MODALLER & OVERLAY'LER (Skor Tablosu & Tur Geçişi)
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 9, 14, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.overlay.hidden {
  display: none !important;
}

.modal-box, .round-transition-box, .round-review-box {
  background: #1c1b20;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 10px 0 #111014,
    0 10px 0 1.5px rgba(255, 255, 255, 0.9),
    0 20px 40px rgba(0, 0, 0, 0.8),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -3px 0 rgba(0, 0, 0, 0.4);
  padding: 24px 22px;
  width: min(92vw, 540px);
  text-align: center;
}

.review-header-badge {
  font-family: var(--font-pixel) !important;
  font-size: 0.72rem !important;
  color: #c084fc !important;
  letter-spacing: 1.5px !important;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.5), 0 2px 0 rgba(88, 28, 135, 0.9) !important;
  text-align: center;
  margin-bottom: 10px;
}

.review-title {
  display: none !important;
}

.review-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 16px;
  font-weight: 500;
  text-align: center;
}

.review-actions-row {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.review-words-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(14, 13, 17, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.6);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.review-words-list::-webkit-scrollbar {
  display: none;
}

.review-word-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(26, 20, 36, 0.9);
  border: 1.5px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
}

.review-word-card.rejected {
  background: rgba(45, 15, 20, 0.95);
  border-color: rgba(239, 68, 68, 0.6);
}

.review-word-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}

.review-word-player {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: #c084fc;
}

.review-word-colon {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
}

.review-word-val {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: #fff;
  word-break: break-word;
  overflow-wrap: break-word;
}

.review-word-card.rejected .review-word-val {
  text-decoration: line-through;
  color: #ef4444;
}

.review-reject-btn {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  padding: 8px 12px;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 0 #991b1b, 0 4px 10px rgba(239, 68, 68, 0.3);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.review-reject-btn:hover {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #991b1b, 0 3px 8px rgba(239, 68, 68, 0.4);
  background: linear-gradient(180deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
}

.review-reject-btn:active,
.review-reject-btn.voted {
  transform: translateY(3px);
  box-shadow: 0 0 0 #991b1b;
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
}

.review-info-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  padding: 8px 12px;
  border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.review-info-tag.my-word-tag {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.25) 0%, rgba(126, 34, 206, 0.35) 100%);
  border: 1.5px solid rgba(168, 85, 247, 0.5);
  border-top: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #e9d5ff;
  box-shadow: 0 3px 0 rgba(88, 28, 135, 0.7);
}

.review-info-tag.status-rejected-tag {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.3) 0%, rgba(185, 28, 28, 0.4) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.6);
  border-top: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #fca5a5;
  box-shadow: 0 3px 0 rgba(153, 27, 27, 0.7);
}

.modal-title, .transition-title {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: #fff;
  letter-spacing: 1px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.modal-sub, .transition-subtitle {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.scoreboard-table-wrap {
  background: rgba(14, 13, 17, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 16px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.6);
}

.scoreboard-table {
  width: 100%;
  border-collapse: collapse;
}

.scoreboard-table th, .scoreboard-table td {
  padding: 10px 8px;
  text-align: left;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.scoreboard-table th {
  color: var(--primary-color);
}

.scoreboard-table td {
  color: #e2e8f0;
}

.next-round-btn {
  width: 100%;
  margin-top: 8px;
}

/* ============================================================
   KAZANAN EKRANI & OYUN SONU MODALİ
   ============================================================ */
.end-game-box {
  max-width: 420px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}

.winner-hero-box {
  width: 100%;
  margin: 16px 0;
  padding: 20px 16px;
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.25) 0%, rgba(26, 20, 36, 0.9) 100%);
  border: 2px solid rgba(234, 179, 8, 0.6);
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.25), inset 0 0 15px rgba(168, 85, 247, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.winner-badge-3d {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  color: #1e1b4b;
  border-radius: 8px;
  box-shadow: 0 3px 0 #92400e, 0 4px 10px rgba(217, 119, 6, 0.4);
  font-weight: bold;
  text-transform: uppercase;
}

.winner-name-display {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.8), 0 2px 4px rgba(0, 0, 0, 0.9);
  word-break: break-word;
  text-align: center;
}

.game-results-list {
  width: 100%;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.game-results-list::-webkit-scrollbar {
  display: none;
}

.results-section-title {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: #94a3b8;
  letter-spacing: 1px;
  margin-top: 4px;
  margin-bottom: 2px;
  text-align: left;
}

.result-player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(30, 27, 45, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.result-player-name {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: #e2e8f0;
}

.result-status-tag {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  padding: 4px 8px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 6px;
}

.highlight-red-duration {
  color: #ef4444 !important;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
  display: inline-block;
  margin-left: 4px;
}

.countdown-circle {
  width: 96px;
  height: 96px;
  margin: 20px auto 10px auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(168, 85, 247, 0.25) 0%, rgba(15, 10, 25, 0.95) 75%);
  border: 3px solid #a855f7;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.85),
    0 0 25px rgba(168, 85, 247, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.35),
    inset 0 -4px 10px rgba(88, 28, 135, 0.8);
  position: relative;
  transition: all 0.2s ease;
}

.countdown-num {
  font-family: var(--font-pixel);
  font-size: 2.2rem;
  color: #fde68a;
  text-shadow:
    0 0 12px rgba(234, 179, 8, 0.65),
    0 3px 0 #ca8a04;
  line-height: 1;
}

.countdown-num.pulse {
  animation: countdownTickPulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes countdownTickPulse {
  0% { transform: scale(1.45); filter: brightness(1.5); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulseIcon {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

@keyframes numPulse {
  0% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* ANIMASYONLAR */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE SİSTEM — Tüm Ekran Boyutları
   ============================================================ */

/* --- TABLET VE MOBİL (≤ 768px) --- */
@media (max-width: 768px) {

  body {
    background: url('bg-mobile.jpg') center/cover no-repeat fixed;
  }

  /* Lobi kartı — tam genişlikte */
  .lobby-glass-panel {
    width: 96vw !important;
    max-height: 94dvh;
    padding: 18px 16px;
    border-radius: 20px;
  }

  .logo-title {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
  }

  .logo-sub {
    font-size: 0.78rem;
  }

  /* Oyuncu ızgarası — 2 sütun sabit */
  .players-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .players-list-wrapper {
    max-height: 220px;
  }

  /* Oyun ekranı */
  #game-screen {
    padding: 10px 8px;
    gap: 6px;
  }

  .top-bar {
    width: 100%;
    gap: 6px;
  }

  .info-pill {
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 12px;
  }

  .timer-num {
    font-size: 1.2rem;
  }

  .letter-banner-inner {
    padding: 6px 16px;
    gap: 8px;
  }

  .letter-badge {
    font-size: 1.8rem;
  }

  .letter-title {
    font-size: 0.75rem;
  }

  /* Oyuncu çubuğu */
  .players-bar {
    width: 100%;
    gap: 6px;
    padding: 4px 0;
  }

  .player-chip {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  /* Kelime akış */
  .word-stream-container {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    border-radius: 14px;
  }

  .word-text {
    font-size: 1.1rem;
  }

  /* Kelime giriş */
  .word-input-container {
    width: 100%;
  }

  .input-prefix-badge {
    font-size: 0.8rem;
  }

  #word-input {
    font-size: 0.75rem;
  }

  .send-word-btn .btn-3d-face {
    padding: 8px 12px;
    font-size: 0.6rem;
  }

  /* Skor tablosu */
  .scoreboard-table th,
  .scoreboard-table td {
    padding: 7px 6px;
    font-size: 0.82rem;
  }

  /* Tur geçiş overlay */
  .transition-title {
    font-size: 0.9rem;
  }

  .countdown-circle {
    width: 80px;
    height: 80px;
  }

  .countdown-num {
    font-size: 1.8rem;
  }

  /* Arka plan orbs — mobilde biraz küçüt */
  .bg-orb-1 { width: 320px; height: 320px; }
  .bg-orb-2 { width: 280px; height: 280px; }
  .bg-orb-3 { width: 200px; height: 200px; }
  .bg-orb-4 { width: 140px; height: 140px; }

  /* Zincir halkalar — küçük ekranda gizle (kart arkasına düşüyor) */
  .chain-ring-1,
  .chain-ring-2,
  .chain-ring-5 {
    display: none;
  }

  .chain-ring-3,
  .chain-ring-4 {
    right: -5px;
    transform: scale(0.7);
    transform-origin: bottom right;
  }
}

/* --- KÜÇÜK TELEFON (≤ 480px) --- */
@media (max-width: 480px) {

  /* Lobi */
  .lobby-glass-panel {
    padding: 14px 12px;
    gap: 12px;
    border-radius: 16px;
  }

  .logo-title {
    font-size: 1.35rem;
  }

  .logo-sub {
    font-size: 0.72rem;
  }

  .players-header h3 {
    font-size: 0.82rem;
  }

  /* Tek sütun ızgara — çok küçük ekranlarda */
  .players-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .players-list-wrapper {
    max-height: 180px;
  }

  .player-card-name {
    font-size: 0.82rem;
  }

  .player-card-index {
    width: 19px;
    height: 19px;
    font-size: 0.65rem;
  }

  .player-card-chip {
    padding: 8px 10px;
    border-radius: 10px;
  }

  /* Aksiyon butonları — dikey düzenle */
  .lobby-actions-row {
    flex-direction: column;
    gap: 8px;
  }

  .shuffle-btn,
  .start-game-btn {
    flex: none;
    width: 100%;
    font-size: 0.85rem;
    padding: 12px;
  }

  .start-game-btn {
    font-size: 0.9rem;
  }

  /* Oyun ekranı */
  .info-pill {
    padding: 5px 8px;
    font-size: 0.72rem;
    gap: 4px;
  }

  .timer-num {
    font-size: 1rem;
  }

  .letter-badge {
    font-size: 1.5rem;
  }

  .letter-banner-inner {
    padding: 5px 12px;
  }

  .word-text {
    font-size: 0.95rem;
  }

  #word-input {
    font-size: 0.7rem;
    padding: 6px 4px;
  }

  .input-prefix-badge {
    font-size: 0.75rem;
    padding: 5px 8px;
  }

  .send-word-btn .btn-3d-face {
    padding: 7px 10px;
    font-size: 0.55rem;
  }

  /* Tur geçiş */
  .transition-title {
    font-size: 0.8rem;
  }

  .round-transition-box {
    padding: 24px 16px;
  }

  /* Global how-to butonu */
  .global-how-to-btn {
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  /* Scoreboard modal genişliği */
  .global-how-to-box {
    width: 94vw;
    padding: 20px 14px;
  }
}

/* --- GENİŞ MASAÜSTÜ (≥ 1100px) --- */
@media (min-width: 1100px) {
  .lobby-glass-panel {
    width: min(90vw, 560px) !important;
    max-height: min(88vh, 680px);
    padding: 30px 36px;
  }

  .players-list-wrapper {
    max-height: 300px;
  }
}

/* --- MOBİL SAFE AREA (NOTCH DESTEĞI) --- */
@supports (padding: max(0px)) {
  body {
    padding-top: max(0px, env(safe-area-inset-top));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }

  #game-screen {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* ============================================================
   GLOBAL NASIL OYNANIR (i) BUTONU VE MODAL STİLLERİ
   ============================================================ */
.global-how-to-btn {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: calc(20px + env(safe-area-inset-left, 0px));
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3b165c 0%, #1b092b 70%, #0d0317 100%);
  border: 2px solid #a855f7;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.75),
    inset 0 1px 2px rgba(255, 255, 255, 0.35),
    inset 0 -2px 6px rgba(0, 0, 0, 0.8),
    0 0 16px rgba(168, 85, 247, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999999;
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease, border-color 0.25s ease;
  user-select: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.how-to-btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a855f7;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  transition: color 0.25s ease, transform 0.25s ease;
}

.global-how-to-btn:hover {
  transform: translateY(-3px) scale(1.1);
  border-color: #ffffff;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.85),
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    0 0 25px rgba(168, 85, 247, 0.6);
}

.global-how-to-btn:hover .how-to-btn-inner {
  color: #ffffff;
  transform: scale(1.1);
}

.global-how-to-btn:active {
  transform: translateY(1px) scale(0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.global-how-to-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999999;
  padding: 15px;
  animation: fadeInHowToModal 0.25s ease-out forwards;
}

.global-how-to-modal.hidden {
  display: none !important;
}

.global-how-to-box {
  background: linear-gradient(165deg, #1c0a30 0%, #0c0416 100%);
  border: 2px solid #a855f7;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 0 18px rgba(168, 85, 247, 0.25);
  color: #f8fafc;
  padding: 26px 28px;
  border-radius: 20px;
  width: min(92vw, 530px);
  position: relative;
  max-height: calc(88vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: none;
}

.global-how-to-box::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.global-how-to-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 10;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #a855f7;
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.global-how-to-close:hover {
  color: #ffffff;
  transform: scale(1.15);
}

.global-how-to-title {
  color: #a855f7;
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 4px 0;
  padding: 0 35px;
  letter-spacing: 0.4px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  font-family: var(--font-heading);
}

.global-how-to-subtitle {
  color: #cbd5e1;
  font-size: 0.82rem;
  text-align: center;
  margin: 0 0 20px 0;
  font-weight: 500;
  letter-spacing: 0.2px;
  opacity: 0.95;
  font-family: var(--font-body);
}

.global-how-to-content .rules-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.global-how-to-content h4 {
  color: #a855f7;
  font-size: 0.95rem;
  margin: 0 0 10px 0;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-family: var(--font-heading);
}

.global-how-to-content p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #f1f5f9;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.15px;
  font-family: var(--font-body);
}

.global-how-to-content ul,
.global-how-to-content ol {
  margin: 0;
  padding-left: 22px;
  font-size: 0.88rem;
  color: #f1f5f9;
  line-height: 1.68;
  font-weight: 400;
  letter-spacing: 0.15px;
  font-family: var(--font-body);
}

.global-how-to-content li {
  margin-bottom: 8px;
}

.global-how-to-content li strong {
  color: #ffffff;
  font-weight: 700;
}

.global-how-to-content li:last-child {
  margin-bottom: 0;
}

@keyframes fadeInHowToModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
