/* ============================================================
   Kill or Die – Styles
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  overflow: hidden;
  background: #0a0a0a;
  font-family: 'Rajdhani', sans-serif;
  color: #fff;
  cursor: default;
}

body.game-active {
  cursor: none;
}

canvas { display: block; }

/* ---- MAIN MENU ---- */
#mainMenu {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #120a0a 0%, #220d0d 50%, #290f0f 100%);
  z-index: 1000;
}

#mainMenu::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23E84040' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.menu-container {
  text-align: center;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.game-logo-img {
  max-width: 420px;
  height: auto;
  margin-bottom: 36px;
  filter: drop-shadow(0 0 8px rgba(255,68,68,0.35));
  animation: logoPulse 4s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255,68,68,0.25)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 14px rgba(255,68,68,0.40)); transform: scale(1.01); }
}

.game-logo-img[src=""],
.game-logo-img:not([src]),
.game-logo-img.hide {
  display: none;
}

.game-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #fff;
  text-shadow: 0 0 40px rgba(255,68,68,0.45), 0 0 80px rgba(255,68,68,0.2);
  margin-bottom: 0;
}

.logo-accent {
  color: #ff4444;
}

.game-subtitle {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.5em;
  color: rgba(255,68,68,0.75);
  margin-top: 4px;
  margin-bottom: 48px;
}

.menu-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#playerName,
#refApplyInput {
  width: 100%;
  padding: 14px 44px 14px 20px;
  font-size: 1.1rem;
  font-family: 'Rajdhani', sans-serif;
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,40,40,0.3);
  border-radius: 8px;
  color: #fff;
  outline: none;
  text-align: center;
  transition: border-color 0.3s;
}

#playerName:focus,
#refApplyInput:focus {
  border-color: #cc2222;
}

#playerName.valid {
  border-color: #00ff88;
}

#playerName.invalid {
  border-color: #ff5555;
}

#playerName.locked {
  background: rgba(255, 68, 68, 0.12);
  border-color: #cc2222;
  color: #ff4444;
  cursor: not-allowed;
  opacity: 0.85;
}

.btn-play {
  width: 300px;
  padding: 16px 24px;
  font-size: 1.4rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  background: linear-gradient(135deg, #cc2222, #b71c1c);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s;
  box-shadow: 0 4px 30px rgba(255,40,40,0.3);
}

.btn-play:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(255,40,40,0.5);
}

.btn-play:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.btn-icon { margin-right: 8px; }

/* ---- Menu Steps ---- */
.menu-step {
  display: none;
  animation: stepFadeIn 0.4s ease-out;
  width: 100%;
  height: 100%;
}
.menu-step.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
#menuStep2.active {
  display: block;
}
@keyframes stepFadeIn {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---- Wallet Section (Step 1) — Play as Guest ---- */
.step1-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.btn-connect-wallet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 48px;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(135deg, #cc2222 0%, #b71c1c 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 30px rgba(255,40,40,0.35);
  text-transform: uppercase;
}

.btn-connect-wallet:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(255,40,40,0.55);
}

.btn-connect-wallet:active {
  transform: translateY(0) scale(0.98);
}

.wallet-icon {
  font-size: 1.3rem;
}

.login-status {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  min-height: 20px;
  text-align: center;
  margin-top: 12px;
}
.login-status.error { color: #ff5555; }
.login-status.success { color: #00ff88; }
.login-status.loading { color: #ff4444; }

.guest-login-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px auto 0;
  width: min(100%, 360px);
}
.guest-name-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.guest-name-input:focus {
  border-color: #ff4444;
}
.btn-connect-wallet.btn-guest {
  background: linear-gradient(135deg, #cc2222 0%, #a30f0f 100%);
}

/* ---- Step 1 Social Links ---- */
.step1-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}
.step1-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.45);
  transition: all 0.2s;
  text-decoration: none;
}
.step1-social-link:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}

/* ---- Wallet Selection Modal ---- */
.wallet-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: overlayIn 0.2s ease-out;
}

.wallet-modal-overlay.hidden {
  display: none;
}

@keyframes overlayIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.wallet-modal {
  background: #1b1111;
  border: 1px solid rgba(255,68,68,0.25);
  border-radius: 20px;
  width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.08);
  overflow: hidden;
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  0% { opacity: 0; transform: scale(0.92) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.wallet-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.wallet-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}

.wallet-modal-close:hover {
  color: #fff;
}

.wallet-modal-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 20px;
}

.wallet-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  font-size: 1rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.wallet-option-btn:hover {
  background: #3a3a3c;
  border-color: rgba(255,40,40,0.3);
  box-shadow: 0 0 15px rgba(255,40,40,0.1);
}

.wallet-option-btn:active {
  transform: scale(0.98);
}

.wallet-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.wallet-option-icon img,
.wallet-option-icon svg {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
}

.wallet-option-name {
  flex: 1;
}

.wallet-option-chain {
  font-size: 0.7rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.1em;
  color: rgba(255,40,40,0.7);
  background: rgba(255,40,40,0.1);
  padding: 3px 8px;
  border-radius: 6px;
}

.wallet-option-btn.connected {
  background: rgba(0,204,102,0.12);
  border-color: rgba(0,204,102,0.3);
  color: #00ff88;
  pointer-events: none;
}

/* ---- Professional Menu (Step 2) ---- */
.pro-menu {
  display: flex;
  width: 100vw;
  height: 100vh;
  background: transparent;
  overflow: hidden;
  animation: stepFadeIn 0.4s ease-out;
}

/* Sidebar */
.pro-sidebar {
  width: 240px;
  background: rgba(15,13,10,0.85);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,40,40,0.08);
}

.pro-sidebar-logo {
  padding: 24px 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255,40,40,0.08);
}

.pro-logo-img {
  width: 210px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(255,40,40,0.35));
  user-select: none;
  -webkit-user-drag: none;
  display: block;
  margin: 0 auto;
}

.pro-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
}

.sidebar-social-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  padding: 0 8px 10px;
}

.pro-nav-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  width: 100%;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
}

.pro-nav-btn:hover {
  background: rgba(255,40,40,0.08);
  color: rgba(255,255,255,0.8);
}

.pro-nav-btn.active {
  background: rgba(255,40,40,0.15);
  color: #cc2222;
  box-shadow: inset 3px 0 0 #cc2222;
}
.pro-nav-btn.active .pro-nav-icon img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(58%) sepia(90%) saturate(600%) hue-rotate(5deg) brightness(105%);
}
.pro-nav-btn:hover .pro-nav-icon img {
  opacity: 0.9;
}

.pro-nav-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.pro-nav-text {
  white-space: nowrap;
}

.pro-sidebar-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255,40,40,0.08);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 11px 20px;
  width: 100%;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}
.social-link svg {
  flex-shrink: 0;
  opacity: 0.85;
}
.social-link-text {
  white-space: nowrap;
}
.social-discord {
  background: rgba(88,101,242,.18);
  color: #7289da;
}
.social-discord:hover {
  background: rgba(88,101,242,.32);
  color: #99aaf7;
}
.social-discord svg { opacity: 1; color: #7289da; }
.social-twitter {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,0.75);
}
.social-twitter:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.social-twitter svg { opacity: 1; }

.sidebar-footer-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-footer-row .connected-wallet-badge {
  flex: 1;
  min-width: 0;
}

.settings-gear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.settings-gear-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.15);
}

.settings-gear-btn.active {
  background: rgba(255,40,40,0.15);
  border-color: rgba(255,40,40,0.4);
  color: #cc2222;
}

.pro-sidebar-footer .connected-wallet-badge {
  margin-top: 0;
  font-size: 0.7rem;
}

/* Content Area */
.pro-content {
  flex: 1;
  padding: 48px 60px;
  overflow-y: auto;
  background: transparent;
  display: flex;
  flex-direction: column;
}

.pro-content::-webkit-scrollbar {
  width: 4px;
}
.pro-content::-webkit-scrollbar-track {
  background: transparent;
}
.pro-content::-webkit-scrollbar-thumb {
  background: rgba(255,40,40,0.2);
  border-radius: 2px;
}

/* Tabs */
.pro-tab {
  display: none;
  animation: stepFadeIn 0.3s ease-out;
  flex: 1;
  flex-direction: column;
  position: relative;
}
.pro-tab.active {
  display: flex;
}

.pro-tab-header {
  margin-bottom: 28px;
  text-align: center;
}
.pro-tab-header h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 4px;
}
.pro-tab-header p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.4);
}

.settings-header {
  margin-bottom: 16px;
}
.settings-header h2 {
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.6);
}

/* Play Tab Layout */

.tab-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
  gap: 10px;
}
.coming-soon-icon { font-size: 3rem; opacity: 0.4; }
.coming-soon-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255,40,40,0.5);
}
.coming-soon-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

/* ---- Leaderboard Tab ---- */
.leaderboard-list, .historial-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: calc(100% - 80px);
  padding-right: 4px;
}
.tab-loading {
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 0.85rem;
  padding: 40px 0;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.1em;
}
.tab-empty {
  text-align: center;
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  padding: 40px 0;
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  font-size: 0.8rem;
  transition: background 0.15s;
}
.lb-row:hover { background: rgba(255,255,255,0.07); }
.lb-top3 { background: rgba(255,40,40,0.07); }
.lb-top3:hover { background: rgba(255,40,40,0.12); }
.lb-pos { width: 28px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.lb-rank { font-family: 'Orbitron', sans-serif; font-size: 0.7rem; color: rgba(255,255,255,0.4); }
.lb-name { flex: 1; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-stat { display: flex; flex-direction: column; align-items: center; min-width: 32px; }
.lb-label { font-size: 0.6rem; color: rgba(255,255,255,0.35); letter-spacing: 0.05em; }
.lb-kd .lb-label { color: rgba(255,40,40,0.6); }
.lb-kd { color: #cc2222; font-weight: 700; }

/* ---- Historial Tab ---- */
.hist-row {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.hist-row:hover { background: rgba(255,255,255,0.07); }
.hist-top { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; flex-wrap: wrap; }
.hist-serial { font-family: 'Orbitron', sans-serif; font-size: 0.7rem; color: #cc2222; font-weight: 700; }
.hist-kd-row { display: flex; align-items: center; gap: 6px; flex: 1; }
.hist-kills { color: rgba(255,255,255,0.8); font-weight: 600; }
.hist-deaths { color: rgba(255,80,80,0.8); font-weight: 600; }
.hist-kd { color: #cc2222; font-weight: 700; font-size: 0.75rem; }
.hist-players { color: rgba(255,255,255,0.7); }
.hist-dur { color: rgba(255,255,255,0.5); margin-left: auto; }
.hist-date { font-size: 0.7rem; color: rgba(255,255,255,0.3); margin-top: 3px; }


.play-layout {
  display: flex;
  gap: 40px;
  height: 100%;
  align-items: flex-start;
}

.play-left {
  flex: 1;
  min-width: 0;
}

.play-right {
  width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 500px;
}

/* Play Tab — Big Play Button + Dropdown */
.play-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
}

.play-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Streak Display */
.streak-display {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.streak-fire {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.streak-fire-icon {
  font-size: 2rem;
  z-index: 2;
  animation: fireFlicker 1.5s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px rgba(255,40,40,0.6));
}

@keyframes fireFlicker {
  0% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.08) translateY(-2px); }
  100% { transform: scale(1.03) translateY(1px); }
}

.streak-fire-ring {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255,40,40,0.35);
  background: radial-gradient(circle, rgba(255,40,40,0.08) 0%, transparent 70%);
  animation: ringPulse 2.5s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); border-color: rgba(255,40,40,0.35); box-shadow: 0 0 15px rgba(255,40,40,0.1); }
  50% { transform: scale(1.06); border-color: rgba(255,40,40,0.55); box-shadow: 0 0 25px rgba(255,40,40,0.2); }
}

.streak-fire-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 120%; height: 120%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,80,0,0.12) 0%, transparent 60%);
  pointer-events: none;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.streak-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.streak-days {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: #cc2222;
  text-shadow: 0 0 20px rgba(255,40,40,0.4);
  line-height: 1;
}

.streak-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.play-username {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 18px;
  text-shadow: 0 0 15px rgba(255,40,40,0.3);
}

.big-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 280px;
  height: 72px;
  border-radius: 14px;
  border: 2px solid #cc2222;
  background: linear-gradient(135deg, rgba(255,40,40,0.12) 0%, rgba(255,40,40,0.04) 100%);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(255,40,40,0.15), 0 0 60px rgba(255,40,40,0.06);
  z-index: 2;
}

.big-play-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,40,40,0.08), transparent);
  transition: left 0.6s ease;
}

.big-play-btn:hover:not(:disabled)::before {
  left: 100%;
}

.big-play-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #ff4444;
  box-shadow: 0 8px 40px rgba(255,40,40,0.3), 0 0 80px rgba(255,40,40,0.1);
  background: linear-gradient(135deg, rgba(255,40,40,0.2) 0%, rgba(255,40,40,0.08) 100%);
}

.big-play-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 20px rgba(255,40,40,0.2);
}

.big-play-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(255,40,40,0.2);
  box-shadow: none;
}

.big-play-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 120%;
  height: 200%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(255,40,40,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.big-play-shine {
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,200,100,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.big-play-icon {
  font-size: 1.6rem;
  color: #cc2222;
  line-height: 1;
  transition: all 0.3s;
}

.big-play-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #cc2222;
  transition: all 0.3s;
}

.big-play-btn:hover:not(:disabled) .big-play-icon,
.big-play-btn:hover:not(:disabled) .big-play-text {
  color: #ff4444;
  text-shadow: 0 0 20px rgba(255,40,40,0.4);
}

/* Mode Dropdown */
.mode-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  width: 340px;
  background: linear-gradient(165deg, #1e1812 0%, #120e0a 100%);
  border: 1px solid rgba(255,40,40,0.2);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 40px rgba(255,40,40,0.06);
  z-index: 100;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  pointer-events: none;
}

.mode-dropdown.open {
  transform: translateX(-50%) scaleY(1);
  opacity: 1;
  pointer-events: auto;
}

.mode-dropdown-arrow {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: #1e1812;
  border-top: 1px solid rgba(255,40,40,0.2);
  border-left: 1px solid rgba(255,40,40,0.2);
}

.mode-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,40,40,0.12), transparent);
  margin: 2px 8px;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 10px;
  background: transparent;
  transition: all 0.25s ease;
}

.mode-option.available {
  cursor: pointer;
}

.mode-option.available:hover {
  background: rgba(255,40,40,0.08);
}

.mode-option.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.mode-option-icon {
  font-size: 1.4rem;
  width: 36px;
  text-align: center;
  filter: grayscale(1) brightness(10);
  transition: all 0.25s;
}

.mode-option.locked .mode-option-icon {
  filter: grayscale(1) brightness(4);
}

.mode-option.available:hover .mode-option-icon {
  transform: scale(1.15);
}

.mode-option-name {
  flex: 1;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  transition: all 0.25s;
}

.mode-option.locked .mode-option-name {
  color: rgba(255,255,255,0.4);
}

.mode-option.available:hover .mode-option-name {
  color: #ff4444;
}

.mode-option-play {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 7px 18px;
  background: linear-gradient(135deg, #cc2222, #b71c1c);
  color: #000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(255,40,40,0.25);
}

.mode-option-play:hover {
  background: linear-gradient(135deg, #ff4444, #cc2222);
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(255,40,40,0.4);
}

.mode-option-play:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.mode-option-soon {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #cc2222;
  opacity: 0.6;
  white-space: nowrap;
  padding: 5px 10px;
  border: 1px solid rgba(255,40,40,0.15);
  border-radius: 6px;
  background: rgba(255,40,40,0.04);
}

/* Game Modes (legacy) */
.game-modes-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.game-mode-card {
  display: flex;
  align-items: stretch;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s;
  position: relative;
}

.game-mode-card.available:hover {
  border-color: rgba(255,40,40,0.25);
  background: rgba(255,40,40,0.04);
  transform: translateX(4px);
}

.game-mode-card.selected {
  border-color: rgba(255,40,40,0.4);
  background: rgba(255,40,40,0.06);
  box-shadow: 0 0 20px rgba(255,40,40,0.08);
}

.game-mode-card.coming-soon {
  opacity: 0.45;
  pointer-events: none;
}

.game-mode-banner {
  width: 80px;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,40,40,0.08);
  border-right: 1px solid rgba(255,255,255,0.04);
}

.game-mode-icon {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  text-align: center;
}

.game-mode-info {
  flex: 1;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-mode-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
}

.game-mode-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
}

.game-mode-details {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.gm-detail {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-family: 'Orbitron', sans-serif;
  color: #cc2222;
  letter-spacing: 0.05em;
}

.gm-detail-icon {
  font-size: 0.85rem;
}

.btn-play-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 120px;
  padding: 0 20px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, #cc2222, #b71c1c);
  border: none;
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.2s;
  border-left: 1px solid rgba(255,255,255,0.04);
}

.btn-play-mode:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff4444, #cc2222);
  box-shadow: 0 0 24px rgba(255,68,68,0.35);
}

.btn-play-mode:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.coming-soon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  padding: 0 16px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,40,40,0.6);
  border-left: 1px solid rgba(255,255,255,0.04);
  text-align: center;
}

/* Setting nametag inline */
.setting-nametag {
  flex: 0 0 auto;
  width: 160px;
}

.setting-nametag input {
  width: 100%;
  padding: 8px 30px 8px 10px;
  font-size: 0.85rem;
  text-align: left;
}

.btn-save-name {
  background: linear-gradient(135deg, #cc2222, #b71c1c);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 5px 12px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
  flex-shrink: 0;
}
.btn-save-name:hover { opacity: 0.85; }
.btn-save-name:disabled { opacity: 0.4; cursor: default; }
.btn-save-name.saved { background: #00c853; }

/* ---- Hero Character (Play Tab right side) ---- */
.hero-character {
  position: relative;
  width: 220px;
  height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  animation: heroFloat 3s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,40,40,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: heroPulse 3s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

.hero-body-wrapper {
  position: relative;
  width: 120px;
  height: 340px;
}

/* Head */
.hero-head {
  width: 52px;
  height: 52px;
  background: linear-gradient(180deg, #d4a574, #c49464);
  border-radius: 12px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.hero-face {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-visor {
  position: absolute;
  top: 12px;
  left: 4px;
  right: 4px;
  height: 16px;
  background: linear-gradient(180deg, rgba(255,40,40,0.7), rgba(255,40,40,0.5));
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255,40,40,0.5), inset 0 1px 2px rgba(255,255,255,0.2);
  animation: visorGlow 2s ease-in-out infinite alternate;
}

@keyframes visorGlow {
  0% { box-shadow: 0 0 6px rgba(255,40,40,0.4); }
  100% { box-shadow: 0 0 16px rgba(255,40,40,0.8), 0 0 30px rgba(255,40,40,0.2); }
}

.hero-eye {
  width: 6px;
  height: 6px;
  background: #cc2222;
  border-radius: 50%;
  position: absolute;
  top: 17px;
  box-shadow: 0 0 6px rgba(255,40,40,0.8);
}

.hero-eye-l { left: 12px; }
.hero-eye-r { right: 12px; }

/* Torso */
.hero-torso {
  width: 64px;
  height: 80px;
  background: linear-gradient(180deg, #3a4a2a, #2e3d22);
  border-radius: 6px;
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hero-chest-detail {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255,40,40,0.3);
  border-radius: 4px;
}

.hero-chest-detail::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: rgba(255,40,40,0.4);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255,40,40,0.3);
}

/* Arms */
.hero-arm {
  position: absolute;
  top: 60px;
  width: 22px;
  z-index: 4;
}

.hero-arm-l {
  left: 2px;
  transform-origin: top center;
  animation: armSwingL 2.5s ease-in-out infinite;
}

.hero-arm-r {
  right: -14px;
  transform-origin: top center;
  animation: armSwingR 2s ease-in-out infinite;
}

@keyframes armSwingL {
  0%, 100% { transform: rotate(5deg); }
  50% { transform: rotate(-8deg); }
}

@keyframes armSwingR {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(-5deg); }
}

.hero-forearm {
  width: 20px;
  height: 50px;
  background: linear-gradient(180deg, #3a4a2a, #2e3d22);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.hero-hand {
  width: 16px;
  height: 16px;
  background: #c49464;
  border-radius: 4px;
  margin-top: 2px;
  margin-left: 2px;
  position: relative;
}

/* Weapon */
.hero-weapon {
  position: absolute;
  top: -40px;
  left: -30px;
  transform: rotate(-30deg);
  z-index: 6;
}

.hw-body {
  width: 70px;
  height: 16px;
  background: linear-gradient(90deg, #444, #555, #444);
  border-radius: 3px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hw-barrel {
  position: absolute;
  top: 2px;
  left: 66px;
  width: 40px;
  height: 8px;
  background: linear-gradient(90deg, #555, #666);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.hw-grip {
  position: absolute;
  top: 14px;
  left: 30px;
  width: 10px;
  height: 22px;
  background: linear-gradient(180deg, #333, #222);
  border-radius: 0 0 3px 3px;
  transform: rotate(10deg);
}

.hw-stock {
  position: absolute;
  top: 2px;
  left: -22px;
  width: 24px;
  height: 14px;
  background: linear-gradient(90deg, #3a2a1a, #554433);
  border-radius: 3px 0 0 6px;
}

.hw-scope {
  position: absolute;
  top: -8px;
  left: 35px;
  width: 18px;
  height: 8px;
  background: linear-gradient(180deg, #333, #222);
  border-radius: 3px;
  border: 1px solid #555;
}

.hw-scope::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 2px;
  width: 4px;
  height: 4px;
  background: rgba(255,40,40,0.6);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255,40,40,0.5);
}

.hw-muzzle-flash {
  position: absolute;
  top: -4px;
  left: 108px;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(255,40,40,0.6) 0%, rgba(255,40,40,0.3) 40%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: muzzleFlash 1.5s ease-in-out infinite;
}

@keyframes muzzleFlash {
  0%, 85%, 100% { opacity: 0; transform: scale(0.5); }
  90% { opacity: 1; transform: scale(1.2); }
  95% { opacity: 0.5; transform: scale(0.8); }
}

/* Legs */
.hero-legs {
  position: absolute;
  top: 140px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.hero-leg {
  width: 24px;
  height: 80px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.hero-leg-l {
  background: linear-gradient(180deg, #2b4488, #1e3066);
  animation: legSwingL 2.5s ease-in-out infinite;
  transform-origin: top center;
}

.hero-leg-r {
  background: linear-gradient(180deg, #2b4488, #1e3066);
  animation: legSwingR 2.5s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes legSwingL {
  0%, 100% { transform: rotate(3deg); }
  50% { transform: rotate(-3deg); }
}

@keyframes legSwingR {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* Shoes */
.hero-leg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -2px;
  width: 28px;
  height: 10px;
  background: #222;
  border-radius: 3px 6px 4px 3px;
}

.hero-leg-l::after { left: -2px; }
.hero-leg-r::after { left: -2px; }

/* Ground shadow */
.hero-shadow {
  width: 120px;
  height: 16px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.35) 0%, transparent 70%);
  border-radius: 50%;
  margin-top: -5px;
  animation: shadowPulse 3s ease-in-out infinite;
}

@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.6; }
  50% { transform: scaleX(0.85); opacity: 0.4; }
}

/* Skins Tab */
.outfit-grid-pro {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.outfit-card-pro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px 16px;
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s;
}

.outfit-card-pro:hover {
  border-color: rgba(255,40,40,0.3);
  background: rgba(255,40,40,0.06);
  transform: translateY(-4px);
}

.outfit-card-pro.active {
  border-color: #cc2222;
  background: rgba(255,40,40,0.1);
  box-shadow: 0 0 24px rgba(255,40,40,0.15);
}

.outfit-card-pro:hover .skin-hero,
.outfit-card-pro.active .skin-hero {
  animation: skinIdle 2s ease-in-out infinite;
}

@keyframes skinIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---- Skin Hero Character (Skins Tab) ---- */
.skin-hero {
  position: relative;
  width: 80px;
  height: 160px;
  margin: 0 auto 4px;
}

/* Skin Head */
.sh-head {
  width: 32px;
  height: 32px;
  background: linear-gradient(180deg, #d4a574, #c49464);
  border-radius: 8px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

.sh-face {
  position: relative;
  width: 100%;
  height: 100%;
}

.sh-eye {
  width: 4px;
  height: 4px;
  background: #cc2222;
  border-radius: 50%;
  position: absolute;
  top: 14px;
  box-shadow: 0 0 4px rgba(255,40,40,0.6);
}
.sh-eye-l { left: 8px; }
.sh-eye-r { right: 8px; }

/* Hair (Default, Rebel) */
.sh-hair {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 12px;
  background: #3b2214;
  border-radius: 8px 8px 0 0;
  z-index: 6;
}
.sh-hair::after {
  content: '';
  position: absolute;
  top: 6px;
  left: -2px;
  width: 10px;
  height: 14px;
  background: #4a2c1a;
  border-radius: 4px;
}

/* Helmet (Military) */
.sh-helmet {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 18px;
  background: linear-gradient(180deg, #4a5a3a, #3d4d2d);
  border-radius: 10px 10px 2px 2px;
  z-index: 6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.sh-helmet::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -3px;
  right: -3px;
  height: 5px;
  background: #3d4d2d;
  border-radius: 2px;
}

/* Beret (Stealth) */
.sh-beret {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-55%) rotate(-8deg);
  width: 34px;
  height: 14px;
  background: #8b0000;
  border-radius: 20px 6px 0 0;
  z-index: 6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.sh-beret::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 6px;
  width: 6px;
  height: 6px;
  background: #daa520;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(218,165,32,0.4);
}

/* Cap (Urban) */
.sh-cap {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 10px;
  background: #1a1a2e;
  border-radius: 6px 6px 0 0;
  z-index: 6;
}
.sh-cap::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: -4px;
  width: 24px;
  height: 5px;
  background: #111122;
  border-radius: 2px;
}

/* Torso */
.sh-torso {
  width: 40px;
  height: 48px;
  border-radius: 4px;
  position: absolute;
  top: 35px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

/* Default torso */
.skin-default .sh-torso { background: linear-gradient(180deg, #3daa55, #2e8a42); }

/* Vest torso (military, stealth, rebel) */
.sh-vest {
  background: linear-gradient(180deg, #556b2f, #3a4a22) !important;
  border: 1px solid #3a4a22;
}
.sh-vest::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255,40,40,0.25);
  border-radius: 3px;
}
.sh-vest::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 4px;
  width: 4px;
  height: 4px;
  background: #888;
  border-radius: 50%;
}

/* Hoodie torso (urban) */
.sh-hoodie {
  background: linear-gradient(180deg, #2a2a35, #1e1e28) !important;
  border-radius: 6px !important;
}
.sh-hoodie::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  border-radius: 0 0 50% 50%;
}

/* Rebel vest unique tint */
.skin-rebel .sh-vest {
  background: linear-gradient(180deg, #5a4a2f, #443a22) !important;
  border-color: #443a22;
}

/* Arms */
.sh-arm {
  position: absolute;
  top: 38px;
  width: 14px;
  z-index: 4;
}
.sh-arm-l {
  left: 6px;
  animation: shArmL 2.5s ease-in-out infinite;
  transform-origin: top center;
}
.sh-arm-r {
  right: 6px;
  animation: shArmR 2.5s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes shArmL {
  0%, 100% { transform: rotate(4deg); }
  50% { transform: rotate(-4deg); }
}
@keyframes shArmR {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

.sh-forearm {
  width: 12px;
  height: 34px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Arm colors per outfit */
.skin-default .sh-forearm { background: linear-gradient(180deg, #3daa55, #2e8a42); }
.skin-military .sh-forearm { background: linear-gradient(180deg, #556b2f, #3a4a22); }
.skin-stealth .sh-forearm { background: linear-gradient(180deg, #556b2f, #3a4a22); }
.skin-rebel .sh-forearm { background: linear-gradient(180deg, #5a4a2f, #443a22); }
.skin-urban .sh-forearm { background: linear-gradient(180deg, #2a2a35, #1e1e28); }
.sh-hoodie-arm { background: linear-gradient(180deg, #2a2a35, #1e1e28) !important; }

/* Legs */
.sh-legs {
  position: absolute;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 2;
}

.sh-leg {
  width: 16px;
  height: 50px;
  background: linear-gradient(180deg, #2b4488, #1e3066);
  border-radius: 3px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
  position: relative;
}

.sh-leg:first-child {
  animation: shLegL 2.5s ease-in-out infinite;
  transform-origin: top center;
}
.sh-leg:last-child {
  animation: shLegR 2.5s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes shLegL {
  0%, 100% { transform: rotate(2deg); }
  50% { transform: rotate(-2deg); }
}
@keyframes shLegR {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

/* Shoes */
.sh-leg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -1px;
  width: 18px;
  height: 7px;
  background: #222;
  border-radius: 2px 4px 3px 2px;
}

.outfit-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

.outfit-card-pro.active .outfit-name {
  color: #cc2222;
}

.outfit-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: #00ff88;
  background: rgba(0,255,136,0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Settings Tab */
.settings-layout {
  display: flex;
  flex-direction: row;
  gap: 0;
  flex: 1;
  overflow: hidden;
}

.pro-settings-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
}

/* Settings panels — only the active one is visible */
.settings-panel {
  display: none;
}
.settings-panel.active {
  display: block;
}

/* Settings sidebar (vertical tabs on the left) */
.settings-tab-bar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  padding: 0 12px;
  border-right: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.3);
  border-radius: 12px 0 0 12px;
  min-width: 120px;
}

.settings-tab-bar-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
}

.settings-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  height: 36px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all 0.25s ease;
}
.settings-tab-btn svg {
  flex-shrink: 0;
}
.settings-tab-btn span {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.settings-tab-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.12);
}

.settings-tab-btn.active {
  background: rgba(255,40,40,0.15);
  border-color: rgba(255,40,40,0.4);
  color: #cc2222;
  box-shadow: 0 0 10px rgba(255,40,40,0.15);
}

/* Unified RESET button for settings sidebar */
.settings-reset-btn {
  background: rgba(200,40,40,0.12);
  border: 1px solid rgba(200,40,40,0.25);
  cursor: pointer;
  padding: 7px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  color: rgba(255,100,100,0.6);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: all 0.2s;
}
.settings-reset-btn:hover {
  background: rgba(220,40,40,0.22);
  border-color: rgba(220,40,40,0.5);
  color: #ff5555;
}

/* Make the settings tab a flex column so tab bar sticks to bottom */
#tabSettings {
  display: none;
  flex-direction: column;
}
#tabSettings.active {
  display: flex;
}

.settings-group {
  background:
    linear-gradient(rgba(255,40,40,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,40,40,0.03) 1px, transparent 1px),
    rgba(0, 0, 0, 0.30);
  background-size: 20px 20px, 20px 20px, 100% 100%;
  border: 1px solid rgba(255,40,40,0.10);
  border-radius: 14px;
  padding: 22px 24px;
  position: relative;
}

.settings-group::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,40,40,0.15), transparent);
  pointer-events: none;
}

.settings-group + .settings-group {
  margin-top: 16px;
}

.settings-group-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  text-transform: uppercase;
}

.setting-divider {
  height: 1px;
  background: rgba(255,255,255,0.04);
  margin: 6px 0;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 10px 0;
}

.setting-row + .setting-row {
  border-top: 1px solid rgba(255,255,255,0.03);
}

.setting-row-danger {
  opacity: 0.7;
  transition: opacity 0.2s;
}
.setting-row-danger:hover {
  opacity: 1;
}

.setting-label-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.setting-icon-svg {
  flex-shrink: 0;
}

.setting-icon-svg.wallet-icon-green {
  color: #00ff88;
}

.setting-icon-svg.discord-icon {
  color: #7289da;
}

.setting-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  flex: 1;
}

.setting-slider {
  width: 140px;
  accent-color: #cc2222;
  cursor: pointer;
}

.setting-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  color: #cc2222;
  min-width: 30px;
  text-align: center;
}

.setting-select {
  padding: 6px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
}

.setting-select:focus {
  border-color: #cc2222;
}

.setting-select option {
  background: #1a1a1e;
  color: #fff;
}

/* Toggle Switch */
.setting-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.setting-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.setting-toggle input:checked + .toggle-slider {
  background: #cc2222;
}

.setting-toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Profile Tab */
.pro-profile-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 650px;
  margin: 0 auto;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(255,40,40,0.1);
  border: 2px solid rgba(255,40,40,0.3);
  border-radius: 50%;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.profile-wallet {
  font-size: 0.8rem;
  color: rgba(255,40,40,0.6);
  font-family: monospace;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}

.stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #cc2222;
}

.stat-label {
  font-size: 0.7rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
}

.btn-disconnect {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid rgba(255,60,60,0.2);
  border-radius: 6px;
  color: rgba(255,80,80,0.6);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-disconnect:hover {
  background: rgba(255,60,60,0.12);
  border-color: rgba(255,60,60,0.4);
  color: #ff5555;
}

.setting-wallet-addr {
  font-family: 'Orbitron', monospace;
  font-size: 0.6rem;
  color: #00ff88;
  background: rgba(0,255,136,0.04);
  border: 1px solid rgba(0,255,136,0.1);
  padding: 5px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  word-break: break-all;
  text-align: right;
  line-height: 1.4;
  flex-shrink: 0;
}

.btn-connect-discord {
  padding: 5px 14px;
  background: rgba(88,101,242,0.08);
  border: 1px solid rgba(88,101,242,0.2);
  border-radius: 6px;
  color: rgba(114,137,218,0.8);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-connect-discord:hover {
  background: rgba(88,101,242,0.18);
  border-color: rgba(88,101,242,0.4);
  color: #7289da;
}

.btn-connect-discord.discord-linked {
  background: rgba(88,101,242,0.18);
  border-color: rgba(88,101,242,0.5);
  color: #7289da;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-connect-discord:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nametag-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  width: 100%;
}

.nametag-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: rgba(255,40,40,0.7);
}

.nametag-input-wrapper {
  position: relative;
  width: 300px;
}

.name-status {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  transition: all 0.3s;
}
.name-status.checking::after {
  content: '';
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,40,40,0.3);
  border-top-color: #cc2222;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.name-status.available::after {
  content: '\u2713';
  color: #00ff88;
  font-weight: 700;
}
.name-status.taken::after {
  content: '\u2717';
  color: #ff5555;
  font-weight: 700;
}
.name-status.invalid::after {
  content: '!';
  color: #e84040;
  font-weight: 700;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.name-error {
  font-size: 0.8rem;
  min-height: 18px;
  transition: all 0.3s;
}
.name-error.error {
  color: #ff5555;
}
.name-error.success {
  color: #00ff88;
}
.name-error.warn {
  color: #e84040;
}

/* Connected wallet badge (Step 2) */
.connected-wallet-badge {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  min-height: 24px;
}
.connected-wallet-badge .badge-wallet-addr {
  color: #00ff88;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}
.connected-wallet-badge .badge-dot-green {
  display: inline-block;
  width: 6px; height: 6px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0,255,136,0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.menu-footer {
  margin-top: 24px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

/* ---- DEATH SCREEN ---- */
#deathScreen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(139,0,0,0.5);
  z-index: 500;
  pointer-events: none;
}

.death-container {
  text-align: center;
}

.death-container h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  color: #ff2222;
  text-shadow: 0 0 40px rgba(255,0,0,0.6);
  animation: deathPulse 0.5s ease-out;
}

@keyframes deathPulse {
  0% { transform: scale(2); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

#killedBy {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.7);
  margin-top: 12px;
}

.respawn-text {
  margin-top: 20px;
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---- HUD ---- */
#hud {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
}

#hud > * { pointer-events: auto; }

/* Crosshair */
#crosshair {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cross-h, .cross-v {
  position: absolute;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 4px rgba(0,0,0,0.8);
}

.cross-h {
  width: 20px; height: 2px;
  top: -1px; left: -10px;
}

.cross-v {
  width: 2px; height: 20px;
  top: -10px; left: -1px;
}

/* Health */
#healthBar {
  position: absolute;
  bottom: 36px; left: 36px;
  display: flex; flex-direction: column; gap: 5px;
}

.hud-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.35);
}

.bar-bg {
  width: 180px; height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.25s ease;
}

.health-fill {
  background: linear-gradient(90deg, #00ff88, #00cc66);
  width: 100%;
}

#healthText {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: #00ff88;
  line-height: 1;
  text-shadow: 0 0 18px rgba(0,255,136,0.45);
}

.bar-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem; font-weight: 700;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.2em;
}

/* Reload banner — above weapon selector */
#reloadBanner {
  position: absolute;
  bottom: 120px; right: 36px;
  pointer-events: none;
  text-align: right;
}

#reloadText {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: #ff6b35;
  text-shadow: 0 0 12px rgba(255,107,53,0.6);
  animation: blink 0.5s infinite;
}

/* Ammo — hidden, replaced by slot-ammo badges */
#ammoDisplay {
  display: none !important;
}

#weaponIcon {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}

#ammoText {
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255,255,255,0.18);
}

/* Weapon Selector — bottom right */
#weaponSelector {
  position: absolute;
  bottom: 36px; right: 36px;
  display: flex; flex-direction: row; gap: 6px;
  align-items: flex-end;
  overflow: visible;
}

.weapon-slot {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 72px; height: 72px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  cursor: default;
  transition: all 0.15s;
  box-sizing: border-box;
}

.weapon-slot.active {
  border-color: rgba(255,40,40,0.55);
  background: rgba(255,40,40,0.1);
  box-shadow: 0 0 12px rgba(255,40,40,0.15);
}

/* Weapon icon image */
.slot-icon {
  width: 54px; height: 40px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.4;
  transition: opacity 0.15s;
  filter: brightness(0) invert(1);
}
.weapon-slot.active .slot-icon { opacity: 1; filter: brightness(1) saturate(1.2); }

.slot-icon-rifle  { background-image: url('assets/M4_Carabine.png'); background-size: 90% auto; }
.slot-icon-pistol { background-image: url('assets/Pistol.png');     background-size: 55% auto; }
.slot-icon-knife  { background-image: url('assets/Knife.png');       background-size: 80% auto; }

/* Key number badge — bottom right corner */
.slot-num {
  position: absolute;
  bottom: 3px; right: 5px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem; font-weight: 700;
  color: rgba(255,255,255,0.3);
  transition: color 0.15s;
  line-height: 1;
}
.weapon-slot.active .slot-num { color: rgba(255,40,40,0.8); }

/* Ammo badge — above active weapon slot */
.slot-ammo {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 8px rgba(255,40,40,0.4);
  white-space: nowrap;
  pointer-events: none;
  display: none;
  line-height: 1;
}
.weapon-slot.active .slot-ammo {
  display: block;
}

#killsDisplay {
  position: absolute;
  top: 24px; right: 36px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'Orbitron', sans-serif;
}

.kill-icon {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.3);
}

#killCount {
  font-size: 1.6rem;
  font-weight: 900;
  color: #ff4444;
  text-shadow: 0 0 14px rgba(255,68,68,0.4);
}

/* Kills */
#killFeed {
  position: absolute;
  top: 20px; right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  pointer-events: none;
}

.kill-feed-item {
  padding: 5px 14px;
  background: rgba(0,0,0,0.65);
  border-radius: 4px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.9);
  animation: feedFadeIn 0.3s ease-out;
  white-space: nowrap;
}

.kf-killer {
  color: #ff6666;
  font-weight: 700;
}
.kf-verb {
  color: rgba(255,255,255,0.55);
  font-style: italic;
  margin: 0 4px;
}
.kf-victim {
  color: #ff4444;
  font-weight: 700;
}

@keyframes feedFadeIn {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Hit Marker */
#hitMarker {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 900;
  color: #ff4444;
  text-shadow: 0 0 10px rgba(255,0,0,0.6);
  pointer-events: none;
  animation: hitPop 0.2s ease-out;
}

@keyframes hitPop {
  0% { transform: translate(-50%, -50%) scale(2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Damage Numbers */
.damage-number {
  position: fixed;
  transform: translateX(-50%);
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255,255,255,0.5), 2px 2px 4px rgba(0,0,0,0.8);
  pointer-events: none;
  z-index: 1000;
  animation: dmgFloat 0.8s ease-out forwards;
}
.damage-head {
  font-size: 2.2rem;
  color: #ff4444;
  text-shadow: 0 0 12px rgba(255,0,0,0.8), 0 0 24px rgba(255,0,0,0.4), 2px 2px 4px rgba(0,0,0,0.8);
}
.damage-legs {
  font-size: 1.2rem;
  color: #aaaaaa;
  text-shadow: 0 0 4px rgba(170,170,170,0.4), 2px 2px 4px rgba(0,0,0,0.8);
}
@keyframes dmgFloat {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-60px); }
}

/* Damage overlay */
#damageOverlay {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(255,0,0,0.4) 100%);
  pointer-events: none;
  animation: damageFade 0.4s ease-out forwards;
}

@keyframes damageFade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Scoreboard */
#scoreboard {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(255,40,40,0.3);
  border-radius: 12px;
  padding: 20px 30px;
  min-width: 400px;
  pointer-events: none;
}

#scoreboard h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  color: #cc2222;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.2em;
}

#scoreTable {
  width: 100%;
  border-collapse: collapse;
}

#scoreTable th {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-align: left;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#scoreTable td {
  padding: 8px 12px;
  font-size: 0.95rem;
}

/* FPS Counter */
#fpsCounter {
  position: absolute;
  top: 44px; left: 40px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #00ff88;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(0,255,136,0.4);
  z-index: 110;
}

.hidden { display: none !important; }

/* Pointer lock message */
#lockMessage {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  z-index: 200;
  pointer-events: none;
}

/* ---- Outfit Selector ---- */
.outfit-selector {
  width: 340px;
  margin: 4px auto;
}

.outfit-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: rgba(255,40,40,0.7);
  text-align: center;
  margin-bottom: 8px;
}

.outfit-grid {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.outfit-card {
  width: 60px;
  padding: 6px 4px 4px;
  border: 2px solid rgba(255,40,40,0.15);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.outfit-card:hover { border-color: rgba(255,40,40,0.4); background: rgba(255,40,40,0.08); }
.outfit-card.active { border-color: #cc2222; background: rgba(255,40,40,0.12); box-shadow: 0 0 12px rgba(255,40,40,0.25); }
.outfit-card span {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.6rem;
  color: #aaa;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.outfit-card.active span { color: #cc2222; }

/* Mini character previews */
.outfit-preview {
  width: 28px;
  height: 44px;
  margin: 0 auto;
  position: relative;
}
.op-head {
  width: 12px; height: 12px;
  background: #d4a574;
  border-radius: 2px;
  margin: 0 auto;
  position: relative;
}
.op-body {
  width: 14px; height: 14px;
  background: #3daa55;
  margin: 1px auto 0;
  border-radius: 1px;
}
.op-legs {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 1px;
  position: relative;
}
.op-legs::before, .op-legs::after {
  content: '';
  width: 5px; height: 14px;
  background: #2b4488;
  border-radius: 1px;
}
.op-helmet {
  width: 14px; height: 6px;
  background: #4a5a3a;
  border-radius: 2px 2px 0 0;
  margin: 0 auto;
}
.op-vest {
  width: 16px; height: 14px;
  background: #556b2f;
  margin: 1px auto 0;
  border-radius: 1px;
  border: 1px solid #3a4a22;
}
.op-kneepad {
  position: absolute;
  bottom: 3px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 3px;
  background: #333;
  border-radius: 1px;
}
.op-beret {
  width: 13px; height: 5px;
  background: #8b0000;
  border-radius: 8px 2px 0 0;
  margin: 0 auto;
  transform: rotate(-5deg);
}
.op-cap {
  width: 12px; height: 4px;
  background: #1a1a2e;
  border-radius: 2px 2px 0 0;
  margin: 0 auto;
  position: relative;
}
.op-cap::after {
  content: '';
  position: absolute;
  bottom: 0; left: -2px;
  width: 10px; height: 2px;
  background: #111122;
  border-radius: 1px;
}
.op-hoodie {
  width: 16px; height: 14px;
  background: #2a2a35;
  margin: 1px auto 0;
  border-radius: 2px;
}

/* ============================================================
   Loading Screen
   ============================================================ */
#loadingScreen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0a0908 0%, #1a1410 50%, #0d0b08 100%);
  z-index: 2000;
  transition: opacity 0.5s ease;
}
#loadingScreen.hidden { display: none; }
#loadingScreen.fade-out { opacity: 0; pointer-events: none; }

.loading-container {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
}

.loading-logo-img {
  max-width: 300px; height: auto;
  filter: drop-shadow(0 0 12px rgba(255,40,40,0.3));
  animation: loadingPulse 2s ease-in-out infinite;
}
@keyframes loadingPulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(255,40,40,0.3)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 20px rgba(255,40,40,0.5)); transform: scale(1.02); }
}

.loading-bar-outer {
  width: 320px; height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.loading-bar-inner {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, #cc2222, #ff0e0e);
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(255,40,40,0.5);
}

.loading-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em;
}

/* ============================================================
   Matchmaking Screen
   ============================================================ */
#matchmakingScreen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 3000;
}
#matchmakingScreen.hidden { display: none; }

.mm-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, #210303 0%, #090303 100%);
}
.mm-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,24,24,0.18) 0%, transparent 65%);
  animation: mmPulse 3s ease-in-out infinite;
}
.mm-scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(0,0,0,0.18) 3px, rgba(0,0,0,0.18) 4px
  );
  pointer-events: none;
  z-index: 1;
}
@keyframes mmPulse {
  0%,100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

.mm-content {
  position: relative;
  z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  text-align: center;
  padding: 40px 56px 36px;
  background: linear-gradient(160deg, rgba(28,3,3,0.97) 0%, rgba(12,3,3,0.98) 100%);
  border: 1px solid rgba(255,40,40,0.36);
  border-top: 2px solid rgba(255,38,38,0.75);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), 0 32px 80px rgba(0,0,0,0.7), 0 0 40px rgba(255,40,40,0.1) inset;
  min-width: 360px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.mm-content::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  border-style: solid;
  border-width: 0 18px 18px 0;
  border-color: transparent rgba(255,40,40,0.4) transparent transparent;
}

.mm-logo {
  max-width: 200px;
  filter: drop-shadow(0 0 14px rgba(255,40,40,0.45));
  animation: loadingPulse 2.8s ease-in-out infinite;
}

.mm-divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, #cc2222, transparent);
  border-radius: 2px;
  margin: -4px 0 0;
}

.mm-title {
  font-family: 'Rajdhani', 'Impact', sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  color: #fff;
  text-shadow: 0 0 20px rgba(255,40,40,0.55), 0 2px 0 rgba(0,0,0,0.8);
}

.mm-status {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  color: rgba(255,80,80,0.82);
  text-shadow: 0 0 12px rgba(255,20,20,0.22);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 18px;
}

/* Timer ring */
.mm-timer-wrap {
  position: relative;
  width: 100px; height: 100px;
  display: flex; align-items: center; justify-content: center;
}
.mm-timer-ring {
  position: absolute; inset: 0;
}
.mm-timer-ring svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.mm-ring-bg {
  fill: none;
  stroke: rgba(255,40,40,0.1);
  stroke-width: 4;
}
.mm-ring-fg {
  fill: none;
  stroke: #cc2222;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 213.6;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 5px #cc2222);
  animation: mmRingSpin 3s linear infinite;
}
@keyframes mmRingSpin {
  0%   { stroke-dashoffset: 0; opacity: 1; }
  80%  { stroke-dashoffset: 213.6; opacity: 0.3; }
  100% { stroke-dashoffset: 213.6; opacity: 0.3; }
}

.mm-timer {
  position: relative; z-index: 1;
  font-family: 'Rajdhani', monospace;
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  text-shadow: 0 0 14px rgba(255,40,40,0.6);
}

.mm-dots {
  display: flex; gap: 8px;
  margin-top: -4px;
}
.mm-dots span {
  width: 7px; height: 7px;
  background: #cc2222;
  border-radius: 50%;
  animation: mmDot 1.4s ease-in-out infinite;
  box-shadow: 0 0 6px #cc2222;
}
.mm-dots span:nth-child(2) { animation-delay: 0.25s; background: rgba(255,40,40,0.65); }
.mm-dots span:nth-child(3) { animation-delay: 0.5s;  background: rgba(255,40,40,0.35); }
@keyframes mmDot {
  0%,80%,100% { transform: scale(0.5); opacity: 0.25; }
  40%          { transform: scale(1.3); opacity: 1; }
}

.mm-cancel-btn {
  margin-top: 6px;
  padding: 10px 32px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2px;
  color: rgba(255,255,255,0.4);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.2s;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  position: relative;
}
.mm-cancel-btn span {
  font-size: 0.8em;
  opacity: 0.7;
}
.mm-cancel-btn:hover {
  background: rgba(220,40,40,0.15);
  border-color: rgba(220,60,60,0.5);
  color: #ff7070;
  box-shadow: 0 0 14px rgba(200,30,30,0.2) inset;
}

/* ============================================================
   Daily Top 3 Kills Panel
   ============================================================ */
.daily-top3 {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,40,40,0.2);
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 200px;
  max-width: 240px;
  backdrop-filter: blur(8px);
  text-align: center;
}

.daily-top3-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #cc2222;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.daily-top3-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.daily-top3-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
}

.daily-top3-rank {
  font-size: 1.1rem;
  min-width: 22px;
  text-align: center;
}

.daily-top3-name {
  flex: 1;
  color: #eee;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.daily-top3-kills {
  color: #cc2222;
  font-weight: 800;
  font-size: 1rem;
  min-width: 28px;
  text-align: right;
}

.daily-top3-empty {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  font-style: italic;
  text-align: center;
  padding: 4px 0;
}

.daily-top3-reset {
  margin-top: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
  text-align: center;
  width: 100%;
}

.top3-skull-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

/* ============================================================
   Daily Missions Tab
   ============================================================ */
.missions-tab-content {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}
/* TOP tab leaderboard */
.top-tab-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}
.dm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dm-mission {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 10px;
}
.dm-mission.completed {
  border-color: rgba(0,200,100,0.3);
  background: rgba(0,200,100,0.06);
}
.dm-mission-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.dm-mission-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #eee;
  text-align: left;
  flex: 1;
}
.dm-mission-diff {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}
.dm-mission-diff.easy   { background: rgba(0,200,100,0.2); color: #00c864; }
.dm-mission-diff.medium { background: rgba(255,180,0,0.2); color: #ffb400; }
.dm-mission-diff.hard   { background: rgba(255,50,50,0.2); color: #ff5050; }
.dm-mission-desc {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 5px;
  text-align: left;
}
.dm-mission-bar-bg {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.dm-mission-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.dm-mission-bar.easy   { background: #00c864; }
.dm-mission-bar.medium { background: #ffb400; }
.dm-mission-bar.hard   { background: #ff5050; }
.dm-mission-bar.done   { background: #00c864; }
.dm-mission-progress {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  text-align: right;
  margin-top: 2px;
}
.dm-mission-pts {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  color: #00c8ff;
}
.dm-mission.completed .dm-mission-pts { color: #00c864; }
.dm-mission.completed .dm-mission-progress { color: rgba(0,200,100,0.7); }

/* Mission Leaderboard */
.dm-lb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.dm-lb-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.dm-lb-entry.top3 {
  border-color: rgba(255,40,40,0.2);
  background: rgba(255,40,40,0.05);
}
.dm-lb-rank {
  font-size: 1.1rem;
  min-width: 28px;
  text-align: center;
  font-weight: 700;
}
.dm-lb-rank.gold   { color: #cc2222; }
.dm-lb-rank.silver { color: #c0c0c0; }
.dm-lb-rank.bronze { color: #cd7f32; }
.dm-lb-name {
  flex: 1;
  color: #eee;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-lb-entry.top3 .dm-lb-name { color: #cc2222; }
.dm-lb-pts {
  color: #00c8ff;
  font-weight: 800;
  font-size: 0.85rem;
  min-width: 36px;
  text-align: right;
}
.dm-lb-prize {
  font-size: 0.6rem;
  color: #cc2222;
  margin-left: 2px;
}
.dm-empty {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  font-style: italic;
  text-align: center;
  padding: 4px 0;
}
.dm-reset {
  margin-top: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
}

/* Claim button */
.dm-claim-btn {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 6px 0;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #cc2222, #b71c1c);
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 10px rgba(255,40,40,0.3);
}
.dm-claim-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 18px rgba(255,40,40,0.5);
}
.dm-claim-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* Claimed state */
.dm-mission.claimed {
  border-color: rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  opacity: 0.6;
}
.dm-claimed {
  color: rgba(0,200,100,0.7) !important;
  font-weight: 700;
  text-align: center;
  margin-top: 4px;
}

/* Make dm-list and dm-lb-list full width inside tab */
.missions-tab-content .dm-list,
.top-tab-content .dm-lb-list {
  width: 100%;
}

/* ============================================================
   Tournament Tab (in-menu card)
   ============================================================ */

/* --- Header subtitle --- */
.trn-header-sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.88rem;
  color: rgba(255,40,40,0.5);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* --- Content wrapper --- */
.trn-content {
  padding: 0;
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
}

/* --- Empty state --- */
.trn-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 80px 0;
  color: rgba(255,255,255,0.18);
}
.trn-empty-icon {
  opacity: 0.15;
  margin-bottom: 6px;
  color: rgba(255,40,40,0.4);
}
.trn-empty-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}
.trn-empty-sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.04em;
}

/* --- Section dividers (live / upcoming / ended) --- */
.trn-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 10px 4px 10px;
  margin-top: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.trn-section-header:first-child { margin-top: 0; }
.trn-section-live {
  color: #3cd26e;
  border-color: rgba(59,210,110,0.2);
}
.trn-section-upcoming {
  color: rgba(255,40,40,0.85);
  border-color: rgba(255,40,40,0.15);
}
.trn-section-ended {
  color: rgba(255,255,255,0.25);
}
.trn-section-dot {
  width: 8px; height: 8px;
  background: #3cd26e;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(59,210,110,0.6);
  flex-shrink: 0;
  display: inline-block;
  animation: trnPulse 2s ease-in-out infinite;
}
@keyframes trnPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(59,210,110,0.6); }
  50% { opacity: 0.5; box-shadow: 0 0 4px rgba(59,210,110,0.3); }
}

/* --- Discord bar at bottom --- */
.trn-discord-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 16px;
  background: rgba(88,101,242,0.06);
  border: 1px solid rgba(88,101,242,0.18);
  border-radius: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
}
.trn-discord-bar svg { flex-shrink: 0; color: #7289da; opacity: 0.8; }
.trn-discord-bar span { flex: 1; letter-spacing: 0.02em; }
.trn-discord-link {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #7289da;
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid rgba(114,137,218,0.35);
  border-radius: 6px;
  background: rgba(114,137,218,0.08);
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  flex-shrink: 0;
}
.trn-discord-link:hover {
  background: rgba(114,137,218,0.22);
  color: #fff;
}

/* --- Card wrapper (one per tournament, stacked vertically) --- */
.trn-card-wrap {
  padding: 18px;
  margin-bottom: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,0.025) 0%, rgba(255,40,40,0.012) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.trn-card-wrap:hover {
  border-color: rgba(255,40,40,0.2);
  box-shadow: 0 2px 20px rgba(255,40,40,0.04);
}
.trn-card-wrap:last-child {
  margin-bottom: 0;
}

/* --- Top bar (name left, badge+time right) --- */
.trn-topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}
.trn-topbar-left {
  min-width: 0;
}
.trn-card-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: .04em;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 16px rgba(255,40,40,0.15);
}
.trn-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.trn-topbar-time {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: .06em;
  white-space: nowrap;
}
.trn-topbar-time-main {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .06em;
}
.trn-topbar-time-sub {
  font-size: 9px;
  color: rgba(255,40,40,0.4);
  opacity: 1;
  letter-spacing: .04em;
  text-transform: capitalize;
}
/* Countdown in topbar */
.trn-topbar-cd {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .03em;
  color: rgba(255,40,40,0.4);
  white-space: nowrap;
}
.trn-topbar-cd .trn-countdown {
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
}
.trn-topbar-cd-live {
  color: rgba(74,222,128,0.45);
}
.trn-topbar-cd-live .trn-countdown {
  color: rgba(74,222,128,0.8);
}
.trn-topbar-sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.1);
}
/* --- Tournament description --- */
.trn-desc {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  text-align: center;
  line-height: 1.5;
  letter-spacing: .02em;
}
/* --- Two-column body --- */
.trn-body {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 16px;
  min-height: 220px;
}

/* --- Leaderboard (left column) --- */
.trn-lb {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,40,40,0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.trn-lb-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .2em;
  color: rgba(255,40,40,0.55);
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,40,40,0.08);
  flex-shrink: 0;
}
.trn-lb-my-pts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,40,40,0.08);
}
.trn-lb-empty {
  text-align: center;
  padding: 24px 0 14px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: .08em;
  font-style: italic;
}

/* Leaderboard rows */
.trn-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s;
  margin-bottom: 1px;
}
.trn-lb-row:hover {
  background: rgba(255,255,255,0.04);
}
.trn-lb-row-me {
  background: rgba(255,40,40,0.07);
  border-radius: 8px;
  margin-top: 4px;
  border: 1px solid rgba(255,40,40,0.12);
}
.trn-lb-row-unranked { opacity: 0.5; }
.trn-lb-pos {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.trn-lb-pos-me {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,40,40,0.8);
}
.trn-lb-name {
  flex: 1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.trn-lb-you {
  font-family: 'Orbitron', sans-serif;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .12em;
  color: #cc2222;
  background: rgba(255,40,40,0.15);
  border: 1px solid rgba(255,40,40,0.3);
  border-radius: 4px;
  padding: 2px 6px;
}
.trn-lb-pts {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.trn-lb-pts-label { font-size: 10px; font-weight: 600; opacity: 0.55; }
.trn-lb-pts-dim { font-size: 12px; color: rgba(255,255,255,0.25); }
.trn-lb-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,40,40,0.1), transparent);
  margin: 6px 4px;
}
.trn-lb-footer {
  font-size: 11px;
  color: rgba(255,255,255,0.18);
  text-align: center;
  margin-top: 12px;
  letter-spacing: .05em;
}

/* --- Right column --- */
.trn-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Points row (compact, 2-column: kill | win) --- */
.trn-pts-row-compact {
  display: flex;
  gap: 10px;
}
.trn-pts-col {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 8px 12px;
  transition: border-color 0.2s;
}
.trn-pts-col:hover {
  border-color: rgba(255,40,40,0.15);
}
.trn-pts-icon { font-size: 18px; opacity: 0.65; }
.trn-pts-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.trn-pts-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,0.7);
}
.trn-pts-val-gold { color: rgba(255,255,255,0.7); }
.trn-pts-col-mine {
  border-color: rgba(255,40,40,0.15);
  background: rgba(255,40,40,0.04);
}
.trn-pts-val-mine {
  color: #cc2222;
  font-size: 14px;
}
.trn-my-pts-bottom {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  width: 100%;
}

/* --- Info area (center of right column, fills space) --- */
.trn-info-area {
  flex: 1;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  min-height: 70px;
}

/* --- Badges --- */
.trn-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}
.trn-badge-pending {
  background: rgba(255,40,40,0.1);
  color: #cc2222;
  border: 1px solid rgba(255,40,40,0.25);
}
.trn-badge-open {
  background: rgba(59,210,110,0.12);
  color: #3cd26e;
  border: 1px solid rgba(59,210,110,0.35);
  box-shadow: 0 0 8px rgba(59,210,110,0.15);
}
.trn-badge-ended {
  background: rgba(120,120,120,0.08);
  color: rgba(255,255,255,0.35);
  border: 1px solid rgba(120,120,120,0.18);
}

/* --- Countdown --- */
.trn-countdown-wrap {
  text-align: center;
}
.trn-countdown-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 6px;
}
.trn-countdown {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.trn-countdown-live {
  color: inherit;
}
.trn-live-dot {
  color: #3cd26e;
  font-weight: 700;
}
.trn-queue-info {
  text-align: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,40,40,0.6);
  letter-spacing: .05em;
  margin-top: 4px;
}

/* --- Ended / Expired states --- */
.trn-ended {
  text-align: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  letter-spacing: .08em;
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}
.trn-expired {
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: rgba(232,64,64,0.55);
  border: 1px solid rgba(232,64,64,0.18);
  border-radius: 8px;
  padding: 10px 16px;
  background: rgba(232,64,64,0.04);
}

/* --- Action row (bottom-right) --- */
.trn-action-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

/* --- Actions --- */
.trn-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.trn-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s, transform 0.12s, box-shadow 0.25s;
  white-space: nowrap;
}
.trn-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }
.trn-btn:active { transform: translateY(0); filter: brightness(0.92); }
.trn-btn-register {
  background: linear-gradient(135deg, #6470f3 0%, #4752c4 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(88,101,242,0.35);
}
.trn-btn-register:disabled {
  background: linear-gradient(135deg, #4caf50, #2e7d32) !important;
  box-shadow: 0 4px 14px rgba(76,175,80,0.35) !important;
  opacity: 1 !important;
  cursor: default;
  color: #fff;
}
.trn-btn-play {
  background: linear-gradient(135deg, #3cdb76 0%, #24924e 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59,165,93,0.35);
}
.trn-btn-leave {
  background: transparent;
  border: 1px solid rgba(232,64,64,0.3) !important;
  color: rgba(232,64,64,0.8);
  font-size: 11px;
  padding: 7px 14px;
}
.trn-btn-leave:hover {
  background: rgba(232,64,64,0.08);
  filter: none;
  transform: none;
  border-color: rgba(232,64,64,0.5) !important;
}
.trn-btn-join {
  background: linear-gradient(135deg, #3cdb76 0%, #1a9e4e 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(59,219,118,0.35);
  font-size: 14px;
  letter-spacing: .1em;
  padding: 11px 24px;
}
.trn-btn-join:hover {
  box-shadow: 0 6px 24px rgba(59,219,118,0.5);
}
.trn-btn-join:disabled {
  background: rgba(59,219,118,0.12);
  color: rgba(59,219,118,0.4);
  box-shadow: none;
  cursor: default;
  transform: none;
}

.trn-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: .05em;
  color: #fff;
  line-height: 1.2;
}

/* --- Points table (2 cells, legacy) --- */
.trn-pts-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.trn-pts-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 6px;
}

/* ============================================================
   Tournament HUD Indicator (bottom-left, always on screen)
   ============================================================ */
/* ---- Tournament news banner (right-center) ---- */
/* ---- Tournament news card (Fortnite-style, body-level) ---- */
.trn-news-card {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;
  width: 210px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,180,0,0.18);
  animation: trnCardIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
  cursor: default;
}
.trn-news-card-close {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 10001;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 3px 5px;
  opacity: 0.7;
  transition: opacity 0.15s;
  border-radius: 4px;
}
.trn-news-card-close:hover { opacity: 1; background: rgba(255,255,255,0.12); }
@keyframes trnCardIn {
  from { opacity: 0; transform: translateY(-50%) translateX(60px) scale(0.94); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0)    scale(1); }
}
.trn-news-card-header {
  position: relative;
  height: 120px;
  background: linear-gradient(160deg, #1a0e00 0%, #3d1f00 40%, #cc2222 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.trn-news-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 40%, rgba(255,160,0,0.35) 0%, transparent 70%);
  pointer-events: none;
}
.trn-news-card-trophy {
  color: rgba(255,40,40,0.92);
  filter: drop-shadow(0 0 14px rgba(255,160,0,0.8));
  z-index: 1;
}
.trn-news-card-live {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,80,80,0.5);
  border-radius: 6px;
  padding: 3px 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #ff5050;
}
.trn-news-card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4040;
  animation: trnCardDotPulse 1.4s infinite;
  flex-shrink: 0;
}
@keyframes trnCardDotPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.trn-news-card-body {
  background: rgba(10,8,5,0.97);
  padding: 14px 14px 16px;
  border-top: 1px solid rgba(255,40,40,0.2);
}
.trn-news-card-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #ff4444;
  margin-bottom: 5px;
  opacity: 0.85;
}
.trn-news-card-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trn-news-card-desc {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.trn-news-card-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 9px 0;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #cc2222 0%, #e06000 100%);
  color: #fff;
  box-shadow: 0 3px 14px rgba(255,40,40,0.4);
  transition: filter 0.18s, transform 0.14s;
}
.trn-news-card-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ---- News card carousel ---- */
.trn-carousel {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.trn-carousel-slide {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.trn-carousel-arrow {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.trn-carousel-arrow:hover {
  background: rgba(255,40,40,0.2);
  color: #cc2222;
  border-color: rgba(255,40,40,0.4);
}
.trn-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 12px;
}
.trn-carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.trn-carousel-dot.active {
  background: #cc2222;
  transform: scale(1.3);
}

.trn-hud {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10,14,20,0.88);
  border: 1px solid rgba(59,210,110,0.35);
  border-radius: 10px;
  padding: 7px 10px 7px 8px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,210,110,0.1);
  animation: trnHudIn 0.3s ease;
}
@keyframes trnHudIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.trn-hud-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(59,210,110,0.15);
  border: 1.5px solid #3cd26e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3cd26e;
  flex-shrink: 0;
}
.trn-hud-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  letter-spacing: .04em;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trn-hud-join {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: rgba(59,210,110,0.2);
  color: rgba(255,255,255,0.35);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.trn-hud-join:not(:disabled) {
  background: linear-gradient(135deg, #3cdb76 0%, #24924e 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(59,165,93,0.4);
}
.trn-hud-join:not(:disabled):hover {
  filter: brightness(1.1);
  transform: scale(1.04);
}
.trn-hud-join:disabled { cursor: default; }

/* ============================================================
   Tournament Panel
   ============================================================ */
.tournament-panel {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 50;
  background: rgba(0,0,0,0.60);
  border: 1px solid rgba(100,200,255,0.25);
  border-radius: 12px;
  padding: 14px 18px;
  min-width: 210px;
  max-width: 260px;
  backdrop-filter: blur(8px);
}
.tournament-panel-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #64c8ff;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tournament-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tournament-status-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.tournament-status-badge {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}
.tournament-status-badge.pending { background: rgba(255,40,40,0.15); color: #cc2222; border: 1px solid rgba(255,40,40,0.3); }
.tournament-status-badge.open    { background: rgba(0,255,100,0.15); color: #00ff64; border: 1px solid rgba(0,255,100,0.3); }
.tournament-status-badge.ended   { background: rgba(180,0,0,0.2);   color: #ff4444; border: 1px solid rgba(255,0,0,0.3); }
.tournament-registrations {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}
.tournament-countdown-wrap {
  margin-bottom: 8px; text-align: center;
}
.tournament-countdown-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem; color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.tournament-countdown {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.5rem; font-weight: 800;
  color: #ffffff; letter-spacing: 0.05em;
}
.tournament-register-btn {
  width: 100%;
  padding: 7px 0;
  background: linear-gradient(135deg, #64c8ff 0%, #1a6fff 100%);
  border: none; border-radius: 6px; cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem; font-weight: 800; letter-spacing: 0.12em;
  color: #fff; text-transform: uppercase;
  transition: opacity 0.2s;
  margin-bottom: 6px;
}
.tournament-register-btn:hover { opacity: 0.85; }
.tournament-register-btn:disabled { opacity: 0.4; cursor: default; }
.tournament-play-btn {
  width: 100%;
  padding: 8px 0;
  background: linear-gradient(135deg, #00ff88 0%, #008844 100%);
  border: none; border-radius: 6px; cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem; font-weight: 800; letter-spacing: 0.15em;
  color: #fff; text-transform: uppercase;
  transition: opacity 0.2s, transform 0.1s;
  margin-bottom: 6px;
}
.tournament-play-btn:hover { opacity: 0.9; transform: scale(1.02); }
.tournament-leave-btn {
  width: 100%;
  padding: 5px 0;
  background: transparent;
  border: 1px solid rgba(255,80,80,0.4); border-radius: 6px; cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em;
  color: #ff6464; text-transform: uppercase;
  transition: background 0.2s;
  margin-bottom: 6px;
}
.tournament-leave-btn:hover { background: rgba(255,80,80,0.1); }
.tournament-queue-info {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem; color: rgba(255,255,255,0.5);
  text-align: center; margin-top: 2px;
}
.tournament-lb-wrap { margin-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px; }
.tournament-lb-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45); text-transform: uppercase; margin-bottom: 6px;
}
.tournament-lb-entry {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Rajdhani', sans-serif; font-size: 0.9rem; margin-bottom: 3px;
}
.tournament-lb-rank { min-width: 20px; font-size: 0.95rem; text-align: center; }
.tournament-lb-name { flex: 1; color: #eee; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.tournament-lb-pts  { color: #64c8ff; font-weight: 800; font-size: 0.95rem; }
.tournament-lb-pts-legend {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.7rem; color: rgba(255,255,255,0.28);
  text-align: center; margin-top: 6px; letter-spacing: 0.04em;
}

/* ============================================================
   Match Overlay (waiting / warmup / GO!)
   ============================================================ */
#matchOverlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex; justify-content: center;
  padding-top: 80px;
  z-index: 500;
  pointer-events: none;
}
#matchOverlay.hidden { display: none; }

.match-status-box {
  text-align: center;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,40,40,0.3);
  border-radius: 12px;
  padding: 20px 48px;
  backdrop-filter: blur(8px);
  animation: matchBoxPulse 2s ease-in-out infinite;
}
@keyframes matchBoxPulse {
  0%, 100% { border-color: rgba(255,40,40,0.3); box-shadow: 0 0 20px rgba(255,40,40,0.1); }
  50% { border-color: rgba(255,40,40,0.6); box-shadow: 0 0 30px rgba(255,40,40,0.2); }
}

.match-status-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,40,40,0.5);
  letter-spacing: 0.1em;
}

.match-sub-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
}

.match-timer {
  font-size: 2.5rem;
  color: #cc2222;
  display: block;
  margin-top: 4px;
}

.match-count {
  font-size: 1.8rem;
  color: #cc2222;
}

.match-go {
  font-size: 4rem;
  color: #00ff88;
  text-shadow: 0 0 30px rgba(0,255,136,0.6);
  animation: matchGoZoom 0.5s ease-out;
}
@keyframes matchGoZoom {
  from { transform: scale(2); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.freeze-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.freeze-number {
  font-family: 'Orbitron', sans-serif;
  font-size: 6rem;
  font-weight: 900;
  color: #cc2222;
  text-shadow:
    0 0 20px rgba(255,40,40,0.9),
    0 0 50px rgba(255,40,40,0.5),
    0 0 2px #000;
  display: block;
  line-height: 1;
  will-change: transform, opacity;
}

.freeze-number.freeze-pop {
  animation: freezePopAnim 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes freezePopAnim {
  0%   { transform: scale(2.2); opacity: 0; }
  60%  { transform: scale(0.92); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}

/* ---- Match Timer (top-center HUD) ---- */
#matchTimer {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 68, 68, 0.35);
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
  letter-spacing: 0.12em;
  z-index: 1000;
  pointer-events: none;
  transition: color 0.3s, border-color 0.3s, text-shadow 0.3s;
}
#matchTimer.timer-warning {
  color: #ff4444;
  border-color: rgba(255, 68, 68, 0.55);
  text-shadow: 0 0 12px rgba(255, 68, 68, 0.55);
}
#matchTimer.timer-critical {
  color: #ff3333;
  border-color: rgba(255, 50, 50, 0.7);
  text-shadow: 0 0 16px rgba(255, 50, 50, 0.7);
  animation: timerPulse 0.8s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateX(-50%) scale(1.06); }
}

/* ---- Match End Screen ---- */
#matchEndScreen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  z-index: 9999;
  backdrop-filter: blur(6px);
  animation: fadeInEnd 0.5s ease-out;
}
@keyframes fadeInEnd {
  from { opacity: 0; }
  to { opacity: 1; }
}

.match-end-box {
  background: linear-gradient(135deg, rgba(20, 10, 10, 0.95), rgba(10, 8, 8, 0.98));
  border: 1px solid rgba(255, 68, 68, 0.35);
  border-radius: 16px;
  padding: 32px 40px;
  min-width: 420px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 60px rgba(255, 68, 68, 0.15), 0 8px 32px rgba(0,0,0,0.6);
  text-align: center;
}
.match-end-box h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #cc2222;
  text-shadow: 0 0 20px rgba(255, 68, 68, 0.45);
  margin: 0 0 6px 0;
  letter-spacing: 0.12em;
}
.match-end-duration {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 18px;
}

/* Scoreboard table */
.match-end-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Rajdhani', sans-serif;
  margin-bottom: 16px;
}
.match-end-table th {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 140, 0, 0.25);
}
.match-end-table td {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.match-end-table tr:first-child td {
  color: #ffd700;
  font-weight: 700;
}
.match-end-table tr:nth-child(2) td {
  color: #c0c0c0;
}
.match-end-table tr:nth-child(3) td {
  color: #ff6666;
}
.match-end-table .end-self td {
  background: rgba(255, 68, 68, 0.12);
  color: #cc2222 !important;
  font-weight: 700;
}
.match-end-table .end-bot td:nth-child(2)::after {
  content: ' [BOT]';
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

.match-end-sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 12px;
  animation: subtitleBlink 1.5s ease-in-out infinite;
}
@keyframes subtitleBlink {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

#clickToResume {
  position: fixed; inset: 0;
  z-index: 800;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55);
  cursor: pointer;
}
#clickToResume.hidden { display: none; }
#clickToResume span {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.85);
  animation: ctrPulse 1.2s ease-in-out infinite;
}
@keyframes ctrPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* ═══════════════════════════════════════════
   PAUSE MENU
═══════════════════════════════════════════ */
/* ═══════════════ PAUSE MENU — slide from right ═══════════════ */
#pauseMenu {
  position: fixed; inset: 0;
  z-index: 10000;
  display: flex; align-items: stretch;
  pointer-events: none;
}
#pauseMenu.hidden { display: none; }

/* Left transparent area — click to resume */
.pause-click-area {
  flex: 1;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 0 0 48px 52px;
  pointer-events: all;
  cursor: pointer;
  background: transparent;
}
.pause-click-hint {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.75);
  user-select: none;
  animation: clickHintPulse 1.6s ease-in-out infinite;
}
.pause-click-hint svg { display: block; }
.pause-click-hint span {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}
@keyframes clickHintPulse {
  0%, 100% { opacity: 0.55; transform: translateX(0); }
  50%       { opacity: 1;    transform: translateX(6px); }
}

/* Right panel */
.pause-container {
  position: relative; z-index: 2;
  width: 320px; flex-shrink: 0;
  background: rgba(10,10,14,0.94);
  border-left: 1px solid rgba(255,255,255,0.08);
  padding: 32px 24px 28px;
  display: flex; flex-direction: column; gap: 0;
  box-shadow: -12px 0 60px rgba(0,0,0,0.7);
  pointer-events: all !important;
  animation: slidePanelIn 0.22s cubic-bezier(0.22,1,0.36,1) forwards;
  overflow-y: auto;
}
.pause-container * { pointer-events: all !important; }
@keyframes slidePanelIn {
  from { transform: translateX(100%); opacity: 0.4; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ─── panels ─── */
.pause-panel { display: none; flex-direction: column; gap: 10px; }
.pause-panel.active { display: flex; flex: 1; }

/* ─── Main panel ─── */
.pause-logo-row {
  text-align: left;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.pause-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem; font-weight: 900;
  letter-spacing: 0.3em;
  color: #fff;
  text-shadow: 0 0 24px rgba(255,120,0,0.6);
}

.pause-nav {
  display: flex; flex-direction: column; gap: 8px;
}

.pause-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.1s;
}
.pause-btn:hover {
  background: rgba(255,40,40,0.15);
  border-color: rgba(255,40,40,0.45);
  transform: translateX(4px);
}
.pause-btn svg { flex-shrink: 0; opacity: 0.8; }
.pause-btn-danger { border-color: rgba(220,50,50,0.25); }
.pause-btn-danger:hover {
  background: rgba(220,50,50,0.15);
  border-color: rgba(220,50,50,0.55);
}
.pause-btn-debug { border-color: rgba(0,180,255,0.25); }
.pause-btn-debug:hover:not(:disabled) {
  background: rgba(0,180,255,0.15);
  border-color: rgba(0,180,255,0.55);
}
.pause-btn-debug:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.pause-game-logo {
  margin-top: auto;
  padding-top: 20px;
  padding-bottom: 4px;
  text-align: center;
  letter-spacing: 0.08em;
  line-height: 1;
  user-select: none;
}
.pause-game-logo-block {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255,255,255,0.25);
}
.pause-game-logo-war {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: #cc2222;
  text-shadow: 0 0 18px rgba(255,40,40,0.6), 0 0 40px rgba(255,40,40,0.3);
}

/* ─── Settings panel ─── */
.pause-settings-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.pause-back-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px; padding: 6px 8px;
  color: #fff; cursor: pointer;
  display: flex; align-items: center;
  transition: background 0.15s;
}
.pause-back-btn:hover { background: rgba(255,255,255,0.15); }
.pause-settings-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem; font-weight: 700; letter-spacing: 0.15em;
  color: #fff;
}

/* tabs */
.ps-tabs {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
  align-items: stretch;
}
.ps-tabs .ps-tab { flex: none; justify-content: center; }
.ps-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  color: rgba(255,255,255,0.5);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.83rem; font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  letter-spacing: 0.04em;
}
.ps-tab svg { flex-shrink: 0; }
.ps-tab:hover { background: rgba(255,255,255,0.09); color: #fff; }
.ps-tab.active {
  background: rgba(255,40,40,0.15);
  border-color: rgba(255,40,40,0.55);
  color: #cc2222;
}

/* section labels */
.ps-section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.70rem; font-weight: 900;
  color: #cc2222;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0 0 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,40,40,0.08);
  text-shadow: 0 0 8px rgba(255,40,40,0.3);
}

/* Spacing between rows in controls/audio panels */
.ps-row + .ps-row { margin-top: 5px; }

/* panels */
.ps-panel { display: none; flex-direction: column; gap: 5px; overflow-y: auto; padding-right: 2px; }
.ps-panel.active { display: flex; }
.ps-panel::-webkit-scrollbar { width: 3px; }
.ps-panel::-webkit-scrollbar-track { background: transparent; }
.ps-panel::-webkit-scrollbar-thumb { background: rgba(255,40,40,0.35); border-radius: 2px; }

.ps-row {
  display: flex; align-items: center; justify-content: space-between;
  text-align: left;
  padding: 12px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  gap: 20px;
  transition: border-color 0.2s, background 0.2s;
}
.ps-row:hover { border-color: rgba(255,40,40,0.25); background: rgba(255,40,40,0.04); }
.ps-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem; font-weight: 700;
  color: rgba(255,255,255,0.85);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

/* action wrapper — groups controls on the right side */
.ps-row-action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* number input controls */
.ps-num-control {
  display: flex; align-items: center; gap: 0;
  border: 1px solid rgba(255,40,40,0.35);
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
}
.ps-num-btn {
  width: 30px; height: 32px;
  background: rgba(255,40,40,0.12);
  border: none;
  color: #cc2222;
  font-size: 1.1rem; font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ps-num-btn:hover { background: rgba(255,40,40,0.28); }
.ps-num-input {
  width: 54px; height: 32px;
  background: rgba(0,0,0,0.35);
  border: none;
  border-left: 1px solid rgba(255,40,40,0.2);
  border-right: 1px solid rgba(255,40,40,0.2);
  color: #cc2222;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.ps-num-input::-webkit-outer-spin-button,
.ps-num-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* audio slider controls */
.ps-control {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
  width: 200px;
}
.ps-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255,255,255,0.10);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: opacity 0.25s ease;
  min-width: 80px;
}
.ps-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  background: #cc2222; border-radius: 50%;
  cursor: pointer;
  box-shadow:
    0 0 6px rgba(255,40,40,0.6),
    0 0 14px rgba(255,40,40,0.3),
    0 0 20px rgba(255,40,40,0.15);
  transition: box-shadow 0.2s ease;
}
.ps-slider:hover::-webkit-slider-thumb {
  box-shadow:
    0 0 8px rgba(255,40,40,0.8),
    0 0 18px rgba(255,40,40,0.4),
    0 0 28px rgba(255,40,40,0.2);
}
.ps-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  background: #cc2222; border: none; border-radius: 50%;
  cursor: pointer;
  box-shadow:
    0 0 6px rgba(255,40,40,0.6),
    0 0 14px rgba(255,40,40,0.3),
    0 0 20px rgba(255,40,40,0.15);
}
.ps-slider::-moz-range-track {
  height: 6px;
  background: rgba(255,255,255,0.10);
  border-radius: 3px;
  border: none;
}
.ps-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; color: #cc2222;
  min-width: 28px; text-align: right;
  transition: opacity 0.25s ease;
}

/* toggle */
.ps-toggle { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.ps-toggle input { opacity: 0; width: 0; height: 0; }
.ps-toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 11px;
  cursor: pointer; transition: background 0.2s;
}
.ps-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: transform 0.2s;
}
.ps-toggle input:checked + .ps-toggle-slider { background: #cc2222; }
.ps-toggle input:checked + .ps-toggle-slider::before { transform: translateX(20px); }


/* keybinds */
.ps-keybinds-grid {
  display: flex; flex-direction: column;
  gap: 5px;
}
.kb-row {
  display: flex; align-items: center; justify-content: space-between;
  text-align: left;
  padding: 12px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  gap: 20px;
  transition: border-color 0.2s, background 0.2s;
}
.kb-row:hover { border-color: rgba(255,40,40,0.25); background: rgba(255,40,40,0.04); }
.kb-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem; font-weight: 700;
  color: rgba(255,255,255,0.85);
  flex: 1;
}
.kb-btn {
  min-width: 56px; padding: 5px 10px;
  background: rgba(20,20,20,0.6);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.64rem; font-weight: 700;
  cursor: pointer; text-align: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.kb-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); }
.kb-btn.listening {
  background: rgba(255,40,40,0.2);
  border-color: #cc2222;
  color: #cc2222;
  animation: kbPulse 0.6s ease-in-out infinite alternate;
}
@keyframes kbPulse {
  from { box-shadow: 0 0 4px rgba(255,40,40,0.4); }
  to   { box-shadow: 0 0 12px rgba(255,40,40,0.8); }
}
.kb-hint {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem; color: rgba(255,255,255,0.28);
  text-align: center; margin-top: 6px; padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* pause panel slide-in animation is defined above as slidePanelIn */

/* ---- Menu settings: audio sliders wider ---- */
.settings-panel .ps-control .ps-slider {
  min-width: 120px;
}

/* ---- Mute toggle button ---- */
.btn-mute {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
.btn-mute:hover {
  background: rgba(255,40,40,0.10);
  border-color: rgba(255,40,40,0.30);
  color: #cc2222;
}
.btn-mute .mute-icon-off { display: none; }
.btn-mute .mute-icon-on { display: block; }

.btn-mute.muted {
  background: rgba(255,60,60,0.10);
  border-color: rgba(255,60,60,0.25);
  color: #ff4444;
}
.btn-mute.muted .mute-icon-on { display: none; }
.btn-mute.muted .mute-icon-off { display: block; }
.btn-mute.muted:hover {
  background: rgba(255,60,60,0.18);
  border-color: rgba(255,60,60,0.40);
}

/* Dimmed slider state when muted */
.ps-row.audio-muted .ps-slider {
  opacity: 0.30;
  pointer-events: none;
}
.ps-row.audio-muted .ps-val {
  opacity: 0.30;
}

/* ═══════════════ REFERRALS TAB ═══════════════ */

.referrals-tab-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 2px;
}

/* My Section (code display / no-code prompt) */
.ref-my-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 18px 20px;
}

/* Code display */
.ref-code-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ref-code-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.ref-code-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #cc2222;
  text-transform: uppercase;
}

/* Link row */
.ref-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ref-link-input {
  flex: 1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 8px 12px;
  color: rgba(255,255,255,0.6);
  outline: none;
  min-width: 0;
}
.ref-copy-btn {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255,40,40,0.15);
  color: #cc2222;
  border: 1px solid rgba(255,40,40,0.3);
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.ref-copy-btn:hover {
  background: rgba(255,40,40,0.25);
  border-color: rgba(255,40,40,0.5);
}
.ref-copy-btn.copied {
  background: rgba(0,200,100,0.15);
  color: #00c864;
  border-color: rgba(0,200,100,0.3);
}

/* Stats row */
.ref-stats-row {
  display: flex;
  gap: 12px;
}
.ref-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 10px;
}
.ref-stat-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #cc2222;
  line-height: 1;
}
.ref-stat-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

/* Leaderboard section */
.ref-lb-section {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px 16px;
}
.ref-lb-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 10px;
}
.ref-lb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.ref-lb-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.ref-lb-entry.top3 {
  border-color: rgba(255,40,40,0.2);
  background: rgba(255,40,40,0.05);
}
.ref-lb-rank {
  width: 26px;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.ref-lb-entry.top3 .ref-lb-rank {
  color: #cc2222;
}
.ref-lb-name {
  flex: 1;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ref-lb-code {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.05em;
}
.ref-lb-count {
  font-weight: 800;
  color: #cc2222;
  min-width: 32px;
  text-align: right;
}

/* ═══════════════ REFERRAL POPUP ═══════════════ */

.referral-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.referral-popup.hidden {
  display: none;
}
.referral-popup-box {
  background: #141418;
  border: 1px solid rgba(255,40,40,0.2);
  border-radius: 14px;
  padding: 32px 36px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.referral-popup-box h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cc2222;
  margin: 0 0 6px;
}
.referral-popup-box p {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  margin: 0 0 18px;
}
.referral-popup-box input {
  width: 100%;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  outline: none;
  text-align: center;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.referral-popup-box input:focus {
  border-color: rgba(255,40,40,0.4);
}
.ref-popup-error {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  color: #ff4444;
  min-height: 18px;
  margin: 8px 0 4px;
}
.ref-popup-btns {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.ref-popup-apply {
  flex: 1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #cc2222;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
  cursor: pointer;
  transition: background 0.2s;
}
.ref-popup-apply:hover {
  background: #ffA030;
}
.ref-popup-skip {
  flex: 1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ref-popup-skip:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
}
