:root {
  color-scheme: dark;
  --bg: #0a0a12;
  --bg-gradient: linear-gradient(135deg, #0a0a12 0%, #05050a 100%);
  --panel-bg: rgba(15, 20, 30, 0.85);
  --panel-border: rgba(100, 200, 255, 0.15);
  --panel-glow: rgba(80, 180, 255, 0.1);
  --text: #f0f8ff;
  --text-muted: rgba(240, 248, 255, 0.6);
  --accent: #00e0ff;
  --accent-glow: rgba(0, 224, 255, 0.4);
  --accent-secondary: #7b68ee;
  --success: #00ff9d;
  --warning: #ffb74d;
  --danger: #ff5252;
  --info: #00b8ff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(20, 25, 40, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-gradient);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

canvas {
  display: block;
}

/* ===== OVERLAY & MODALS ===== */
.overlay {
  z-index: 1001; /* ???? ??????? */
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000; /* ???? ????????? ???? */
  background: rgba(5, 10, 20, 0.85);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay.visible {
  display: flex;
}

.modal {
  z-index: 1001; 
  width: min(1000px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  overflow: hidden;
  border-radius: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(0, 224, 255, 0.05), transparent);
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.modal h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.icon-button {
  width: 44px; 
  height: 44px; 
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 24px; 
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-button:hover {
  background: rgba(14, 22, 36, 0.98);
  border-color: rgba(102, 212, 255, 0.72);
  transform: translateY(-1px);
}

/* ===== SETTINGS UI ===== */
.settings-shell {
  display: flex; 
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  min-height: 600px;
  max-height: 80vh;
}

.settings-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 15, 25, 0.5);
  overflow-x: auto;
  min-height: 72px;
  align-items: center;
}

.settings-tab {
  position: relative;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.settings-tab.active {
  color: var(--accent);
  background: rgba(10, 16, 27, 0.92);
  border: 1px solid transparent;
  box-shadow: none;
}

.settings-tab.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.settings-panels {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.settings-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.settings-panel.active {
  display: block;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.settings-card {
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.settings-card:hover {
  border-color: rgba(0, 224, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 224, 255, 0.1);
  transform: translateY(-2px);
}

.settings-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-card label {
  display: block;
  margin-bottom: 16px;
}

.settings-card label span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.settings-card input,
.settings-card select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(120, 167, 212, 0.22);
  background: rgba(9, 14, 24, 0.88);
  color: var(--text);
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 46px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(158, 225, 255, 0.95) 50%),
    linear-gradient(135deg, rgba(158, 225, 255, 0.95) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.settings-card input:focus,
.settings-card select:focus {
  outline: none;
  border-color: rgba(79, 196, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(0, 178, 255, 0.16);
  background: rgba(13, 20, 34, 0.96);
  transform: translateY(-1px);
}

.settings-card input[type="range"] {
  height: 6px;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  appearance: none;
}

.settings-card input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 12px var(--accent-glow);
}

.settings-card input[type="color"] {
  height: 40px;
  padding: 4px;
  cursor: pointer;
}

/* ===== HUD ELEMENTS ===== */
#hud {
  position: fixed;
  top: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  min-width: 240px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.row:last-child {
  border-bottom: none;
}

.row span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.row strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.pilot-meta {
  font-size: 12px;
  color: var(--accent);
  margin: 4px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Mode value coloring */
#modeValue.mode-pvp { color: var(--danger); text-shadow: 0 0 8px rgba(255,82,82,0.45); }
#modeValue.mode-pve { color: #a6ff00; text-shadow: 0 0 12px rgba(166,255,0,0.35); }

/* ===== PROFILE DOCK ===== */
#profileDock {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 110;
  min-width: 220px;
}

.profile-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

.profile-toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 224, 255, 0.2);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 16px;
}

.profile-identity {
  flex: 1;
  text-align: left;
}

#profileDockNick {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

#profileDockMeta {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* ===== ONLINE BADGE ===== */
.online-badge {
  position: fixed;
  top: 24px;
  right: 320px;
  padding: 12px 16px; 
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 8px; 
  z-index: 100;
  min-width: auto;
  width: auto;
}

.online-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap; 
}

#onlineCount {
  font-size: 16px;
  font-weight: 700;
  color: var(--success);
  text-shadow: 0 0 12px rgba(0, 255, 157, 0.4);
}

.online-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

#onlineCount {
  font-size: 16px;
  font-weight: 700;
  color: var(--success);
  text-shadow: 0 0 12px rgba(0, 255, 157, 0.4);
}

/* ===== CHAT PANEL ===== */
.chat-panel {
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: 360px;
  z-index: 100;
}

.chat-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.chat-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.voice-hud-status {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(0, 224, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(0, 224, 255, 0.2);
}

.chat-messages {
  height: 140px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 8px;
}

.chat-message {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-message strong {
  color: var(--accent);
  font-weight: 600;
}

#chatInput {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
}

#chatInput:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

/* ===== KILL FEED ===== */
.kill-feed {
  position: fixed;
  top: 208px;
  right: 24px;
  width: 320px;
  z-index: 100;
  pointer-events: none;
}

.kill-entry {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 82, 82, 0.1), rgba(255, 107, 107, 0.05));
  border: 1px solid rgba(255, 82, 82, 0.2);
  color: #ffb3b3;
  font-size: 14px;
  font-weight: 600;
  animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(10px);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== RADAR ===== */
#radar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(0, 224, 255, 0.2);
  background: rgba(10, 15, 25, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ===== BOOST BAR ===== */
#boostBar {
  position: fixed;
  left: 50%;
  top: 146px;
  transform: translateX(-50%);
  width: min(340px, calc(100vw - 48px));
  z-index: 108;
}

.boost-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warning);
}

.boost-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.boost-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--warning), #ff6b35);
  border-radius: 3px;
  transition: width 0.1s ease;
  box-shadow: 0 0 12px rgba(255, 183, 77, 0.4);
}

/* ===== STATUS ===== */
#status {
  position: fixed;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  backdrop-filter: blur(10px);
  z-index: 100;
  white-space: nowrap;
  max-width: 300px;
  text-align: center;
}

/* ===== INTERACTION PROMPT ===== */
.interaction-prompt {
  position: fixed;
  left: 50%;
  bottom: 180px;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(0, 224, 255, 0.1), rgba(123, 104, 238, 0.1));
  border: 1px solid rgba(0, 224, 255, 0.3);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  backdrop-filter: blur(10px);
  z-index: 100;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== BASE HUD ===== */
#baseHud {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 18px 20px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  z-index: 109;
  width: min(520px, calc(100vw - 220px));
}

.base-compass {
  position: relative;
  height: 72px;
  padding: 0 4px;
}

.base-compass-track {
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.base-compass-marker {
  position: absolute;
  top: 0;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
}

.compass-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.compass-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #041018;
  box-shadow: 0 0 12px var(--accent-glow);
}

.compass-distance {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text);
}

.base-marker .compass-dot {
  background: var(--accent);
}

.base-marker .compass-distance {
  color: var(--accent);
}

.cinema-marker .compass-title {
  color: #8de8ff;
}

.cinema-marker .compass-dot {
  background: #8de8ff;
  box-shadow: 0 0 12px rgba(96, 220, 255, 0.55);
}

.cinema-marker .compass-distance {
  color: #8de8ff;
}

/* ===== CORNER ACTIONS ===== */
.corner-actions {
  position: fixed;
  right: 24px;
  bottom: 212px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 105;
}

.fab {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  border: 1px solid rgba(120, 167, 212, 0.24);
  background: rgba(10, 16, 27, 0.92);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, background 0.22s ease;
  position: relative;
  overflow: hidden;
}

.fab::before {
  display: none;
}

.fab:hover {
  border-color: rgba(102, 212, 255, 0.72);
  background: rgba(14, 22, 36, 0.98);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(2, 10, 24, 0.45);
}

.fab svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  position: relative;
  z-index: 1;
}

.fab.secondary {
  background: rgba(10, 16, 27, 0.92);
}

.fab.secondary:hover {
  background: rgba(14, 22, 36, 0.98);
}

/* ===== CROSSHAIR ===== */
#crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 1000;
}

body.overlay-open #crosshair {
  opacity: 0;
}

#crosshair::before,
#crosshair::after {
  content: '';
  position: absolute;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  transition: opacity 0.15s ease;
}

#crosshair::before,
#crosshair::after {
  content: '';
  position: absolute;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ===== COPYRIGHT ===== */
.copyright {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 50;
}

.copyright a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.copyright a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .settings-shell {
    grid-template-columns: 1fr;
  }
  
  .settings-tabs {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px;
  }
  
  .settings-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  #hud {
    top: 12px;
    left: 12px;
  }
  
  #profileDock {
    top: 12px;
    right: 12px;
  }
  
  .online-badge {
    top: 12px;
    right: 240px;
  }
  
  .chat-panel {
    left: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
  
  .kill-feed {
    top: 232px;
    right: 12px;
    width: calc(100vw - 24px);
  }
  
  #radar {
    right: 12px;
    bottom: 12px;
  }
  
  .corner-actions {
    right: 12px;
    bottom: 188px;
  }
  
  #baseHud {
    top: 12px;
    padding: 12px 16px;
  }

  #boostBar {
    top: 132px;
  }
  
  .modal {
  z-index: 1001; 
    width: calc(100vw - 24px);
    max-height: calc(100vh - 48px);
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 12px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 24px var(--accent-glow);
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}

.muted {
  color: var(--text-muted) !important;
}

.glow {
  animation: glow 2s ease-in-out infinite;
}

.primary,
.secondary,
.profile-menu-item,
.auth-tabs .tab,
.icon-button {
  appearance: none;
  border: 1px solid rgba(120, 167, 212, 0.24);
  background: rgba(10, 16, 27, 0.92);
  color: var(--text);
  border-radius: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.primary,
.secondary,
.profile-menu-item {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
}

.primary:hover,
.secondary:hover,
.profile-menu-item:hover,
.auth-tabs .tab:hover,
.icon-button:hover {
  border-color: rgba(102, 212, 255, 0.72);
  background: rgba(14, 22, 36, 0.98);
  box-shadow: 0 12px 24px rgba(1, 8, 20, 0.34);
  transform: translateY(-1px);
}

.profile-menu-item.danger {
  color: #ffb7b7;
}

.auth-form,
.profile-edit-form {
  display: grid;
  gap: 14px;
}

.auth-form label,
.profile-edit-form label {
  display: grid;
  gap: 8px;
}

.auth-form span,
.profile-edit-form span,
.voice-meter span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-form input,
.profile-edit-form input,
#chatInput {
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(120, 167, 212, 0.22);
  background: rgba(9, 14, 24, 0.88);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.auth-form input:focus,
.profile-edit-form input:focus,
#chatInput:focus {
  outline: none;
  border-color: rgba(79, 196, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(0, 178, 255, 0.16);
  background: rgba(13, 20, 34, 0.96);
  transform: translateY(-1px);
}

.auth-tabs,
.menu-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-tabs {
  margin-bottom: 18px;
}

.auth-tabs .tab {
  flex: 1 1 0;
  padding: 12px 16px;
}

.auth-tabs .tab.active,
.settings-tab.active {
  border-color: transparent;
  box-shadow: none;
}

.settings-tab.active {
  background: rgba(10, 16, 27, 0.92);
}

.profile-card {
  display: grid;
  gap: 18px;
  padding: 4px 0;
}

.profile-title,
.profile-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(12, 21, 35, 0.95);
  border: 1px solid rgba(120, 167, 212, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.profile-twitter {
  color: var(--accent);
  font-size: 14px;
}

.auth-message {
  min-height: 22px;
  margin-top: 14px;
  color: #ffb7b7;
  font-size: 13px;
  opacity: 0.96;
}

/* Center modal notifications and make them visually distinct */
.auth-message {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 64px);
  margin: 14px 32px;
  padding: 10px 14px;
  background: rgba(10, 16, 22, 0.55);
  border-radius: 10px;
  box-shadow: none;
}

.auth-message.success {
  color: #8ff7a7;
}

.auth-message.error {
  color: #ffb7b7;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(8, 14, 23, 0.96);
  border: 1px solid rgba(120, 167, 212, 0.22);
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
}

.base-modal #authView,
.base-modal #profileView {
  padding: 24px 32px 32px;
}

.base-modal .auth-form {
  max-width: 100%;
  gap: 18px;
}

.base-modal .auth-form label,
.base-modal .profile-edit-form label {
  gap: 10px;
}

.base-modal .auth-form input,
.base-modal .profile-edit-form input {
  min-height: 50px;
}

.lobby-shell {
  max-width: 640px;
}

.lobby-list {
  display: grid;
  gap: 14px;
  padding: 20px 24px 24px;
}

.lobby-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(17, 23, 36, 0.82);
  border: 1px solid rgba(120, 167, 212, 0.16);
}

.lobby-row-main {
  display: grid;
  gap: 6px;
}

.lobby-row .meta {
  color: var(--text-muted);
  font-size: 14px;
}

.lobby-score {
  min-width: 56px;
  text-align: right;
}

.twitter-link {
  color: var(--accent);
  text-decoration: none;
}

.twitter-link:hover {
  text-decoration: underline;
}

.health-bar {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  width: min(340px, calc(100vw - 48px));
  z-index: 108;
}

.health-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(223, 244, 255, 0.86);
}

.health-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(120, 167, 212, 0.14);
}

.health-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #56d364, #7bff85);
  transition: width 0.12s linear, background 0.12s linear;
  box-shadow: 0 0 16px rgba(76, 255, 134, 0.24);
}

.voice-meter {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.voice-meter-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.voice-meter-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2dc3ff, #5ff2c9);
  transition: width 0.08s linear;
}

.voice-keybind-list {
  margin-top: 16px;
}

.keybind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.keybind-row:last-child {
  border-bottom: none;
}

.keybind-row span {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.bind-button {
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(120, 167, 212, 0.24);
  background: rgba(10, 16, 27, 0.92);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.bind-button:hover {
  border-color: rgba(102, 212, 255, 0.72);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(1, 8, 20, 0.28);
}

.guide-card {
  padding: 28px;
}

.guide-hero {
  margin-bottom: 22px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.guide-block {
  min-height: 100%;
  padding: 18px;
  border-radius: 18px;
  background: rgba(15, 20, 32, 0.82);
  border: 1px solid rgba(120, 167, 212, 0.14);
}

.guide-block h4 {
  margin-bottom: 14px;
  font-size: 18px;
}

.guide-list {
  display: grid;
  gap: 10px;
}

.guide-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.guide-key {
  min-width: 64px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(120, 167, 212, 0.22);
  background: rgba(9, 14, 24, 0.88);
  color: var(--accent);
  text-align: center;
  font-weight: 700;
}

.guide-line {
  margin-top: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}










