/* ══════════════════════════════════════════════════
   Rise League | Block Strike — Design System
   Theme: Black & White with Orange (T) / Blue (CT) accents
   ══════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1E1E1E;
  --bg-elevated: #1A1A1A;

  --text-primary: #FFFFFF;
  --text-secondary: #AAAAAA;
  --text-muted: #666666;

  --t-color: #FF6B00;
  --t-color-light: #FF8A33;
  --t-color-dark: #CC5500;
  --t-glow: rgba(255, 107, 0, 0.3);
  --t-bg: rgba(255, 107, 0, 0.08);
  --t-border: rgba(255, 107, 0, 0.25);

  --ct-color: #4A90D9;
  --ct-color-light: #6BA8E8;
  --ct-color-dark: #3A73AE;
  --ct-glow: rgba(74, 144, 217, 0.3);
  --ct-bg: rgba(74, 144, 217, 0.08);
  --ct-border: rgba(74, 144, 217, 0.25);

  --accent: #FF6B00;
  --danger: #E53935;
  --success: #4CAF50;

  --border-color: #222222;
  --border-radius: 16px;
  --border-radius-sm: 10px;
  --border-radius-xs: 6px;

  --navbar-height: 72px;
  --header-height: 56px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow-t: 0 0 30px rgba(255,107,0,0.15);
  --shadow-glow-ct: 0 0 30px rgba(74,144,217,0.15);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#app {
  height: 100%;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 3px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

/* ─── Screens ─── */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding-bottom: var(--navbar-height);
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateX(0);
}

.screen.screen-exit {
  opacity: 0;
  transform: translateX(-30px);
}

/* ─── Screen Header ─── */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  min-height: var(--header-height);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, transparent 100%);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.screen-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.btn-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-back:active {
  transform: scale(0.9);
  background: var(--bg-card-hover);
}

.btn-back svg {
  width: 22px;
  height: 22px;
}

/* ══════════════════════════════════════
   HOME SCREEN
   ══════════════════════════════════════ */

#screen-home {
  padding: 0;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, transparent 100%);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  color: white;
}

.logo-accent {
  color: var(--accent);
}

.home-content {
  flex: 1;
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Player Card ─── */
.player-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  overflow: hidden;
}

.player-card-glow {
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--t-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.player-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 15px var(--t-glow);
}

.avatar-placeholder svg {
  width: 28px;
  height: 28px;
}

.player-details {
  flex: 1;
}

.player-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.player-level-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--t-color-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 0 10px var(--t-glow);
}

.level-name {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.elo-display {
  position: relative;
  z-index: 1;
}

.elo-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.elo-value {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #FFFFFF 0%, #AAAAAA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 10px;
}

.elo-bar-container {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.elo-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--t-color-light) 100%);
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--t-glow);
}

.elo-range {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

/* ─── Stats Row ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 14px 10px;
  text-align: center;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Lobby Button ─── */
.btn-lobby {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  overflow: hidden;
  margin-top: 8px;
  transition: transform 0.2s;
}

.btn-lobby:active {
  transform: scale(0.97);
}

.btn-lobby-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--t-color-dark) 100%);
}

.btn-lobby-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: white;
  letter-spacing: 2px;
}

.btn-lobby-icon {
  width: 24px;
  height: 24px;
}

.btn-lobby-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shine 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes shine {
  0% { left: -100%; }
  50% { left: 150%; }
  100% { left: 150%; }
}

/* ══════════════════════════════════════
   LOBBY SCREEN
   ══════════════════════════════════════ */

.lobby-list {
  flex: 1;
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lobby-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 18px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.lobby-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--ct-color));
  opacity: 0;
  transition: opacity 0.3s;
}

.lobby-card:active {
  transform: scale(0.98);
  border-color: var(--accent);
}

.lobby-card:active::before {
  opacity: 1;
}

.lobby-card.lobby-full {
  opacity: 0.4;
  pointer-events: none;
}

.lobby-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.lobby-card-title {
  font-size: 16px;
  font-weight: 700;
}

.lobby-card-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.lobby-count-current {
  color: var(--accent);
  font-weight: 800;
}

.lobby-players-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}

.lobby-players-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--t-color-light));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lobby-players-preview {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.lobby-player-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  border-radius: 20px;
  padding: 4px 10px 4px 4px;
  font-size: 11px;
  font-weight: 500;
}

.lobby-player-level {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
}

/* ══════════════════════════════════════
   LOBBY ROOM
   ══════════════════════════════════════ */

.lobby-room-content {
  flex: 1;
  padding: 0 12px 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.team-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.team-t-badge {
  background: var(--t-bg);
  border: 1px solid var(--t-border);
  color: var(--t-color);
}

.team-ct-badge {
  background: var(--ct-bg);
  border: 1px solid var(--ct-border);
  color: var(--ct-color);
}

.team-icon-wrapper {
  width: 24px;
  height: 24px;
}

.team-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xs);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s;
  animation: slotAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes slotAppear {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.player-slot.slot-empty {
  border-style: dashed;
  color: var(--text-muted);
  justify-content: center;
}

.slot-level {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.slot-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-ready {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.slot-ready.ready {
  background: var(--success);
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
}

/* ─── Ready Button ─── */
.btn-ready {
  display: block;
  margin: 16px auto 32px;
  width: calc(100% - 32px);
  max-width: 448px;
  height: 52px;
  background: linear-gradient(135deg, var(--success) 0%, #388E3C 100%);
  border: none;
  border-radius: var(--border-radius);
  color: white;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
}

.btn-ready:active {
  transform: scale(0.97);
}

.btn-ready.ready-confirmed {
  background: linear-gradient(135deg, #333 0%, #222 100%);
  box-shadow: none;
}

/* ══════════════════════════════════════
   READY CHECK / TIMER
   ══════════════════════════════════════ */

#screen-ready {
  padding-bottom: 0;
  background: var(--bg-primary);
  z-index: 100;
}

.ready-screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.ready-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 4px;
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.timer-container {
  position: relative;
  width: 200px;
  height: 200px;
}

.timer-circle {
  position: relative;
  width: 100%;
  height: 100%;
}

.timer-svg {
  width: 100%;
  height: 100%;
}

.timer-bg {
  transition: stroke 0.3s;
}

.timer-progress {
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 72px;
  font-weight: 900;
  color: white;
  transition: color 0.3s, transform 0.3s;
}

.timer-number.timer-danger {
  color: var(--danger);
  animation: timerPulse 0.5s ease infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
}

.ready-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 1px;
  animation: fadeInUp 0.6s ease 0.3s both;
}

/* ══════════════════════════════════════
   CAPTAIN PICK
   ══════════════════════════════════════ */

#screen-captain-pick {
  padding-bottom: 0;
}

.captain-pick-content {
  flex: 1;
  padding: 0 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.captains-display {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: start;
}

.captain-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.captain-frame {
  padding: 12px;
  border-radius: var(--border-radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.frame-t {
  background: var(--t-bg);
  border: 1.5px solid var(--t-border);
  box-shadow: var(--shadow-glow-t);
}

.frame-ct {
  background: var(--ct-bg);
  border: 1.5px solid var(--ct-border);
  box-shadow: var(--shadow-glow-ct);
}

.captain-avatar-wrapper {
  position: relative;
}

.captain-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
}

.captain-t .captain-avatar {
  background: linear-gradient(135deg, var(--t-color), var(--t-color-dark));
  border: 2px solid var(--t-color-light);
}

.captain-ct .captain-avatar {
  background: linear-gradient(135deg, var(--ct-color), var(--ct-color-dark));
  border: 2px solid var(--ct-color-light);
}

.captain-info {
  text-align: center;
}

.captain-name {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.captain-level .level-badge-small {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
}

.captain-team-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.captain-team-player {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-card);
  border-radius: var(--border-radius-xs);
  font-size: 11px;
  font-weight: 500;
  animation: playerPickIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes playerPickIn {
  from { opacity: 0; transform: scale(0.8) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.vs-badge {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-muted);
  align-self: center;
  margin-top: 30px;
  letter-spacing: 2px;
}

/* Pick Timer Bar */
.pick-timer-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
}

.pick-timer-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
}

#pick-timer-value {
  font-weight: 800;
  font-size: 16px;
}

.pick-timer-progress-bg {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.pick-timer-progress {
  height: 100%;
  background: var(--ct-color);
  border-radius: 2px;
  transition: width 1s linear, background 0.3s;
  width: 100%;
}

.pick-timer-progress.picking-t {
  background: var(--t-color);
}

/* Available Players */
.available-players {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.pick-player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.pick-player-card:active {
  transform: scale(0.97);
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.pick-player-card.picked {
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.95);
}

.pick-player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  border: 1.5px solid var(--border-color);
}

.pick-player-info {
  flex: 1;
}

.pick-player-name {
  font-size: 13px;
  font-weight: 600;
}

.pick-player-elo {
  font-size: 11px;
  color: var(--text-muted);
}

.pick-player-level {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: white;
}

/* ══════════════════════════════════════
   MAP BAN
   ══════════════════════════════════════ */

#screen-map-ban {
  padding-bottom: 0;
}

.map-ban-content {
  flex: 1;
  padding: 0 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ban-turn-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-card);
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-weight: 600;
}

.ban-captain-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ct-color);
}

.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.map-card {
  position: relative;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  border: 1.5px solid var(--border-color);
  aspect-ratio: 16/10;
}

.map-card:active {
  transform: scale(0.96);
}

.map-card-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-card-placeholder {
  font-size: 28px;
  opacity: 0.3;
}

.map-card-name {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  background: rgba(0,0,0,0.5);
  padding: 2px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.map-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.map-card.banned {
  pointer-events: none;
}

.map-card.banned .map-card-overlay {
  opacity: 1;
}

.map-card-banned-icon {
  font-size: 36px;
  color: var(--danger);
}

.map-card-banned-by {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
}

.map-card-banned-by.banned-by-ct {
  background: var(--ct-color);
  border-color: var(--ct-color-light);
}

.map-card-banned-by.banned-by-t {
  background: var(--t-color);
  border-color: var(--t-color-light);
}

.map-card.selected {
  border-color: var(--success);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.map-card.selected::after {
  content: '✓ ВЫБРАНА';
  position: absolute;
  inset: 0;
  background: rgba(76, 175, 80, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--success);
  letter-spacing: 1px;
}

/* Map card filling last row */
.map-card.map-card-last {
  grid-column: 1 / -1;
  aspect-ratio: 32/10;
}

/* ══════════════════════════════════════
   MODE VOTE
   ══════════════════════════════════════ */

#screen-mode-vote {
  padding-bottom: 0;
}

.mode-vote-content {
  flex: 1;
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.vote-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.mode-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font);
  color: var(--text-primary);
}

.mode-card:active {
  transform: scale(0.97);
}

.mode-card.mode-selected {
  border-color: var(--accent);
  background: var(--t-bg);
  box-shadow: var(--shadow-glow-t);
}

.mode-icon {
  width: 48px;
  height: 48px;
}

.mode-icon svg {
  width: 100%;
  height: 100%;
}

.mode-name {
  font-size: 16px;
  font-weight: 700;
}

.mode-votes-display {
  font-size: 12px;
  color: var(--text-muted);
}

.mode-vote-count {
  font-weight: 700;
  color: var(--accent);
}

.vote-progress-container {
  width: 100%;
}

.vote-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.vote-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s;
}

.vote-progress-text {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════
   MATCH INFO
   ══════════════════════════════════════ */

/* Match info padding managed by default screen classes */

.match-info-content {
  flex: 1;
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.match-info-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px 18px;
  overflow: hidden;
}

.match-info-glow {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--t-glow) 0%, transparent 70%);
  pointer-events: none;
}

.match-info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.match-info-header h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
}

.match-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
}

.match-detail-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.match-detail-value {
  font-size: 15px;
  font-weight: 700;
}

.match-name {
  color: var(--accent);
  font-family: monospace;
  font-size: 16px !important;
}

.match-password {
  color: var(--success);
  font-family: monospace;
  font-size: 18px !important;
  letter-spacing: 2px;
}

.match-teams-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.match-team-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.match-team-players {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.match-team-player {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 0;
}

.match-player-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-primary);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.match-captain-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  background: var(--t-bg);
  border: 1px solid var(--t-border);
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.match-captain-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.btn-close-match {
  margin-top: auto;
}

/* ══════════════════════════════════════
   BOTTOM NAVBAR
   ══════════════════════════════════════ */

.navbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--navbar-height);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar.hidden {
  display: none;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.nav-item.active {
  color: var(--text-primary);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

.nav-icon {
  width: 22px;
  height: 22px;
}

.nav-item-center {
  position: relative;
  top: -6px;
}

.nav-center-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--t-color-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--t-glow);
  transition: transform 0.2s;
}

.nav-item-center:active .nav-center-btn {
  transform: scale(0.9);
}

.nav-item-center .nav-icon {
  color: white;
}

.nav-item-center span {
  color: var(--accent);
  font-weight: 600;
}

/* ══════════════════════════════════════
   UTILITIES & ANIMATIONS
   ══════════════════════════════════════ */

.fade-in {
  animation: fadeIn 0.5s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Level color utilities */
.level-1 { background: #6B6B6B !important; }
.level-2 { background: #8B8B8B !important; }
.level-3 { background: #4CAF50 !important; }
.level-4 { background: #66BB6A !important; }
.level-5 { background: #FFC107 !important; }
.level-6 { background: #FF9800 !important; }
.level-7 { background: #FF5722 !important; }
.level-8 { background: #F44336 !important; }
.level-9 { background: #E91E63 !important; }
.level-10 { background: #9C27B0 !important; }

/* Haptic-like visual feedback */
@keyframes hapticShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.haptic {
  animation: hapticShake 0.15s ease-in-out;
}

/* ─── Header Logo Image ─── */
.header-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ─── Splash Screen ─── */
.splash-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.splash-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  animation: logo-pulse 2s infinite ease-in-out, logo-entrance 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  filter: drop-shadow(0 0 20px rgba(255, 107, 0, 0.4));
}

.splash-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.splash-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text-primary);
  margin-bottom: 30px;
  opacity: 0;
  animation: title-entrance 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.splash-accent {
  color: var(--t-color);
  text-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
}

.splash-loader-bar {
  width: 160px;
  height: 4px;
  background: #1a1a1a;
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: fade-in-loader 0.5s ease 0.6s forwards;
}

.splash-loader-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--t-color), var(--t-color-light));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--t-color);
  animation: load-progress 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

@keyframes logo-entrance {
  0% {
    transform: scale(0.3) rotate(-15deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes logo-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(255, 107, 0, 0.4));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 35px rgba(255, 107, 0, 0.7));
  }
}

@keyframes title-entrance {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fade-in-loader {
  to {
    opacity: 1;
  }
}

@keyframes load-progress {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

/* ─── Active Matches Button (Green) ─── */
.btn-active-matches {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  overflow: hidden;
  margin-top: 12px;
  transition: transform 0.2s;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.15);
}

.btn-active-matches:active {
  transform: scale(0.97);
}

.btn-active-matches-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--success) 0%, #2E7D32 100%);
}

.btn-active-matches-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: white;
  letter-spacing: 1.5px;
}

.btn-active-matches-icon {
  width: 22px;
  height: 22px;
}

.btn-active-matches-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shine 3s ease-in-out infinite;
  z-index: 1;
}

/* Glowing Badge */
.active-matches-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #E53935;
  color: white;
  font-size: 11px;
  font-weight: 900;
  border: 2px solid white;
  box-shadow: 0 0 10px rgba(229, 57, 53, 0.6);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.active-matches-badge.glow {
  animation: badge-pulse 1.5s infinite alternate;
}

@keyframes badge-pulse {
  from {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 6px rgba(229, 57, 53, 0.6);
  }
  to {
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 16px rgba(229, 57, 53, 1);
  }
}

/* ─── Active Matches Screen ─── */
.active-matches-content {
  padding: 16px;
}

.active-matches-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Diagonal Layout Match Card */
.active-match-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.active-match-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}

/* Diagonal gradient split background overlay */
.active-match-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: var(--map-gradient, linear-gradient(135deg, #1a1a2e, #16213e)) no-repeat center;
  background-size: cover;
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}

/* Real diagonal line divider */
.active-match-card-divider {
  position: absolute;
  top: 0;
  right: 42%;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  transform: skewX(-20deg);
  z-index: 1;
  opacity: 0.4;
  pointer-events: none;
}

.active-match-card-info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 60%;
}

.active-match-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: white;
}

.active-match-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.active-match-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.active-match-detail-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.active-match-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
}

.btn-complete-match {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--danger) 0%, #B71C1C 100%);
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-complete-match:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(229, 57, 53, 0.2);
}

.active-match-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-secondary);
}

.active-match-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ══════════════════════════════════════
   PROFILE SCREEN & SETTINGS MODAL
   ══════════════════════════════════════ */
.btn-settings {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-settings:active {
  transform: scale(0.9) rotate(45deg);
  color: var(--accent);
  background: var(--bg-card-hover);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--bg-card) 0%, #1c1c1e 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  margin: 16px;
  box-shadow: var(--shadow-sm);
}

.profile-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #333 0%, #111 100%);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
}

.profile-level-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  color: #0A0A0A;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-details h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-elo-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
}

.profile-elo-label {
  color: var(--text-secondary);
}

.profile-elo-val {
  font-weight: 700;
  color: var(--accent);
}

.profile-level-name {
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-section-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin: 12px 16px 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0 16px;
}

.stats-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 107, 0, 0.18);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 107, 0, 0.06);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.stats-card:hover {
  border-color: rgba(255, 107, 0, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 107, 0, 0.12);
}

.stats-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.stats-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 16px 24px;
}

.history-empty {
  text-align: center;
  padding: 30px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
  font-size: 14px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  position: relative;
  overflow: hidden;
}

.history-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  z-index: 2;
}

.history-item.win::before {
  background: var(--success);
}

.history-item.loss::before {
  background: var(--danger);
}

.history-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-item-map {
  font-size: 15px;
  font-weight: 700;
}

.history-item-mode {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.history-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.history-item-outcome {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.win .history-item-outcome {
  color: var(--success);
}

.loss .history-item-outcome {
  color: var(--danger);
}

.history-item-elo {
  font-size: 12px;
  font-weight: 700;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.settings-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.settings-input-wrapper {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 12px;
}

.settings-input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 15px;
  font-family: inherit;
}

.settings-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-settings-save {
  margin-top: 10px;
  width: 100%;
}

/* ─── Level Badges Image System ─── */
.level-badge-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.profile-level-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  object-fit: contain;
}

.lobby-player-level-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  margin-right: 4px;
  flex-shrink: 0;
}

.slot-level-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  margin-right: 8px;
  flex-shrink: 0;
}

.slot-level-img-small {
  width: 16px;
  height: 16px;
  object-fit: contain;
  margin-right: 6px;
  flex-shrink: 0;
}

.level-badge-small-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.pick-player-level-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ─── Leaderboard / Rating CSS ─── */
.podium-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin: 24px 16px 16px;
  height: 175px;
}

.podium-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 8px 8px;
  position: relative;
  width: 100px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.podium-spot.spot-1 {
  height: 165px;
  border-color: rgba(255, 107, 0, 0.35);
  box-shadow: var(--shadow-glow-t);
  z-index: 2;
}

.podium-spot.spot-2 {
  height: 140px;
  z-index: 1;
}

.podium-spot.spot-3 {
  height: 130px;
  z-index: 1;
}

.podium-crown {
  font-size: 18px;
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.podium-avatar-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
}

.spot-1 .podium-avatar-wrapper {
  width: 52px;
  height: 52px;
}

.podium-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2a2c 0%, #111 100%);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: white;
}

.spot-1 .podium-avatar {
  border-color: var(--accent);
  font-size: 22px;
}

.podium-level-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.podium-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}

.podium-elo {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
}

.podium-place {
  position: absolute;
  bottom: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 11px;
  color: #0A0A0A;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.spot-1 .podium-place {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}
.spot-2 .podium-place {
  background: linear-gradient(135deg, #C0C0C0, #808080);
}
.spot-3 .podium-place {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.leaderboard-list-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 24px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 16px 24px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  transition: transform 0.2s;
}

.leaderboard-item.is-me {
  border-color: var(--accent);
  background: rgba(255, 107, 0, 0.03);
}

.leaderboard-player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.leaderboard-rank {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  width: 20px;
}

.leaderboard-item.is-me .leaderboard-rank {
  color: var(--accent);
}

.leaderboard-avatar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.leaderboard-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #252528;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: white;
}

.leaderboard-level-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.leaderboard-name-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.leaderboard-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-clan-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(255, 107, 0, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
}

.leaderboard-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.leaderboard-elo {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.leaderboard-wins {
  font-size: 10px;
  color: var(--text-muted);
}

/* ─── Clans CSS ─── */
.clans-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 16px 24px;
}

.clan-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  gap: 12px;
}

.clan-card-my {
  border-color: rgba(255, 107, 0, 0.25);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255,107,0,0.02) 100%);
  box-shadow: var(--shadow-sm);
}

.clan-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clan-logo-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-sm);
  background: #252528;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 1px solid var(--border-color);
}

.clan-title-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.clan-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clan-name {
  font-size: 16px;
  font-weight: 800;
  color: white;
}

.clan-tag-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(255,107,0,0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.clan-points {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.clan-points span {
  color: white;
  font-weight: 700;
}

.clan-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background: rgba(0,0,0,0.15);
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255,255,255,0.02);
}

.clan-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.clan-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.clan-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: white;
}

.clan-action-row {
  display: flex;
  justify-content: flex-end;
}

.btn-clan-join {
  background: var(--accent);
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
}

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

.btn-clan-leave {
  background: transparent;
  border: 1px solid var(--danger);
  border-radius: var(--border-radius-sm);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  color: var(--danger);
  cursor: pointer;
  transition: transform 0.2s;
}

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

.clan-not-qualified {
  font-size: 11px;
  color: var(--danger);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── HLTV Ranks and Clan Roster ─── */
.clan-card {
  position: relative;
}

.clan-rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
}

.clan-rank-badge.rank-1 {
  border-color: #FFD700;
  color: #FFD700;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.2);
}
.clan-rank-badge.rank-2 {
  border-color: #C0C0C0;
  color: #C0C0C0;
}
.clan-rank-badge.rank-3 {
  border-color: #CD7F32;
  color: #CD7F32;
}

.clan-roster-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 16px;
  margin-bottom: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

.clan-members-roster {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.clan-member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.clan-member-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clan-member-role-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255, 107, 0, 0.15);
  color: var(--accent-color);
}

.clan-member-role-badge.leader {
  background: rgba(255, 215, 0, 0.15);
  color: #FFD700;
}

.clan-member-elo {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-create-clan-trigger {
  display: flex;
  align-items: center;
  background: rgba(255, 107, 0, 0.15);
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-create-clan-trigger:hover {
  background: var(--accent-color);
  color: #000;
}

/* ─── Clan Image Logo and Details screen ─── */
.clan-logo-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
}

.clan-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.btn-back {
  background: transparent;
  border: none;
  color: #FFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: transform 0.2s;
}

.btn-back:active {
  transform: scale(0.9);
}

#clan-details-logo {
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.profile-name-clan-tag {
  font-size: 10px;
  font-weight: 800;
  color: #FF6B00;
  border: 1px solid rgba(255, 107, 0, 0.4);
  background: rgba(255, 107, 0, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  display: inline-block;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.history-item {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  transition: transform 0.2s, border-color 0.2s;
  z-index: 1;
}

.history-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(11, 8, 6, 0.95) 0%, rgba(11, 8, 6, 0.75) 100%);
  z-index: -1;
}

.history-item-map,
.history-item-mode,
.history-item-outcome,
.history-item-elo,
.history-item-score {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.7);
}

.history-item-score {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}

/* Waiting List Styles */
.waiting-list-section {
  width: 100%;
  margin-top: 20px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  box-sizing: border-box;
}

.waiting-list-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.waiting-players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.waiting-player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xs);
  padding: 8px 12px;
}

.player-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-info-left img {
  width: 22px;
  height: 22px;
}

.btn-fill-bots {
  background: rgba(255, 107, 0, 0.05);
  border: 1px dashed var(--accent);
  color: var(--accent);
  border-radius: var(--border-radius-xs);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-fill-bots:hover {
  background: rgba(255, 107, 0, 0.1);
  border-style: solid;
}

/* ─── Banned Screen Styling ─── */
.banned-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle at center, #1b0a0a 0%, var(--bg-primary) 70%);
}

.banned-shield {
  position: relative;
  width: 100px;
  height: 100px;
  background: rgba(229, 57, 53, 0.1);
  border: 2px solid var(--danger);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 0 30px rgba(229, 57, 53, 0.2);
  animation: pulse-red 2s infinite;
}

.banned-shield-inner {
  font-size: 48px;
}

.banned-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.banned-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 30px;
  max-width: 320px;
}

.banned-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
}

.banned-card-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.banned-card-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.banned-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.banned-value {
  font-size: 14px;
  font-weight: 600;
  color: #FF8A8A;
  text-align: left;
  line-height: 1.4;
}

.banned-support {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 320px;
}

.btn-banned-support {
  background: var(--danger);
  border-color: #ff5252;
}

.btn-banned-support:active {
  background: #c62828 !important;
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 20px rgba(229, 57, 53, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(229, 57, 53, 0.4);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 20px rgba(229, 57, 53, 0.2);
  }
}

/* ─── Telegram Only Screen Styling ─── */
.telegram-only-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle at center, #0f1015 0%, var(--bg-primary) 80%);
}

.tg-only-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  animation: float-logo 3s ease-in-out infinite;
}

.tg-only-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tg-only-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.tg-only-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 30px;
  max-width: 290px;
}

.tg-only-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
}

.tg-only-card-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.btn-tg-only {
  background: #2481cc; /* Telegram Blue */
  border-color: #3ca2e0;
}

.btn-tg-only:active {
  background: #1a659e !important;
}

.tg-only-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes float-logo {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* ─── Maintenance Screen Styling ─── */
.maintenance-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle at center, #0f1015 0%, var(--bg-primary) 80%);
}

.maintenance-icon {
  font-size: 64px;
  margin-bottom: 24px;
  animation: wrench-wiggle 2.5s ease-in-out infinite;
}

.maintenance-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.maintenance-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 30px;
  max-width: 290px;
}

.maintenance-progress {
  width: 200px;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.maintenance-progress-bar {
  height: 100%;
  width: 60%;
  background: var(--accent-color);
  border-radius: 3px;
  animation: progress-indet 2s ease-in-out infinite;
}

.maintenance-status {
  font-size: 11px;
  color: var(--text-muted);
}

@keyframes wrench-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

@keyframes progress-indet {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

@keyframes pulse-glow-red {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 51, 51, 0.8);
  }
  50% {
    box-shadow: 0 4px 25px rgba(255, 0, 0, 0.4);
    border-color: rgba(255, 51, 51, 1);
  }
}

@keyframes blink-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}








