/* TETRIS 3D PRO · Enhanced Top Command Bar, Right Pro Tactical HUD & 1P/2P/3P/4P Arena Layout (16.11.2026 · Owner #6683)
   Salih Tema Renk Ailesi (#07101f / #0d1e36 / #336699 / #4db8ff / #8fd3ff) ve Takım Renkleri korunmuştur. */

:root {
  --nx-sapphire: #336699;
  --nx-cyan: #4db8ff;
  --nx-ice: #8fd3ff;
  --nx-glass-top: linear-gradient(180deg, rgba(14, 27, 48, 0.90), rgba(9, 18, 34, 0.84));
  --nx-glass-side: linear-gradient(165deg, rgba(14, 27, 48, 0.88), rgba(8, 15, 29, 0.92));
  --nx-glass-card: linear-gradient(180deg, rgba(24, 44, 74, 0.46), rgba(11, 22, 40, 0.62));
  --nx-border-soft: rgba(143, 211, 255, 0.18);
  --nx-border-strong: rgba(77, 184, 255, 0.42);
}

/* ================= 1) İKİ KATLI ÜST KOMUTA ŞERİDİ (.game-header · Owner #7325) =================
   Üst Satır (.nx-hdr-toprow): [← Ana Ada] + [Üye Profil Barı] + hemen sağında [NEXUS TETRIS · 1K..4K Barı]
   Alt Satır (.nx-hdr-bottomrow): Onların tam altında boydan boya [Uzun Oyun Kontrol Barı (.header-controls)] */
body[data-tetris-mode] .game-shell {
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 8px 16px 14px !important;
}

body[data-tetris-mode] .game-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
  min-height: 0;
  margin-right: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.nx-hdr-toprow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 98px; /* Sol üstteki ← Ana Ada (#nxPlanetReturnMenu) için sıfır çakışma alanı */
  min-height: 44px;
}

.nx-hdr-profile-slot {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

/* Oyun içinde Üye Profil Barı üst satıra gömülür; sağında NEXUS TETRIS barı yer alır */
#nx-oyun-profil-hud[data-nx-docked="in-header"] {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  max-width: none !important;
  padding: 4px 10px !important;
  gap: 6px !important;
  min-height: 42px !important;
  justify-content: flex-start !important;
}

#nx-oyun-profil-hud[data-nx-docked="in-header"] .nx-hud-game-title {
  display: none !important;
}

#nx-oyun-profil-hud[data-nx-docked="in-header"] .nx-hud-act {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 8px !important;
  font-size: 10px !important;
  gap: 5px !important;
}

.nx-hdr-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-height: 42px;
  padding: 4px 12px;
  border-radius: 5px;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(143, 211, 255, 0.075) 3px 4px),
    linear-gradient(155deg, rgba(7, 27, 43, 0.58), rgba(10, 40, 65, 0.46));
  border: 1px solid #5583a5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(190, 240, 255, 0.16);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.nx-hdr-bottomrow {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 5px 12px;
  border-radius: 5px;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(143, 211, 255, 0.06) 3px 4px),
    linear-gradient(180deg, rgba(10, 27, 46, 0.78), rgba(7, 18, 34, 0.72));
  border: 1px solid rgba(85, 131, 165, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(190, 240, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body[data-tetris-mode] .game-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 17px !important;
  font-weight: 800 !important;
  letter-spacing: 0.09em !important;
  color: #f2f8ff !important;
  text-shadow: 0 0 18px rgba(77, 184, 255, 0.28);
}

body[data-tetris-mode] .game-header .brand span {
  padding: 3px 8px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(77, 184, 255, 0.24), rgba(51, 102, 153, 0.38));
  border: 1px solid rgba(143, 211, 255, 0.36);
  color: var(--nx-ice) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
}

/* Hızlı 1P / 2P / 3P / 4P Oyuncu Sayısı Seçici Kapsülü */
.nx-mode-seg {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(6, 13, 26, 0.72);
  border: 1px solid rgba(143, 211, 255, 0.2);
}

body[data-tetris-mode] .nx-mode-seg button {
  min-height: 28px !important;
  padding: 4px 9px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #96b3d2 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap;
}

body[data-tetris-mode] .nx-mode-seg button:hover {
  color: #eaf4ff !important;
  background: rgba(77, 184, 255, 0.12) !important;
}

body[data-tetris-mode] .nx-mode-seg button.aktif {
  background: linear-gradient(180deg, #3c86cc, #2b5d91) !important;
  border-color: rgba(143, 211, 255, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(51, 102, 153, 0.5) !important;
}

/* Alt Satır Uzun Kontrol Barı: Profil ve NEXUS TETRIS barlarının altında tam genişlikte durur */
body[data-tetris-mode] .game-header .header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px !important;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

/* Ortak NEXUS müzik menüsü ( MÜZİK · Tetris Pro) ve korumalı  SES kapsülü varken mükerrer eski seçiciyi gizle */
body[data-tetris-mode] #musicChoice,
body[data-tetris-mode] label.background-choice:has(#musicTrack),
body[data-tetris-mode] #music,
body[data-tetris-mode] #musicVolumeLabel,
body[data-tetris-mode] .nexus-game-audio .volume,
body[data-tetris-mode] .nexus-game-audio label {
  display: none !important;
}

body[data-tetris-mode] .nexus-game-audio.inline {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
}

body[data-tetris-mode] .nexus-game-audio.inline button:first-of-type {
  max-width: 176px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-tetris-mode] .nexus-game-audio.inline button:nth-of-type(3) {
  max-width: 206px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-tetris-mode] .nexus-game-audio.inline button:nth-of-type(3)[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(51, 102, 153, 0.72), rgba(29, 64, 102, 0.86)) !important;
  border-color: rgba(77, 184, 255, 0.78) !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(77, 184, 255, 0.34) !important;
}

.nx-hdr-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 12px;
  background: rgba(7, 15, 29, 0.56);
  border: 1px solid rgba(143, 211, 255, 0.14);
}

body[data-tetris-mode] .game-header .background-choice {
  display: inline-flex !important;
  align-items: center;
  gap: 5px !important;
  margin: 0 !important;
  padding: 0 2px;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #8fb0d4 !important;
}

body[data-tetris-mode] .game-header .background-choice select {
  min-height: 29px !important;
  max-width: 112px !important;
  padding: 3px 7px !important;
  border-radius: 6px !important;
  background: rgba(16, 33, 58, 0.85) !important;
  border: 1px solid rgba(143, 211, 255, 0.24) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
}

body[data-tetris-mode] .game-header .header-controls button,
body[data-tetris-mode] .nexus-game-audio.inline button {
  min-height: 29px !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
  white-space: nowrap;
}

/* Görünür Canlı Oyun Sesi Kapsülü (7801 duvar sesi %0 ezmesine karşı şeffaf denetim) */
.nx-vol-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 4px;
  border-radius: 9px;
  background: rgba(18, 38, 66, 0.72);
  border: 1px solid rgba(143, 211, 255, 0.24);
}

.nx-vol-pill.sessiz {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(68, 42, 14, 0.55);
}

body[data-tetris-mode] .nx-vol-pill button.nx-vol-btn {
  min-height: 24px !important;
  padding: 2px 6px !important;
  border: 1px solid rgba(143, 211, 255, 0.22) !important;
  border-radius: 4px !important;
  background: rgba(51, 102, 153, 0.28) !important;
  color: #dff0ff !important;
  font: 700 10px/1 "Cascadia Mono", Consolas, monospace !important;
  letter-spacing: 0.06em !important;
}

.nx-vol-pill input[type="range"] {
  width: 60px;
  height: 4px;
  accent-color: #4db8ff;
  cursor: pointer;
}

.nx-vol-pill .nx-vol-val {
  min-width: 30px;
  text-align: right;
  font: 700 10.5px/1 "Cascadia Mono", Consolas, monospace;
  color: #bfe2ff;
  font-variant-numeric: tabular-nums;
}

body[data-tetris-mode] #highscores {
  background: linear-gradient(180deg, rgba(51, 102, 153, 0.42), rgba(31, 66, 104, 0.55)) !important;
  border-color: rgba(143, 211, 255, 0.42) !important;
  color: #e8f4ff !important;
}

/* ================= 2) SAĞ PRO TAKTİK HUD PANELİ (.side) ================= */
@media (min-width: 1024px) {
  body[data-tetris-mode]:not(.versus-mode) .play-layout {
    grid-template-columns: minmax(0, 1fr) 280px !important;
    gap: 16px !important;
  }
  /* 2P, 3P ve 4P modlarında da sağ taktik sıralama paneli görünür kalır! */
  body[data-tetris-mode].versus-mode .play-layout {
    grid-template-columns: minmax(0, 1fr) 262px !important;
    gap: 14px !important;
  }
  body[data-tetris-mode].versus-mode .side {
    display: flex !important;
  }
}

body[data-tetris-mode] .side {
  padding: 11px 12px 46px !important;
  gap: 7px;
  background: var(--nx-glass-side) !important;
  border: 1px solid rgba(77, 184, 255, 0.28) !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 22px 50px rgba(0, 0, 0, 0.48), 0 0 30px rgba(51, 102, 153, 0.14) !important;
  overflow: hidden;
}

/* Sağ Panel Başlık Şeridi */
.nx-side-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  border-radius: 5px;
  background: linear-gradient(95deg, rgba(51, 102, 153, 0.42), rgba(20, 40, 68, 0.35));
  border: 1px solid rgba(143, 211, 255, 0.25);
}

.nx-side-banner b {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--nx-ice);
  text-transform: uppercase;
}

.nx-side-banner span {
  font: 700 10px/1 "Cascadia Mono", Consolas, monospace;
  color: #a9c7e6;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(7, 15, 30, 0.65);
  border: 1px solid rgba(143, 211, 255, 0.2);
}

/* NEXT & HOLD 3B Kutu Geliştirmesi (1P modunda aktif; 2P/3P/4P'de kuyu üstü HUD'da yer alır) */
body[data-tetris-mode].versus-mode .side .next-card {
  display: none !important;
}

body[data-tetris-mode] .side .next-card {
  position: relative;
  margin: 0 !important;
  padding: 10px 12px 6px !important;
  border-radius: 13px !important;
  background: radial-gradient(circle at 50% 62%, rgba(51, 102, 153, 0.26), rgba(8, 16, 30, 0.72) 72%) !important;
  border: 1px solid rgba(143, 211, 255, 0.22) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-tetris-mode] .side #nextView {
  height: 104px !important;
}

body[data-tetris-mode] .side #holdView {
  height: 82px !important;
}

.nx-hold-empty {
  position: absolute;
  inset: 28px 10px 8px;
  display: grid;
  place-items: center;
  pointer-events: none;
  border: 1px dashed rgba(143, 211, 255, 0.16);
  border-radius: 9px;
  color: rgba(143, 211, 255, 0.42);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nx-hold-empty[hidden] {
  display: none !important;
}

/* Skor & Kişisel Rekor Kartı */
body[data-tetris-mode] .side .score-card {
  margin: 0 !important;
  padding: 13px 14px !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, rgba(30, 58, 96, 0.52), rgba(11, 22, 40, 0.78)) !important;
  border: 1px solid rgba(77, 184, 255, 0.34) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.nx-score-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.nx-combo-pill {
  padding: 2px 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.28), rgba(239, 68, 68, 0.32));
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fde68a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nx-combo-pill[hidden] {
  display: none !important;
}

body[data-tetris-mode] .side .score-card > strong {
  font-size: 34px !important;
  line-height: 1.1 !important;
  margin-top: 4px !important;
  color: #f5faff !important;
  text-shadow: 0 0 20px rgba(77, 184, 255, 0.28);
}

.nx-best-bar {
  margin-top: 7px;
  height: 4px;
  border-radius: 999px;
  background: rgba(143, 211, 255, 0.12);
  overflow: hidden;
}

.nx-best-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #336699, #4db8ff, #8fd3ff);
  transition: width 0.25s ease;
}

/* Seviye ve Katman Kutuları */
body[data-tetris-mode] .side .metrics {
  padding: 0 !important;
  gap: 8px !important;
  margin: 0 !important;
}

body[data-tetris-mode] .side .metrics > div {
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: var(--nx-glass-card) !important;
  border: 1px solid var(--nx-border-soft) !important;
}

body[data-tetris-mode] .side .metrics strong {
  font-size: 22px !important;
  margin-top: 4px !important;
}

/* Kuyu Yüksekliği / Tehlike Ölçer */
.nx-well-meter {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--nx-glass-card);
  border: 1px solid var(--nx-border-soft);
}

.nx-well-meter-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #9bb8d8;
  margin-bottom: 6px;
}

.nx-well-meter-top b {
  font-family: "Cascadia Mono", Consolas, monospace;
  color: #e6f2ff;
}

.nx-well-cells {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  gap: 2px;
  height: 8px;
}

.nx-well-cells i {
  border-radius: 2px;
  background: rgba(143, 211, 255, 0.10);
  transition: background 0.15s ease;
}

.nx-well-cells i.on-safe { background: #38bdf8; box-shadow: 0 0 6px rgba(56, 189, 248, 0.45); }
.nx-well-cells i.on-warn { background: #fbbf24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.5); }
.nx-well-cells i.on-crit { background: #f87171; box-shadow: 0 0 8px rgba(248, 113, 113, 0.65); }

/* Canlı Pro Telemetri 2x2 Izgarası */
.nx-pro-tele {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.nx-tele-box {
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(10, 20, 37, 0.66);
  border: 1px solid rgba(143, 211, 255, 0.14);
}

.nx-tele-box span {
  display: block;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #84a3c4;
  text-transform: uppercase;
}

.nx-tele-box strong {
  display: block;
  margin-top: 3px;
  font: 700 15px/1.15 "Cascadia Mono", Consolas, monospace;
  color: #e4f1ff;
  font-variant-numeric: tabular-nums;
}

/* ================= 3) 2P / 3P / 4P TAKIM SIRALAMASI VE KUYU EKRANI HESABI ================= */
/* Çok oyunculu modda tarih sütunu kuyuları sıkıştırmasın; tam sahne alanı 2, 3 veya 4 kuyuya verilir */
body[data-tetris-mode].versus-mode .stage-panel {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
}

body[data-tetris-mode].versus-mode #historyPanel {
  display: none !important;
}

/* Canlı Arena Sıralama Kartı (Sağ Panelde 2P/3P/4P'de görünür) */
.nx-arena-board {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 11px;
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(20, 40, 70, 0.58), rgba(9, 18, 34, 0.82));
  border: 1px solid rgba(77, 184, 255, 0.32);
}

.nx-arena-board[hidden] {
  display: none !important;
}

.nx-arena-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  color: var(--nx-ice);
}

.nx-seat-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(6, 13, 25, 0.66);
  border-left: 3px solid var(--seat-color, #4db8ff);
}

.nx-seat-row.elendi {
  opacity: 0.48;
  filter: grayscale(0.6);
}

.nx-seat-rank {
  font: 800 11px/1 "Cascadia Mono", Consolas, monospace;
  color: #9ec0e4;
}

.nx-seat-info b {
  display: block;
  font-size: 11px;
  color: #edf6ff;
  letter-spacing: 0.04em;
}

.nx-seat-info small {
  display: block;
  font-size: 9.5px;
  color: #86a6c8;
}

.nx-seat-score {
  text-align: right;
  font: 700 12.5px/1.1 "Cascadia Mono", Consolas, monospace;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

/* Kuyu Üstü Takım Şeritleri (2P, 3P, 4P) */
body[data-tetris-mode].versus-mode .player-pane .duel-hud {
  border-left: 4px solid #4db8ff;
}

body[data-tetris-mode].versus-mode #raiCard .duel-hud {
  border-left: 4px solid #a78bfa;
}

body[data-tetris-mode].versus-mode .ex-pane:nth-of-type(3) .duel-hud {
  border-left: 4px solid #38bdf8;
}

body[data-tetris-mode].versus-mode .ex-pane:nth-of-type(4) .duel-hud {
  border-left: 4px solid #fbbf24;
}

/* 3 Kişilik Modda (rai3) 2x2 Izgaranın 4. Hücresini Dolduran Canlı Radar Kartı */
#nxArena3PCard {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  background: radial-gradient(circle at 80% 15%, rgba(51, 102, 153, 0.28), rgba(7, 13, 25, 0.88) 70%);
  border-top: 1px solid rgba(143, 211, 255, 0.14);
  border-left: 1px solid rgba(143, 211, 255, 0.14);
  color: #e4f0fb;
  overflow: hidden;
}

#nxArena3PCard[hidden] {
  display: none !important;
}

.nx-3p-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  flex: 1;
  align-items: end;
  padding: 10px 6px;
}

.nx-3p-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.nx-3p-track {
  width: 100%;
  max-width: 58px;
  flex: 1;
  min-height: 70px;
  border-radius: 10px;
  background: rgba(11, 23, 42, 0.82);
  border: 1px solid rgba(143, 211, 255, 0.2);
  display: flex;
  align-items: flex-end;
  padding: 4px;
}

.nx-3p-fill {
  width: 100%;
  border-radius: 6px;
  min-height: 6%;
  transition: height 0.25s ease;
}

@media (max-width: 1180px) {
  .nx-mode-seg { display: none; }
}

/* ================= 4) v1.8 KAMERA ÖN AYARLARI, TEHLİKE NABZI, KANONİK RAI KOÇ VE 3B TEKRAR PANELİ ================= */
.nx-cam-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(6, 13, 26, 0.76);
  border: 1px solid rgba(143, 211, 255, 0.22);
}

body[data-tetris-mode] .nx-cam-seg button {
  min-height: 25px !important;
  padding: 3px 7px !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: #96b3d2 !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
}

body[data-tetris-mode] .nx-cam-seg button:hover,
body[data-tetris-mode] .nx-cam-seg button.aktif {
  background: rgba(51, 102, 153, 0.55) !important;
  border-color: rgba(143, 211, 255, 0.55) !important;
  color: #ffffff !important;
}

body[data-tetris-mode] .nx-hint-btn.aktif {
  background: linear-gradient(180deg, rgba(217, 155, 38, 0.46), rgba(146, 92, 18, 0.62)) !important;
  border-color: rgba(255, 215, 106, 0.78) !important;
  color: #fff7d6 !important;
}

/* Kuyu Tehlike Nabzı (14+ Katman) */
.stage-panel.nx-well-danger {
  border-color: rgba(251, 113, 133, 0.78) !important;
  box-shadow: inset 0 0 28px rgba(244, 63, 94, 0.22), 0 0 22px rgba(244, 63, 94, 0.24) !important;
  animation: nxDangerPulse 1.15s ease-in-out infinite;
}

@keyframes nxDangerPulse {
  50% {
    border-color: rgba(255, 150, 165, 0.96);
    box-shadow: inset 0 0 42px rgba(244, 63, 94, 0.34), 0 0 30px rgba(51, 102, 153, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-panel.nx-well-danger { animation: none; }
}

/* Sağ Kokpit Sıkı Yerleşim (Sıfır Kaydırma Çubuğu, 900p ve 1080p Tam Uyum) */
.nx-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}

.nx-preview-grid > .next-card {
  min-width: 0;
  overflow: hidden;
}

body[data-tetris-mode].versus-mode .side .nx-preview-grid {
  display: none !important;
}

body[data-tetris-mode] .side {
  padding: 9px 11px 42px !important;
  gap: 5px !important;
}

body[data-tetris-mode] .side .next-card { padding: 7px 8px 4px !important; border-radius: 9px !important; }
body[data-tetris-mode] .side #nextView,
body[data-tetris-mode] .side #holdView { height: 66px !important; }
body[data-tetris-mode] .side .score-card { padding: 8px 11px !important; border-radius: 10px !important; }
body[data-tetris-mode] .side .score-card > strong { font-size: 25px !important; margin-top: 2px !important; }
body[data-tetris-mode] .side .score-card .record { margin-top: 6px !important; padding-top: 5px !important; }
body[data-tetris-mode] .side #best-name { margin-top: 3px !important; font-size: 9px !important; line-height: 1.25 !important; }
body[data-tetris-mode] .side .metrics > div { padding: 6px 9px !important; border-radius: 9px !important; }
body[data-tetris-mode] .side .metrics strong { font-size: 17px !important; margin-top: 2px !important; }
body[data-tetris-mode] .side .nx-well-meter { padding: 7px 10px !important; border-radius: 9px !important; }
body[data-tetris-mode] .side .nx-tele-box { padding: 6px 8px !important; border-radius: 8px !important; }
body[data-tetris-mode] .side .nx-tele-box strong { font-size: 13.5px !important; }

/* Alt Mod Seçici Şeridi (Klasik / Günlük / Sprint / Ultra / Bulmaca) */
.nx-submode-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: 6px;
  background: rgba(6, 13, 25, 0.72);
  border: 1px solid rgba(143, 211, 255, 0.18);
}

.nx-submode-strip[hidden] { display: none !important; }

body[data-tetris-mode] .nx-submode-strip button {
  padding: 4px 2px !important;
  min-height: 23px !important;
  border-radius: 4px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #8fb0d4 !important;
  font: 700 8.5px/1 "Cascadia Mono", Consolas, monospace !important;
  letter-spacing: 0.03em !important;
  text-align: center;
}

body[data-tetris-mode] .nx-submode-strip button.aktif {
  background: #336699 !important;
  border-color: #8fd3ff !important;
  color: #ffffff !important;
}

.nx-submode-goal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(20, 44, 76, 0.48);
  border: 1px solid rgba(77, 184, 255, 0.28);
  font: 700 10px/1.2 "Cascadia Mono", Consolas, monospace;
  color: #d9eeff;
}

.nx-submode-goal[hidden] { display: none !important; }
.nx-submode-goal b { color: #ffd76a; }

/* Kanonik RAI v2 Canlı Kokpit Spikeri (Büyük Avatar + AG/Ağ Sohbeti Okunaklılığı · #7331) */
.nx-rai-coach {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 9px 11px;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(13, 36, 62, 0.90), rgba(7, 18, 34, 0.92));
  border: 1px solid rgba(124, 200, 255, 0.46);
  border-left: 3px solid #4db8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nx-rai-coach.tehlike {
  border-color: rgba(251, 113, 133, 0.72);
  background: linear-gradient(135deg, rgba(76, 20, 36, 0.78), rgba(14, 18, 34, 0.92));
}

.nx-rai-coach.zafer {
  border-color: rgba(255, 215, 106, 0.72);
}

.nx-rai-avatar-wrap {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid #8fd3ff;
  background: radial-gradient(circle at 50% 35%, #245c99, #071224);
  box-shadow: 0 0 14px rgba(77, 184, 255, 0.44);
  flex-shrink: 0;
}

.nx-rai-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  display: block;
}

.nx-rai-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.nx-rai-head b {
  font: 800 12px/1.1 "Segoe UI Variable Display", "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  color: #7ad4ff;
}

.nx-rai-head span {
  font: 700 9.5px/1 "Segoe UI", Consolas, sans-serif;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(51, 102, 153, 0.52);
  border: 1px solid rgba(143, 211, 255, 0.38);
  color: #e8f6ff;
}

.nx-rai-msg {
  margin: 0;
  font: 500 13px/1.44 "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  color: #f4f9ff;
  -webkit-font-smoothing: antialiased;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Canlı 3B Tekrar Kontrol Şeridi */
.nx-replay-bar {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 65;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(8, 22, 42, 0.92);
  border: 1px solid #4db8ff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  font: 700 11px/1 "Cascadia Mono", Consolas, monospace;
  color: #e6f4ff;
}

.nx-replay-bar[hidden] { display: none !important; }

.nx-replay-bar button {
  padding: 4px 8px !important;
  min-height: 24px !important;
  border-radius: 4px !important;
  font-size: 10px !important;
}

.nx-replay-bar button.aktif {
  background: #336699 !important;
  border-color: #8fd3ff !important;
  color: #fff !important;
}

/* Yarı Saydam Salih Temalı 3B Tekrarlar & ATLAS MP4 Penceresi */
.nx-replay-drawer {
  position: fixed;
  z-index: 80;
  top: 86px;
  right: 26px;
  width: min(460px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(165deg, rgba(11, 27, 49, 0.94), rgba(6, 15, 29, 0.96));
  border: 1px solid #4db8ff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65), 0 0 28px rgba(51, 102, 153, 0.32);
  backdrop-filter: blur(8px);
  color: #e6f3ff;
}

.nx-replay-drawer[hidden] { display: none !important; }

.nx-replay-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(143, 211, 255, 0.22);
}

.nx-replay-top strong {
  font: 800 12px/1.2 "Orbitron", "Segoe UI", sans-serif;
  letter-spacing: 0.1em;
  color: #8fd3ff;
}

.nx-replay-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
  max-height: 310px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nx-replay-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(16, 35, 62, 0.62);
  border: 1px solid rgba(143, 211, 255, 0.2);
}

.nx-replay-item b {
  display: block;
  font: 700 12px/1.25 "Cascadia Mono", Consolas, monospace;
  color: #f0f8ff;
}

.nx-replay-item small {
  display: block;
  font-size: 10.5px;
  color: #93b4d6;
  margin-top: 2px;
}

.nx-replay-acts {
  display: inline-flex;
  gap: 5px;
}

.nx-replay-acts button,
.nx-replay-foot button {
  padding: 5px 9px !important;
  font-size: 10px !important;
  border-radius: 4px !important;
}

.nx-replay-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(143, 211, 255, 0.18);
  font-size: 10.5px;
  color: #96b7d8;
}

/* ================= 5) ANA ADA (MAIN ISLAND) ŞEFFAF CRT PANELLER — KÖŞE BRAKETSİZ (19.11.2026 · Owner #7312) ================= */
/* Üstte #nx-oyun-profil-hud varken oyun içi .game-header ile sıfır üst üste binme */
body[data-tetris-mode]:not([data-tetris-mode="menu"]) .game-shell {
  padding-top: 64px !important;
  gap: 12px !important;
}

@media (min-width: 1024px) {
  body[data-tetris-mode]:not(.versus-mode) .play-layout {
    grid-template-columns: minmax(0, 1fr) clamp(336px, 24vw, 388px) !important;
    gap: 16px !important;
  }
  body[data-tetris-mode].versus-mode .play-layout {
    grid-template-columns: minmax(0, 1fr) clamp(300px, 21vw, 340px) !important;
    gap: 14px !important;
  }
}

/* Oyun Sahnesi, Sol Bilgi/İpucu Paneli ve Sağ Taktik Kokpit: Main Island (.pn) şeffaf CRT cam yüzeyi */
body[data-tetris-mode] .stage-panel {
  border-radius: 6px !important;
  border: 1px solid #5583a5 !important;
  background: rgba(5, 16, 30, 0.16) !important;
}

body[data-tetris-mode] #historyPanel {
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(143, 211, 255, 0.075) 3px 4px),
    linear-gradient(155deg, rgba(7, 27, 43, 0.50), rgba(10, 40, 65, 0.40)) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  border-right-color: #5583a5 !important;
}

body[data-tetris-mode] #historyPanel .hint-card {
  border-radius: 4px !important;
  border: 1px solid rgba(143, 211, 255, 0.32) !important;
  background: rgba(7, 27, 43, 0.36) !important;
  box-shadow: none !important;
}

body[data-tetris-mode] #historyPanel .hk {
  border-radius: 3px !important;
  border: 1px solid rgba(143, 211, 255, 0.24) !important;
  background: rgba(7, 24, 42, 0.38) !important;
}

/* Sağ Taktik Kokpit (.side): Main Island şeffaf CRT paneli — köşe L-braket çizgileri tamamen kaldırıldı */
body[data-tetris-mode] .side {
  position: relative !important;
  isolation: isolate;
  padding: 12px 14px 44px !important;
  gap: 7px !important;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(143, 211, 255, 0.08) 3px 4px),
    linear-gradient(155deg, rgba(7, 27, 43, 0.54), rgba(10, 40, 65, 0.42)) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  border: 1px solid #5583a5 !important;
  border-radius: 5px !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(190, 240, 255, 0.14) !important;
  text-shadow: 0 1px 2px #05111b;
  overflow: hidden !important;
}

body[data-tetris-mode] .side::before,
body[data-tetris-mode] .side::after {
  display: none !important;
  content: none !important;
}

body[data-tetris-mode] .side > * {
  position: relative;
  z-index: 1;
}

/* Sağ Kokpit İç Kartları: Main Island şeffaf katmanlar */
body[data-tetris-mode] .side .nx-side-banner {
  padding: 6px 10px !important;
  border-radius: 3px !important;
  background: rgba(51, 102, 153, 0.28) !important;
  border: 1px solid rgba(143, 211, 255, 0.34) !important;
  box-shadow: none !important;
}

body[data-tetris-mode] .side .nx-side-banner span {
  border-radius: 3px !important;
  background: rgba(7, 24, 42, 0.52) !important;
  border-color: rgba(143, 211, 255, 0.32) !important;
}

body[data-tetris-mode] .side .nx-submode-strip {
  gap: 4px !important;
  padding: 4px !important;
  border-radius: 3px !important;
  background: rgba(7, 24, 42, 0.36) !important;
  border: 1px solid rgba(143, 211, 255, 0.26) !important;
}

body[data-tetris-mode] .side .nx-submode-strip button {
  border-radius: 3px !important;
  font-size: 9px !important;
  min-height: 25px !important;
}

body[data-tetris-mode] .side .nx-submode-strip button.aktif {
  background: rgba(51, 102, 153, 0.65) !important;
  border-color: #8fd3ff !important;
  box-shadow: inset 3px 0 0 #4db8ff !important;
}

body[data-tetris-mode] .side .nx-submode-goal {
  border-radius: 3px !important;
  padding: 6px 10px !important;
  background: rgba(10, 34, 58, 0.34) !important;
  border: 1px solid rgba(143, 211, 255, 0.28) !important;
}

body[data-tetris-mode] .side .nx-preview-grid {
  gap: 8px !important;
}

body[data-tetris-mode] .side .next-card {
  padding: 8px 10px 5px !important;
  border-radius: 4px !important;
  background: rgba(7, 24, 42, 0.36) !important;
  border: 1px solid rgba(143, 211, 255, 0.28) !important;
  box-shadow: none !important;
}

body[data-tetris-mode] .side #nextView,
body[data-tetris-mode] .side #holdView {
  height: 70px !important;
}

body[data-tetris-mode] .side .score-card {
  padding: 10px 13px !important;
  border-radius: 4px !important;
  background: rgba(12, 36, 62, 0.36) !important;
  border: 1px solid rgba(143, 211, 255, 0.34) !important;
  box-shadow: none !important;
}

body[data-tetris-mode] .side .score-card > strong {
  font-size: 28px !important;
  text-shadow: 0 0 14px rgba(77, 184, 255, 0.45) !important;
}

body[data-tetris-mode] .side .metrics > div {
  padding: 8px 11px !important;
  border-radius: 4px !important;
  background: rgba(7, 24, 42, 0.34) !important;
  border: 1px solid rgba(143, 211, 255, 0.28) !important;
  box-shadow: none !important;
}

body[data-tetris-mode] .side .nx-well-meter {
  padding: 8px 11px !important;
  border-radius: 4px !important;
  background: rgba(7, 24, 42, 0.34) !important;
  border: 1px solid rgba(143, 211, 255, 0.28) !important;
}

body[data-tetris-mode] .side .nx-pro-tele {
  gap: 8px !important;
}

body[data-tetris-mode] .side .nx-tele-box {
  padding: 7px 10px !important;
  border-radius: 4px !important;
  background: rgba(7, 24, 42, 0.34) !important;
  border: 1px solid rgba(143, 211, 255, 0.26) !important;
  box-shadow: none !important;
}

body[data-tetris-mode] .side .nx-arena-board {
  border-radius: 4px !important;
  background: rgba(7, 24, 42, 0.36) !important;
  border: 1px solid rgba(143, 211, 255, 0.32) !important;
}

body[data-tetris-mode] .side .nx-seat-row {
  border-radius: 3px !important;
  background: rgba(5, 16, 30, 0.42) !important;
}

body[data-tetris-mode] .side .nx-rai-coach {
  padding: 8px 10px !important;
  border-radius: 4px !important;
  background: rgba(12, 34, 58, 0.36) !important;
  border: 1px solid rgba(143, 211, 255, 0.32) !important;
  box-shadow: none !important;
}

body[data-tetris-mode] .side .nx-rai-avatar-wrap {
  border-radius: 4px !important;
  border-color: rgba(143, 211, 255, 0.65) !important;
}

/* Üst Komuta Şeridi (.game-header) ve Çekmeceler: Main Island şeffaf CRT dili */
body[data-tetris-mode] .game-header,
body[data-tetris-mode] .help-drawer,
.nx-replay-drawer {
  border-radius: 5px !important;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(143, 211, 255, 0.08) 3px 4px),
    linear-gradient(155deg, rgba(7, 27, 43, 0.56), rgba(10, 40, 65, 0.44)) !important;
  border: 1px solid #5583a5 !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}

