/* =====================================================
   BEYBLADE ARENA — GLOBAL STYLES
   ===================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ── Pakvix Marka Renkleri ── */
  --accent:       #e94560;
  --accent-deep:  #c2185b;
  --accent-glow:  rgba(233, 69, 96, 0.25);
  --navy:         #0f3460;
  --navy-light:   #16213e;
  --bg-primary:   #04040e;
  --panel-bg:     #0c0c1e;

  /* ── Neon Palette (Pakvix'e çekildi) ── */
  --neon-blue:    #e94560;   /* ana aksan */
  --neon-purple:  #c2185b;   /* ikincil aksan */
  --neon-pink:    #e94560;
  --neon-orange:  #ff6b2b;
  --neon-green:   #22d3a7;   /* can barları */
  --neon-gold:    #fbbf24;   /* jeton/kost */
  --neon-cyan:    #38bdf8;   /* kalkan */

  /* ── Metin ── */
  --text-primary:   #f0f0ff;
  --text-secondary: #7070a0;

  /* ── Cam / Kenarlık ── */
  --glass-bg:     rgba(233, 69, 96, 0.04);
  --glass-border: rgba(233, 69, 96, 0.12);

  /* ── Gölge / Işıma ── */
  --shadow-glow:  0 0 40px rgba(233, 69, 96, 0.15), 0 4px 24px rgba(0,0,0,0.6);

  /* ── Fontlar ── */
  --font-display: 'Rajdhani', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-sans:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* ── Yarıçaplar ── */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-md:  10px;
  --radius-lg:  16px;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
}

.hidden {
  display: none !important;
}

/* =====================================================
   CANVAS
   ===================================================== */
#arena-canvas {
  /* position: absolute; */
  inset: 0;
  width: 100%;
  height: 100%;
}

/* =====================================================
   BATTLE MSG
   ===================================================== */
.battle-msg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #e94560, #ff6b9d, #c2185b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  filter: drop-shadow(0 0 30px rgba(233, 69, 96, 0.6));
  animation: msgPop 0.4s ease-out;
  pointer-events: none;
}

.battle-msg.hidden {
  display: none;
}

@keyframes msgPop {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
  }

  60% {
    transform: translate(-50%, -50%) scale(1.1);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* =====================================================
   BEY COUNT HUD — Sol Üst
   ===================================================== */
.bey-count-hud {
  position: absolute;
  bottom: 50px;
  right: 14px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 7px 14px;
  backdrop-filter: blur(12px);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.bey-count-icon {
  font-size: 1.1rem;
}

/* =====================================================
   FPS COUNTER — Sol Alt
   ===================================================== */
.fps-counter {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 15;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 5px 12px;
  backdrop-filter: blur(12px);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--neon-gold);
}

/* =====================================================
   HEALTH PANEL — Sol Kenar
   ===================================================== */
.health-panel {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 15;
  width: 220px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: rgba(12, 12, 30, 0.75);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: all 0.3s ease;
}

.health-panel-header {
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
}

.health-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.health-list::-webkit-scrollbar {
  width: 4px;
}

.health-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.health-item {
  display: flex;
  flex-direction: column;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.2s;
}

.health-item:last-child {
  border-bottom: none;
}

.health-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.health-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.health-name {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.health-val {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
}

.health-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.health-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

/* Hide Spinners for Number Inputs */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* =====================================================
   SAĞ KAYAR BİLDİRİM LOGU (Notification Log)
   ===================================================== */
.notification-log {
  position: absolute;
  top: 14px;
  right: 20px;
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
  pointer-events: none;
}

.notif-item {
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(8px);
  border-left: 3px solid var(--neon-blue);
  padding: 8px 12px;
  border-radius: 4px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transition: opacity 0.5s, transform 0.5s;
}

.notif-item.fade-out {
  opacity: 0;
  transform: translateX(100%);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =====================================================
   TAB HINT — Üst Orta
   ===================================================== */
.tab-hint {
  position: absolute;
  bottom: 14px;
  right: 15px;
  z-index: 15;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 6px 14px;
  backdrop-filter: blur(12px);
  opacity: 0.6;
  transition: opacity 0.3s;
}

.tab-hint:hover {
  opacity: 1;
}

/* =====================================================
   TOP RIGHT CONTROLS (Settings & Volume)
   ===================================================== */
.top-right-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 16;
  display: flex;
  gap: 10px;
}

.volume-control-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0 12px;
  height: 40px;
}

#volume-icon {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
}

.volume-slider::-moz-range-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(255, 255, 255);
  cursor: pointer;
  box-shadow: 0 0 5px rgb(255, 255, 255);
  transition: transform 0.1s;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.3);
}

.btn-icon-control {
  width: 40px;
  height: 40px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-icon-control:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transform: scale(1.1);
}

/* =====================================================
   SETTINGS PANEL — Sağ Üst Dropdown
   ===================================================== */
.settings-panel {
  position: absolute;
  top: 62px;
  right: 14px;
  z-index: 17;
  width: 280px;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(12, 12, 30, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  backdrop-filter: blur(16px);
  transition: all 0.3s ease;
  transform-origin: top right;
}

.settings-panel::-webkit-scrollbar {
  width: 6px;
}

.settings-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.settings-panel::-webkit-scrollbar-thumb {
  background: var(--neon-purple);
  border-radius: 4px;
}

.settings-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}

.btn-save-settings {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-save-settings:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
  transform: translateY(-1px);
}

.btn-save-settings.hidden {
  display: none !important;
}

.btn-close-panel {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-close-panel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Setting rows */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  bottom: 3px;
  left: 3px;
  transition: all 0.3s ease;
}

.toggle-switch input:checked+.toggle-slider {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.25);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(18px);
}

/* Sub-settings */
.sub-settings {
  padding: 4px 0 4px 10px;
  border-left: 2px solid rgba(0, 212, 255, 0.12);
  margin-left: 6px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
  max-height: 120px;
}

.sub-settings.collapsed {
  max-height: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
}

.sub-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Neon input */
.neon-input {
  background: rgba(233, 69, 96, 0.04);
  border: 1px solid rgba(233, 69, 96, 0.14);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.neon-input:focus {
  border-color: rgba(233, 69, 96, 0.5);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.08);
}

.neon-input.small {
  width: 70px;
  flex: none;
  text-align: center;
  padding: 6px 8px;
  font-size: 0.8rem;
}

/* =====================================================
   CONNECT PANEL — Sağ Alt
   ===================================================== */
.connect-panel {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 15;
  background: rgba(12, 12, 30, 0.88);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  backdrop-filter: blur(14px);
  min-width: 280px;
}

.connect-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.at-symbol {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--neon-pink);
  font-weight: 700;
}

.connect-row .neon-input {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.btn-connect {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-orange));
  color: #fff;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-connect:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 14px rgba(244, 63, 142, 0.35);
}

.btn-connect.connected {
  background: linear-gradient(135deg, var(--neon-green), #16a085);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 5px #ef4444;
}

.status-dot.online {
  background: var(--neon-green);
  box-shadow: 0 0 5px var(--neon-green);
  animation: dotPulse 2s infinite;
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* =====================================================
   K/D OVERLAY — Tab ile açılır
   ===================================================== */
.kd-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 20, 0.82);
  backdrop-filter: blur(6px);
  transition: opacity 0.25s ease;
}

.kd-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.kd-panel {
  width: 440px;
  max-width: 92vw;
  max-height: 70vh;
  background: rgba(14, 14, 34, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.kd-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--glass-border);
}

.kd-header h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.kd-table-header {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.kd-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.kd-list::-webkit-scrollbar {
  width: 3px;
}

.kd-list::-webkit-scrollbar-thumb {
  background: var(--neon-gold);
  border-radius: 4px;
}

/* Arena Temaları */
.theme-selector::-webkit-scrollbar {
  height: 6px;
}

.theme-selector::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.theme-selector::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 4px;
}

.theme-card {
  min-width: 80px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 5px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.theme-card.active {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.1);
}

.theme-thumb {
  width: 100%;
  height: 40px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.theme-card span {
  font-size: 0.65rem;
  color: #fff;
}

/* Seçili Hediyeler + Jeton Kuralları Listeleri */
#selected-gifts-list,
#token-rules-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
  overflow: visible;
}

#selected-gifts-list:empty,
#token-rules-list:empty {
  display: none;
}

/* Jeton kural kartlarını renkli kenarlıkla ayırt et */
#token-rules-list .selected-gift-item {
  border-color: rgba(0, 212, 255, 0.35);
  background: rgba(0, 212, 255, 0.04);
}

#token-rules-list .selected-gift-item .selected-gift-header {
  border-bottom-color: rgba(0, 212, 255, 0.15);
}

.kd-row {
  display: flex;
  align-items: center;
  padding: 8px 20px;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.kd-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.kd-row.top-1 {
  background: rgba(255, 187, 36, 0.06);
}

.kd-row.top-2 {
  background: rgba(192, 192, 192, 0.04);
}

.kd-row.top-3 {
  background: rgba(205, 127, 50, 0.04);
}

.kd-col-rank {
  width: 36px;
  font-weight: 700;
  color: var(--text-secondary);
}

.kd-col-name {
  flex: 1;
  font-weight: 600;
}

.kd-col-kills {
  width: 70px;
  text-align: center;
  color: var(--neon-green);
  font-weight: 600;
}

.kd-col-deaths {
  width: 70px;
  text-align: center;
  color: var(--neon-pink);
  font-weight: 600;
}

.kd-col-kd {
  width: 60px;
  text-align: center;
  font-weight: 700;
  color: var(--neon-gold);
}

.kd-rank-medal {
  font-size: 1rem;
}

.kd-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* =====================================================
   ELEME ANİMASYONU (ELIMINATION OVERLAY)
   ===================================================== */
.elimination-modal {
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 1000;
  background: transparent;
  backdrop-filter: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.elimination-modal.active {
  opacity: 1;
}

.elimination-content {
  display: flex;
  align-items: center;
  gap: 20px;
  transform: scale(0.5) translateY(50px);
  opacity: 0;
  background: rgba(0, 0, 0, 0.6);
  padding: 15px 40px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.elimination-modal.active .elimination-content {
  animation: elimPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes elimPopIn {
  to {
    transform: scale(0.6) translateY(0);
    opacity: 1;
  }
}

.elim-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.elim-avatar-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 5px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.elim-avatar-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: filter 0.3s;
}

/* Kazanan (Winner) */
.elim-winner .elim-avatar-wrapper {
  background: linear-gradient(135deg, var(--neon-gold), #ff8c00);
  box-shadow: 0 0 40px rgba(255, 187, 36, 0.4);
}

.elim-crown {
  position: absolute;
  top: -35px;
  font-size: 3rem;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
  opacity: 0;
  transform: translateY(-20px);
}

.elimination-modal.active .elim-crown {
  animation: dropCrown 0.6s 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes dropCrown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.winner-text {
  color: var(--neon-gold);
}

/* Kaybeden (Loser) */
.elim-loser .elim-avatar-wrapper {
  background: #333;
  box-shadow: 0 0 30px rgba(255, 59, 48, 0.2);
}

.elimination-modal.active .elim-loser img {
  filter: grayscale(100%) brightness(0.7);
  transition-delay: 0.2s;
}

.elim-stamp {
  position: absolute;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--neon-pink);
  border: 4px solid var(--neon-pink);
  padding: 5px 15px;
  border-radius: 8px;
  transform: rotate(-15deg) scale(3);
  opacity: 0;
  text-shadow: 0 0 10px rgba(255, 59, 48, 0.8);
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.4) inset;
}

.elimination-modal.active .elim-stamp {
  animation: stampSmash 0.3s 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes stampSmash {
  50% {
    transform: rotate(-15deg) scale(0.8);
    opacity: 1;
  }

  100% {
    transform: rotate(-15deg) scale(1.2);
    opacity: 1;
  }
}

.loser-text {
  color: #888;
  text-decoration: line-through;
}

.elim-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.fps-counter {
  position: absolute;
  bottom: 100px;
  left: 20px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: rgb(255, 255, 255);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-reset-cam {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.3);
  color: #0df;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-reset-cam:hover {
  background: rgba(0, 255, 255, 0.25);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
  transform: scale(1.05);
}

.elim-vs {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 15px var(--neon-blue);
  font-style: italic;
  padding: 0 20px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 500px) {
  .battle-msg {
    font-size: 2rem;
  }

  .connect-panel {
    min-width: auto;
    left: 14px;
  }

  .settings-panel {
    width: 240px;
    max-height: 80vh;
  }

  .kd-panel {
    width: 96vw;
  }
}

/* =====================================================
   HEDİYE SEÇİM POPUP (İki Seçenek)
   ===================================================== */
.gift-choice-popup {
  position: absolute;
  background: rgba(12, 12, 32, 0.97);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 10px;
  padding: 6px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 200px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 212, 255, 0.1);
  animation: popupFadeIn 0.15s ease;
}

.gift-choice-popup.hidden {
  display: none;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gift-choice-option {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 9px 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  white-space: nowrap;
}

.gift-choice-option:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.4);
  color: #00d4ff;
}

/* Token sistemi aktif göstergesi */
.token-active-badge {
  display: inline-block;
  background: linear-gradient(135deg, #00d4ff, #a855f7);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}

/* =====================================================
   HEDİYE SİSTEMİ EKRANI (GIFTS) — Pakvix Redesign
   ===================================================== */
.gift-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 14, 0.88);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(12px);
}

.gift-modal.hidden {
  display: none;
}

.gift-modal-content {
  background: #080818;
  border: 1px solid rgba(233, 69, 96, 0.2);
  border-radius: var(--radius-lg);
  width: 92%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(233, 69, 96, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(233, 69, 96, 0.08);
  overflow: hidden;
}

/* Üst kenar aksan çizgisi */
.gift-modal-content::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e94560, #c2185b, #0f3460, transparent);
  flex-shrink: 0;
}

.gift-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(233, 69, 96, 0.1);
  background: rgba(233, 69, 96, 0.03);
}

.gift-modal-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #e94560, #ff8fab);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Filtre Alanı ── */
.gift-modal-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(233, 69, 96, 0.08);
}

.gift-modal-controls-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.gift-modal-controls-row .neon-input {
  flex: 1;
}

.gift-range-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  background: rgba(233, 69, 96, 0.04);
  border: 1px solid rgba(233, 69, 96, 0.1);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
}

.gift-range-row label {
  white-space: nowrap;
  flex-shrink: 0;
  color: rgba(233, 69, 96, 0.7);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gift-range-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: rgba(233, 69, 96, 0.15);
  border-radius: 2px;
  outline: none;
}

.gift-range-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e94560;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(233, 69, 96, 0.7);
  transition: transform 0.15s;
}

.gift-range-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.gift-range-val {
  color: #e94560;
  font-weight: 700;
  min-width: 46px;
  text-align: right;
}

/* ── Select / Input ortak ── */
.neon-input {
  background: rgba(233, 69, 96, 0.04);
  border: 1px solid rgba(233, 69, 96, 0.15);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.neon-input:focus {
  border-color: rgba(233, 69, 96, 0.5);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.08);
}

.neon-select {
  background: rgba(233, 69, 96, 0.04);
  border: 1px solid rgba(233, 69, 96, 0.15);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.neon-select:focus {
  border-color: rgba(233, 69, 96, 0.5);
}

/* ── Kapat Butonu ── */
.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(233, 69, 96, 0.07);
  border: 1px solid rgba(233, 69, 96, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.15s;
}

.close-btn:hover {
  background: rgba(233, 69, 96, 0.15);
  color: #e94560;
  border-color: rgba(233, 69, 96, 0.4);
}

/* ── Yükleme / Hata ── */
.gift-loading,
.gift-error {
  padding: 30px;
  text-align: center;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.gift-error {
  color: #e94560;
}

/* ── Kart Izgarası ── */
.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
  padding: 18px 22px;
  overflow-y: auto;
  min-height: 220px;
}

.gift-grid::-webkit-scrollbar { width: 5px; }
.gift-grid::-webkit-scrollbar-track { background: transparent; }
.gift-grid::-webkit-scrollbar-thumb {
  background: rgba(233, 69, 96, 0.3);
  border-radius: 4px;
}
.gift-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(233, 69, 96, 0.55);
}

/* ── Hediye Kartı ── */
.gift-card {
  background: linear-gradient(160deg, #0c0c22 0%, #0a0a1c 100%);
  border: 1px solid rgba(233, 69, 96, 0.12);
  border-radius: 12px;
  padding: 14px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: clip;
  min-height: 190px;
  gap: 8px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* Shimmer sweep */
.gift-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 30%,
    rgba(233, 69, 96, 0.06) 50%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.gift-card:hover {
  border-color: rgba(233, 69, 96, 0.45);
  box-shadow: 0 0 0 1px rgba(233, 69, 96, 0.15), 0 8px 28px rgba(233, 69, 96, 0.15);
  transform: translateY(-4px);
}

.gift-card:hover::before {
  opacity: 1;
}

/* Resim */
.gift-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  transition: transform 0.2s, filter 0.2s;
  flex-shrink: 0;
}

.gift-card:hover img {
  transform: scale(1.12) translateY(-2px);
  filter: drop-shadow(0 6px 16px rgba(233, 69, 96, 0.3));
}

/* İsim */
.gift-card .g-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e0e0f5;
  word-break: break-word;
  line-height: 1.35;
  flex: 1;
  letter-spacing: 0.01em;
}

/* Jeton Rozeti */
.gift-card .g-cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

/* Seç Butonu */
.card-select-btn {
  width: 100%;
  padding: 7px 8px;
  font-size: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #e94560 0%, #c2185b 100%);
  color: #fff;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(233, 69, 96, 0.25);
  transition: box-shadow 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.card-select-btn:hover {
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.5);
  transform: translateY(-1px);
}

.card-select-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 6px rgba(233, 69, 96, 0.3);
}

/* Seçilen Hediyeler Listesi Yeni Layout */
.selected-gift-item {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  margin-bottom: 10px;
  gap: 10px;
}

.selected-gift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.selected-gift-info {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.selected-gift-info img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.selected-gift-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gift-name {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
}

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

.btn-micro {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  color: white;
}

.btn-micro.add {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.btn-micro.add:hover {
  background: rgba(0, 255, 136, 0.3);
}

.btn-micro.remove {
  background: rgba(255, 50, 50, 0.15);
  border: 1px solid rgba(255, 50, 50, 0.3);
}

.btn-micro.remove:hover {
  background: rgba(255, 50, 50, 0.3);
}

.selected-gift-actions-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.selected-gift-action-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  border-radius: 6px;
}

.neon-select.minimal,
.neon-input.minimal {
  font-size: 0.75rem;
  padding: 4px;
  height: 28px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: white;
}

.neon-select.minimal {
  flex: 1;
}

.neon-input.minimal {
  width: 50px;
  text-align: center;
}

.btn-remove-action {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-remove-action:hover {
  background: rgba(255, 50, 50, 0.2);
  color: #ff4444;
}

.remove-gift-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
}

.remove-gift-btn:hover {
  color: #dc2626;
}

/* Özel Hediye Seçim Butonu Tasarımı */
.gift-fetch-btn {
  background: linear-gradient(45deg, #a855f7, #f43f8e);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(244, 63, 142, 0.4);
}

.gift-fetch-btn:hover {
  background: linear-gradient(45deg, #c084fc, #fb7185);
  box-shadow: 0 0 20px rgba(244, 63, 142, 0.8);
  transform: translateY(-2px);
}

.gift-fetch-btn:active {
  transform: translateY(1px);
}

/* =====================================================
   HÜKÜMDARLIK (LORDSHIP) SİSTEMİ
   ===================================================== */
.lordship-panel {
  position: fixed;
  top: 60px;
  left: 250px;
  /* health-panel'in (14px + 220px + 16px gap) sağına */
  width: 220px;
  background: rgba(12, 12, 30, 0.88);
  border: 1px solid var(--neon-gold);
  border-radius: var(--radius-md);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.25);
  display: flex;
  flex-direction: column;
  z-index: 100;
  backdrop-filter: blur(10px);
  overflow: hidden;
  max-height: 80vh;
  user-select: none;
}

.lordship-panel.hidden {
  display: none !important;
}

.lordship-header {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.05));
  padding: 10px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--neon-gold);
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  text-shadow: 0 0 5px rgba(251, 191, 36, 0.5);
  letter-spacing: 1px;
}

.lordship-list {
  display: flex;
  flex-direction: column;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
  gap: 6px;
}

.lordship-list::-webkit-scrollbar {
  width: 4px;
}

.lordship-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.lordship-list::-webkit-scrollbar-thumb {
  background: var(--neon-gold);
  border-radius: 4px;
}

.lordship-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-sm);
  padding: 5px 6px;
  gap: 7px;
  transition: all 0.2s;
}

.lord-gold {
  background: rgba(212, 175, 55, 0.12);
  border-color: #d4af37;
}

.lord-silver {
  background: rgba(192, 192, 192, 0.10);
  border-color: #c0c0c0;
}

.lord-bronze {
  background: rgba(205, 127, 50, 0.10);
  border-color: #cd7f32;
}

.lord-rank-badge {
  font-size: 1.0rem;
  flex-shrink: 0;
  min-width: 22px;
  text-align: center;
}

.lord-wins {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-gold);
  flex-shrink: 0;
}

.lordship-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
  border-color: var(--neon-gold);
}

.lordship-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--neon-gold);
  box-shadow: 0 0 5px rgba(251, 191, 36, 0.5);
}

.lordship-item .name {
  color: white;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remove-lord {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 5px;
  border-radius: 4px;
  transition: 0.2s;
}

.remove-lord:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.lordship-countdown-overlay {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
  pointer-events: none;
  text-align: center;
}

.lordship-countdown-overlay.hidden {
  display: none !important;
}

.lordship-timer-text {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px var(--neon-gold), 0 0 40px #ff8c00;
  line-height: 1;
  margin-bottom: -10px;
}

.lordship-warning-text {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: #ef4444;
  text-shadow: 0 0 10px #ef4444;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.lordship-warning-text.blink {
  animation: lordBlink 1s infinite alternate;
}

@keyframes lordBlink {
  0% {
    opacity: 0.4;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1.05);
  }
}