/* ==========================================================================
   VAMPİR KÖYLÜ — MOBİL ÖNCELİKLİ DİNAMİK TEMA STİLLERİ (SAF CSS3)
   ========================================================================== */

:root {
  /* Varsayılan (Lobi) Tema Değişkenleri */
  --bg-main: #12131a;
  --bg-card: #1b1d28;
  --bg-card-alt: #242736;
  --bg-input: #14161f;
  --text-primary: #f1f3f9;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: #2e3244;
  --accent-primary: #e11d48;
  --accent-primary-hover: #be123c;
  --accent-secondary: #4f46e5;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* GECE FAZI TEMASI:
   Karanlık odada yüze ışık yansıtıp rolü belli etmemesi için
   #0a0a0c tam karanlık arka plan ve düşük parlaklıklı koyu kırmızı/gri vurgular */
body.theme-night {
  --bg-main: #0a0a0c;
  --bg-card: #101014;
  --bg-card-alt: #16161c;
  --bg-input: #0d0d11;
  --text-primary: #a8a8b3;
  --text-secondary: #757582;
  --text-muted: #52525e;
  --border-color: #221a1e;
  --accent-primary: #6b1d27;
  --accent-primary-hover: #7f222e;
  --accent-secondary: #2b2b36;
  --accent-success: #1f4d3a;
  --accent-warning: #5c4318;
  --accent-danger: #6b1d27;
  --shadow-card: none;
}

/* GÜNDÜZ FAZI TEMASI:
   Aydınlık tema (#f4f6f8 arka plan, koyu metinler, yüksek kontrast) */
body.theme-day {
  --bg-main: #f4f6f8;
  --bg-card: #ffffff;
  --bg-card-alt: #edf1f5;
  --bg-input: #ffffff;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --border-color: #d1d5db;
  --accent-primary: #d97706;
  --accent-primary-hover: #b45309;
  --accent-secondary: #2563eb;
  --accent-success: #059669;
  --accent-warning: #d97706;
  --accent-danger: #dc2626;
  --shadow-card: 0 4px 14px rgba(17, 24, 39, 0.08);
}

/* AVCI SON NEFES TEMASI */
body.theme-hunter {
  --bg-main: #180c0e;
  --bg-card: #241215;
  --bg-card-alt: #30171b;
  --bg-input: #180c0e;
  --text-primary: #f5d0d6;
  --text-secondary: #cda3aa;
  --text-muted: #996b73;
  --border-color: #54232b;
  --accent-primary: #b91c1c;
  --accent-primary-hover: #991b1b;
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input, textarea {
  user-select: text;
}

html, body {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  transition: background-color 0.35s ease, color 0.35s ease;
}

body {
  display: flex;
  flex-direction: column;
  max-width: 540px;
  margin: 0 auto;
}

/* ÜST ÇUBUK */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  min-height: 48px;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.room-pill {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.room-pill strong {
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
}

.conn-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--text-muted);
  display: inline-block;
}

.conn-dot.online {
  background-color: var(--accent-success);
}

.conn-dot.connecting {
  background-color: var(--accent-warning);
  animation: pulse 1.2s infinite;
}

.conn-dot.error {
  background-color: var(--accent-danger);
}

.icon-btn {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
}

.icon-btn:active {
  transform: scale(0.95);
}

/* ANA ALAN VE EKRANLAR */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  overflow: hidden;
  min-height: 0;
}

.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
}

.screen.active {
  display: flex;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-card);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.hidden {
  display: none !important;
}

/* 1. GİRİŞ EKRANI */
.hero-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 16px;
}

.hero-icon {
  font-size: 2.2rem;
  text-align: center;
}

.hero-title {
  text-align: center;
  font-size: 1.55rem;
  font-weight: 800;
}

.hero-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: -6px;
}

.reconnect-banner {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--accent-success);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reconnect-info {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
}

.reconnect-actions {
  display: flex;
  gap: 6px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.text-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
}

.text-input:focus {
  border-color: var(--accent-primary);
}

.code-input {
  text-align: center;
  letter-spacing: 0.2em;
  font-family: monospace;
  font-size: 1.2rem;
}

.home-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-box h2 {
  font-size: 0.95rem;
  font-weight: 700;
}

.action-box p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.join-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.divider-text {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* BUTONLAR */
.btn {
  height: 46px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.1s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}

body.theme-night .btn-primary {
  color: #d4d4dc;
  border-color: #8c2734;
}

.btn-secondary {
  background: var(--accent-secondary);
  color: #ffffff;
}

body.theme-night .btn-secondary {
  color: #c4c4d0;
  border-color: #3d3d4d;
}

.btn-ghost {
  background: var(--bg-card-alt);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  height: 34px;
  padding: 0 10px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-xs {
  height: 26px;
  padding: 0 8px;
  font-size: 0.74rem;
  border-radius: 6px;
}

/* 2. LOBİ EKRANI */
.lobby-layout {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.lobby-top-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  flex-shrink: 0;
}

.room-code-banner {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.room-code-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

.room-code-value {
  font-family: monospace;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.players-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.section-header-row h2 {
  font-size: 0.88rem;
  font-weight: 800;
}

.min-players-hint {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.player-chips-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 82px;
  overflow-y: auto;
}

.player-chip {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.player-chip.is-me {
  border-color: var(--accent-primary);
}

.player-chip.offline {
  opacity: 0.5;
}

/* AYARLAR PANELİ */
.lobby-settings-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
  padding: 10px 12px;
  min-height: 0;
  overflow-y: auto;
}

.badge {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.setting-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-input);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  gap: 3px;
}

.seg-btn {
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--bg-card-alt);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.seg-btn:disabled {
  cursor: default;
}

.role-summary-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.manual-roles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.role-counter-row {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.role-counter-info {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.role-counter-info strong {
  font-size: 0.76rem;
  display: block;
}

.role-counter-info small {
  display: none;
}

.role-emoji {
  font-size: 1rem;
}

.counter-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cnt-btn {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

.cnt-val {
  min-width: 16px;
  text-align: center;
  font-weight: 800;
  font-size: 0.82rem;
}

.manual-total-bar {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.75rem;
  padding: 4px;
  border-radius: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
}

.manual-total-bar.valid {
  border-color: var(--accent-success);
  color: var(--accent-success);
}

.manual-total-bar.invalid {
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}

.two-col-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sub-setting {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sub-setting label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.stepper-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  height: 32px;
}

.step-btn {
  width: 26px;
  height: 24px;
  border-radius: 5px;
  border: none;
  background: var(--bg-card-alt);
  color: var(--text-primary);
  font-weight: 800;
  cursor: pointer;
}

.stepper-input span {
  font-size: 0.8rem;
  font-weight: 700;
}

.lobby-footer-action {
  margin-top: 2px;
}

.client-wait-msg {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 8px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
}

/* 3. AKTİF OYUN EKRANI */
.game-status-bar {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.phase-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.phase-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phase-icon {
  font-size: 1.45rem;
}

.phase-title-group h2 {
  font-size: 1.05rem;
  font-weight: 800;
}

.phase-title-group p {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.timer-pill {
  background: var(--bg-card-alt);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 4px 10px;
  min-width: 64px;
  text-align: center;
  font-weight: 900;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.timer-pill small {
  font-size: 0.7rem;
  margin-left: 2px;
  color: var(--text-secondary);
}

.timer-progress-track {
  width: 100%;
  height: 5px;
  background: var(--bg-card-alt);
  border-radius: 999px;
  overflow: hidden;
}

.timer-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--accent-primary);
  transition: width 0.35s linear;
}

.my-role-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.my-status-chip {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
}

.role-peek-btn {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  cursor: pointer;
}

/* OYUN SAHNESİ (STAGE) */
.game-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.stage-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.stage-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.stage-header h3 {
  font-size: 0.96rem;
  font-weight: 800;
}

.stage-header p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* BİLGİ KUTULARI (Sabah Raporu / Vampir Ortak Bilgi / Gözcü Sonucu) */
.info-alert {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.info-alert strong {
  color: var(--text-primary);
}

/* OYUNCU SEÇİM KARTLARI (GECE & GÜNDÜZ OYLAMA) */
.targets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  overflow-y: auto;
  align-content: start;
  flex: 1;
  min-height: 0;
  padding: 2px 1px;
}

.target-btn {
  background: var(--bg-card-alt);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 9px 10px;
  min-height: 54px;
  color: var(--text-primary);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.target-btn.full-width {
  grid-column: 1 / -1;
}

.target-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.target-btn.selected {
  border-color: var(--accent-primary);
  background: rgba(225, 29, 72, 0.12);
}

body.theme-night .target-btn.selected {
  border-color: #8c2734;
  background: #1b1215;
}

body.theme-day .target-btn.selected {
  border-color: var(--accent-primary);
  background: #fef3c7;
}

.target-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.target-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
}

.target-name {
  font-weight: 800;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.target-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.target-role-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.target-subtext {
  font-size: 0.71rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

/* GECE TOPLAMA İŞLEMİ (ANTI-METAGAME MİNİ OYUN) */
.math-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  flex: 1;
}

.math-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.math-question {
  text-align: center;
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 8px 0;
  font-variant-numeric: tabular-nums;
}

.math-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.math-opt-btn {
  height: 54px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

.math-opt-btn:active {
  transform: scale(0.97);
  border-color: var(--accent-primary);
}

/* ROL AÇIKLAMA / OYUN SONU KARTI */
.role-reveal-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 16px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.role-reveal-emoji {
  font-size: 3rem;
}

.role-reveal-name {
  font-size: 1.4rem;
  font-weight: 900;
}

.role-reveal-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  max-width: 340px;
}

/* OYUN SONU LİSTESİ */
.gameover-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.gameover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

/* TOAST BİLDİRİMLERİ */
.toast-container {
  position: fixed;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: calc(100% - 24px);
  max-width: 420px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1.5px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  text-align: center;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* OYUNCU YÖNETİMİ (LOBİ ÇİP AKSİYONLARI, MODAL VE BAĞLANTI UYARISI) */
.player-chip {
  padding: 4px 8px;
  gap: 6px;
}

.player-chip-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.chip-action-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 999px;
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chip-action-btn:hover {
  border-color: var(--accent-secondary);
}

.chip-action-btn.danger:hover {
  border-color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.16);
}

.conn-alert-bar {
  background: var(--bg-card);
  border-bottom: 1.5px solid var(--accent-warning);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  z-index: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 800;
}

.manage-player-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
}

.manage-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.manage-player-row.offline {
  opacity: 0.6;
}

.manage-player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.manage-player-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-player-meta {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.manage-player-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.manage-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.manage-btn.danger {
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}
