/* Design Tokens & Theme Variables */
:root {
  --bg: #000000;
  --bg-gradient: radial-gradient(circle at 10% 20%, rgba(255, 214, 10, 0.08) 0%, transparent 50%),
                 radial-gradient(circle at 90% 80%, rgba(88, 86, 214, 0.1) 0%, transparent 50%);
  --surface: rgba(30, 30, 30, 0.4);
  --surface-high: rgba(45, 45, 45, 0.6);
  --surface-highest: rgba(60, 60, 60, 0.8);
  --input-bg: rgba(255, 255, 255, 0.05);

  --text-primary: #F2F2F7;
  --text-secondary: rgba(235, 235, 245, 0.6);
  --text-black: #000000;

  --neon: #FFD60A;
  --neon-glow: rgba(255, 214, 10, 0.2);
  --neon-glow-high: rgba(255, 214, 10, 0.4);

  --green: #32D74B;
  --green-bg: rgba(50, 215, 75, 0.12);
  --red: #FF453A;
  --red-bg: rgba(255, 69, 58, 0.12);

  --border-gloss: rgba(255, 255, 255, 0.15);
  --border-gloss-hover: rgba(255, 255, 255, 0.3);
  --shadow-glass: inset 0 1px 1px rgba(255, 255, 255, 0.15), 
                   inset 0 -1px 1px rgba(0, 0, 0, 0.2),
                   0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glass-hover: inset 0 1px 2px rgba(255, 255, 255, 0.25), 
                         0 12px 48px rgba(0, 0, 0, 0.5);
  --modal-loading-text: var(--neon);

  /* Apple Glassmorphism Initial Avatar variables (Dark Mode defaults) */
  --glass-op: 0.28;
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-text: #ffffff;
  --glass-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.25), 
                   0 4px 10px rgba(0, 0, 0, 0.25);
  
  /* Dynamic themed translucent glass gradients */
  --avatar-grad-0: linear-gradient(135deg, rgba(255, 69, 58, var(--glass-op)) 0%, rgba(255, 42, 104, var(--glass-op)) 100%);
  --avatar-grad-1: linear-gradient(135deg, rgba(255, 149, 0, var(--glass-op)) 0%, rgba(255, 214, 10, var(--glass-op)) 100%);
  --avatar-grad-2: linear-gradient(135deg, rgba(10, 132, 255, var(--glass-op)) 0%, rgba(90, 200, 250, var(--glass-op)) 100%);
  --avatar-grad-3: linear-gradient(135deg, rgba(50, 215, 75, var(--glass-op)) 0%, rgba(52, 199, 89, var(--glass-op)) 100%);
  --avatar-grad-4: linear-gradient(135deg, rgba(94, 92, 230, var(--glass-op)) 0%, rgba(191, 90, 242, var(--glass-op)) 100%);
  --avatar-grad-5: linear-gradient(135deg, rgba(0, 199, 190, var(--glass-op)) 0%, rgba(100, 210, 255, var(--glass-op)) 100%);
}

[data-theme="light"] {
  --bg: #f2f2f7;
  --bg-gradient: radial-gradient(circle at 10% 20%, rgba(255, 149, 0, 0.15) 0%, transparent 50%),
                 radial-gradient(circle at 90% 80%, rgba(88, 86, 214, 0.1) 0%, transparent 50%);
  --surface: rgba(255, 255, 255, 0.5);
  --surface-high: rgba(255, 255, 255, 0.7);
  --surface-highest: rgba(255, 255, 255, 0.9);
  --input-bg: rgba(255, 255, 255, 0.6);

  --text-primary: #1c1c1e;
  --text-secondary: rgba(60, 60, 67, 0.65);
  --text-black: #000000;

  --neon: #FF9500;
  --neon-glow: rgba(255, 149, 0, 0.2);
  --neon-glow-high: rgba(255, 149, 0, 0.4);

  --green: #34C759;
  --green-bg: rgba(52, 199, 89, 0.15);
  --red: #FF3B30;
  --red-bg: rgba(255, 59, 48, 0.15);

  --border-gloss: rgba(255, 255, 255, 0.6);
  --border-gloss-hover: rgba(255, 255, 255, 0.9);
  --shadow-glass: inset 0 1px 1px rgba(255, 255, 255, 0.8), 
                   inset 0 -1px 1px rgba(0, 0, 0, 0.05),
                   0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glass-hover: inset 0 1px 2px rgba(255, 255, 255, 1), 
                         0 12px 48px rgba(0, 0, 0, 0.12);
  --modal-loading-text: var(--text-primary);

  /* Apple Glassmorphism Initial Avatar variables (Light Mode overrides) */
  --glass-op: 0.65;
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-text: #ffffff;
  --glass-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.65), 
                   0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  padding-top: 16px;
  padding-bottom: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Floating Liquid Glass Background Spheres */
body::before, body::after {
  content: "";
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.5s ease, filter 0.5s ease;
}

[data-theme="light"] body::before, [data-theme="light"] body::after {
  opacity: 0.15;
  filter: blur(140px);
}

@media (max-width: 768px) {
  [data-theme="light"] body::before, [data-theme="light"] body::after {
    opacity: 0.08;
    filter: blur(120px);
  }
}

body::before {
  background: radial-gradient(circle, var(--neon) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation: floatOrbital1 24s infinite ease-in-out;
}

body::after {
  background: radial-gradient(circle, #5856D6 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation: floatOrbital2 30s infinite ease-in-out;
}

@keyframes floatOrbital1 {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(120px, 80px) scale(1.15); }
  66% { transform: translate(-40px, 140px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes floatOrbital2 {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-100px, -120px) scale(0.9); }
  66% { transform: translate(60px, -60px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Scrollbar behaviors */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Shared Premium Styles */
.neon-glow {
  box-shadow: var(--shadow-glass), 0 8px 32px var(--neon-glow);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.neon-glow:hover {
  box-shadow: var(--shadow-glass-hover), 0 12px 48px var(--neon-glow-high);
}

.neon-glow-active:active {
  transform: scale(0.97);
  opacity: 0.85;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.card {
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid var(--border-gloss);
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-gloss-hover);
  box-shadow: var(--shadow-glass-hover);
}

/* Pulsating Animation for Active Indicator */
@keyframes pulse {
  0% {
    opacity: 0.3;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }

  100% {
    opacity: 0.3;
    transform: scale(0.9);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--neon);
  border-radius: 50%;
  animation: pulse 1.2s infinite ease-in-out;
}

/* Layout Screens & View Manager */
.screen-view {
  width: 100%;
  max-width: 600px;
  padding: 72px 20px 16px;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

/* Top App Bar - styled with glassmorphism */
header.app-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border-bottom: 1px solid var(--border-gloss);
  padding: 0 16px;
  z-index: 999;
}

header.app-bar h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  text-align: center;
}

/* Position back buttons in header */
#app-back-btn, #history-back-btn {
  position: absolute !important;
  left: 16px !important;
  top: 10px !important;
}

/* Align theme toggle button with the new header */
#theme-toggle {
  top: 10px !important;
  right: 16px !important;
}

/* Title Logo styles */
.title-logo {
  height: 52px;
  width: 52px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
  border-radius: 50%;
  border: 1.5px solid var(--border-gloss);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

/* Dashboard header & title styles */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  width: 100%;
  gap: 16px;
}

.dashboard-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.dashboard-title-container {
  min-width: 0;
  flex: 1;
}

#dashboard-title {
  font-size: clamp(18px, 5.5vw, 26px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  word-break: break-word;
  transition: font-size 0.2s ease;
}

@media (max-width: 480px) {
  .dashboard-header {
    padding-right: 36px; /* Optimized to maximize space while avoiding theme toggle overlap */
    margin-bottom: 16px;
    gap: 12px;
  }
  
  .dashboard-header-left {
    gap: 10px;
  }
  
  #view-dashboard .title-logo {
    width: 44px;
    height: 44px;
  }
  
  #inline-back-dashboard {
    width: 36px !important;
    height: 36px !important;
  }
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.icon-btn:hover {
  background-color: var(--surface-high);
  color: var(--text-primary);
}

.profile-card {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--surface-high);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--surface-highest);
  color: var(--text-secondary);
}

/* Typography Helpers */
.title-lg {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.subtitle-md {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.label-caps {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Court Setup Screen 1 */
.court-card-wrapper {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.court-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
}

.court-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.court-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.court-title-area .material-symbols-outlined {
  color: var(--text-secondary);
  font-size: 20px;
  transition: color 0.2s ease;
}

.court-title-area span:not(.material-symbols-outlined) {
  font-size: 14px;
  font-weight: 700;
}

.court-name-text {
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 2px 6px;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.court-modal-input {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.court-modal-input:focus {
  border-color: var(--neon) !important;
  box-shadow: 0 0 12px rgba(255, 214, 10, 0.2);
  background: rgba(255, 255, 255, 0.1) !important;
}

.court-name-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.court-name-edit-btn {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  opacity: 0.4;
  transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
  border-radius: 50%;
}

.court-name-wrapper:hover .court-name-edit-btn {
  opacity: 0.8;
}

.court-name-edit-btn:hover {
  opacity: 1 !important;
  color: var(--neon);
  transform: scale(1.1);
}

.court-card.active {
  border-color: rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.2);
}

.court-card.active .court-title-area .material-symbols-outlined {
  color: var(--neon);
}

/* Compact overrides inside Court Card Grid */
.court-card .switch {
  width: 44px;
  height: 24px;
}

.court-card .slider:before {
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
}

.court-card input:checked+.slider:before {
  transform: translateX(20px);
}

.court-card .add-players-btn {
  height: 38px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-primary);
}

.court-card .add-players-btn .material-symbols-outlined {
  font-size: 16px;
}

/* Custom Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 32px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--surface-highest);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 32px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: var(--text-primary);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--neon);
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: #FFFFFF;
}

/* Add players inline button */
.add-players-btn {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: none;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.add-players-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  transform: scale(0.98);
}

/* Sticky Bottom Action bar */
.sticky-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--surface-highest);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-top: 1px solid var(--border-gloss);
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  justify-content: center;
}

.sticky-bottom-bar-content {
  width: 100%;
  max-width: 600px;
}

.btn-primary {
  width: 100%;
  height: 60px;
  border-radius: 30px;
  border: none;
  background-color: var(--text-primary);
  color: var(--bg);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 14px var(--neon-glow);
}

.btn-primary:disabled {
  background-color: var(--surface-high);
  color: var(--text-secondary);
  cursor: not-allowed;
  box-shadow: none !important;
  opacity: 0.6;
}

/* Player Entry Screen 2 */
.horizontal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.tab-chip {
  flex: 0 0 calc(50% - 5px); /* 2 columns on mobile by default */
  min-width: 120px;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background-color: var(--surface);
  border: 1px solid var(--surface-high);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .tab-chip {
    height: 38px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 12px;
  }
}

@media (min-width: 480px) {
  .tab-chip {
    flex: 0 0 calc(33.333% - 7px); /* 3 columns on tablet/desktop */
  }
}

.tab-chip.active {
  background-color: var(--surface-high);
  border-color: var(--neon);
  color: var(--text-primary);
  box-shadow: 0px 4px 12px var(--neon-glow);
}

.tab-chip.completed:not(.active) {
  border: 1px dashed rgba(74, 222, 128, 0.45);
  background-color: rgba(74, 222, 128, 0.05);
}

.tab-chip.completed.active {
  border: 1px solid var(--neon);
  background-color: rgba(74, 222, 128, 0.08);
}

.tab-progress-badge {
  font-size: 10px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--neon);
  background: rgba(255, 214, 10, 0.12);
  border: 1px solid rgba(255, 214, 10, 0.35);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(255, 214, 10, 0.1);
  transition: all 0.2s ease;
}

.tab-chip.active .tab-progress-badge {
  color: var(--text-primary);
  background: rgba(255, 214, 10, 0.2);
  border-color: rgba(255, 214, 10, 0.45);
}

.player-input-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.player-input-row {
  position: relative;
  width: 100%;
}

.player-input-row i {
  position: absolute;
  left: 16px;
  top: 20px;
  color: var(--text-secondary);
  font-size: 22px;
}

.player-input-row input {
  width: 100%;
  height: 64px;
  border-radius: 12px;
  border: none;
  background-color: var(--input-bg);
  padding-left: 52px;
  padding-right: 16px;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  transition: border-bottom 0.2s ease;
}

.player-input-row input::placeholder {
  color: var(--text-secondary);
}

.player-input-row input:focus {
  outline: none;
  border-bottom: 2px solid var(--neon);
}

.extra-players-row {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.extra-players-row button {
  flex: 1;
  height: 52px;
  border-radius: 26px;
  border: 2px solid var(--neon);
  background: transparent;
  color: var(--neon);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.extra-players-row button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Dashboard Screen 3 */
.round-chip-row {
  margin-top: 8px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.round-chip {
  flex: 0 0 calc(25% - 5px); /* 4 columns on mobile by default */
  min-width: 70px;
  height: 36px;
  padding: 0 8px;
  border-radius: 18px;
  background-color: var(--surface);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

@media (max-width: 360px) {
  .round-chip {
    flex: 0 0 calc(33.333% - 4px); /* 3 columns on very small mobile screens */
  }
}

@media (min-width: 480px) {
  .round-chip {
    flex: 0 0 calc(16.666% - 5px); /* 6 columns on tablet/desktop */
  }
}

.round-chip.viewing {
  background-color: var(--neon);
  color: var(--text-black);
}

.round-chip.viewing .material-symbols-outlined {
  color: var(--text-black) !important;
}

.round-chip.active-round:not(.viewing) {
  border: 1px solid var(--neon);
  background-color: var(--surface-high);
}

.round-chip.completed:not(.viewing) {
  border: 1px dashed rgba(74, 222, 128, 0.45);
  background-color: rgba(74, 222, 128, 0.05);
}

.round-chip.completed.active-round:not(.viewing) {
  border: 1px solid var(--neon);
  background-color: rgba(74, 222, 128, 0.08);
}

.match-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.match-card-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-chip {
  padding: 6px 12px;
  border-radius: 6px;
  background-color: var(--surface-highest);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.match-card-score {
  color: var(--neon);
  font-size: 18px;
  font-weight: 800;
}

.match-card-score-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.match-card-score-diff {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface-highest);
  border: 1px solid var(--border-gloss);
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.match-card-score-diff::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--text-secondary);
  opacity: 0.6;
}


.match-teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.match-team.team-2 {
  align-items: flex-end;
  text-align: right;
}

.match-team h4 {
  color: var(--neon);
  font-size: 16px;
  font-weight: 700;
}

.match-team p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
}

.vs-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--input-bg);
  color: var(--text-secondary);
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 12px;
}

.match-action-btn {
  width: 100%;
  height: 52px;
  border-radius: 12px;
  border: none;
  background-color: var(--neon);
  color: var(--text-black);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

/* Next Round Banner */
.next-round-banner {
  background: var(--surface);
  border: 1px solid var(--border-gloss);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.next-round-banner:hover {
  transform: translateY(-2px);
  border-color: var(--border-gloss-hover);
  box-shadow: var(--shadow-glass-hover);
}

.next-round-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--neon) 0%, rgba(255, 214, 10, 0.2) 100%);
}

.next-round-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.next-round-header .material-symbols-outlined {
  color: var(--neon);
  font-size: 20px;
  animation: pulse 2s infinite ease-in-out;
}

.next-round-label {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--neon);
  text-transform: uppercase;
}

.next-round-matchup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-high);
  border: 1px solid var(--border-gloss);
  border-radius: 16px;
  padding: 16px 20px;
  gap: 12px;
  box-shadow: inset 0px 2px 8px rgba(0, 0, 0, 0.05);
}

.next-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  text-align: center;
  position: relative;
}

.next-team span {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.2px;
  transition: color 0.2s ease;
}

.next-team .next-amp {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.6;
  text-transform: uppercase;
  margin: 1px 0;
}

.next-vs {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 8px;
  flex-shrink: 0;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
}

.next-vs::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--neon);
  opacity: 0.2;
  animation: pulse 2.5s infinite ease-in-out;
}


/* Leaderboard Section */
.leaderboard-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  margin-bottom: 16px;
}

.leaderboard-title-row i {
  color: var(--neon);
  font-size: 20px;
}

.leaderboard-title-row h3 {
  font-size: 20px;
  font-weight: 700;
}

.leaderboard-card {
  padding: 0;
  overflow: hidden;
}

.leaderboard-header {
  padding: 18px 24px;
  background-color: var(--surface-highest);
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-gloss);
}

.leaderboard-header span {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.leaderboard-header-rank {
  width: 48px;
  text-align: center;
}

.leaderboard-header-name {
  flex: 1;
}

.leaderboard-header-tot {
  width: 80px;
  text-align: right;
}

.leaderboard-item {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.leaderboard-item:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.leaderboard-item.first-place {
  background: linear-gradient(90deg, rgba(195, 244, 0, 0.03) 0%, transparent 100%);
  border-left: 3px solid var(--neon);
  padding-left: 21px;
}

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

.leaderboard-rank {
  width: 48px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-secondary);
}

.leaderboard-item.first-place .leaderboard-rank {
  color: var(--neon);
}

.leaderboard-name {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.leaderboard-score-chip {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-width: 44px;
  text-align: center;
}

.score-positive {
  background-color: var(--green-bg);
  color: var(--green);
}

.score-negative {
  background-color: var(--red-bg);
  color: var(--red);
}

.score-neutral {
  background-color: var(--surface-highest);
  color: var(--text-primary);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  padding: 20px;
}

.modal-content {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border-gloss);
  border-radius: 28px;
  padding: 32px 24px;
  box-shadow: var(--shadow-glass-hover);
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  backdrop-filter: blur(40px) saturate(220%);
  -webkit-backdrop-filter: blur(40px) saturate(220%);
}

.modal-open .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* AI Auto-Fill loading state & light-theme overrides */
.ai-processing-spinner {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 2px dashed var(--neon);
  border-radius: 50%;
  animation: spin 4s linear infinite;
}

.ai-processing-icon {
  font-size: 32px;
  color: var(--neon);
  animation: pulse 1.2s infinite ease-in-out;
}

.ai-processing-title {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--modal-loading-text);
  text-align: center;
}

/* Strategy Selector Cards */
.strategy-card {
  flex: 1;
  border: 1px solid var(--surface-high);
  background: rgba(255, 255, 255, 0.02);
  padding: 14px 10px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-glass);
}

.strategy-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.strategy-card.active {
  border-color: var(--neon);
  background: rgba(255, 214, 10, 0.06);
  box-shadow: 0 0 15px rgba(255, 214, 10, 0.15);
}

.strategy-card .material-symbols-outlined {
  color: var(--text-secondary);
  font-size: 22px;
  transition: color 0.25s ease;
}

.strategy-card.active .material-symbols-outlined {
  color: var(--neon);
  text-shadow: 0 0 8px rgba(255, 214, 10, 0.4);
}

.strategy-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.strategy-card-desc {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.3;
}

[data-theme="light"] .modal-overlay {
  background-color: rgba(255, 255, 255, 0.45);
}

[data-theme="light"] .modal-content {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.modal-drag-bar {
  display: none;
}

.modal-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.modal-title-area h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-match-details-badge {
  background-color: var(--surface);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-block;
  margin-bottom: 8px;
}

.modal-steppers-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-team-score-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--surface);
  border: 1px solid var(--surface-high);
  border-radius: 24px;
  padding: 16px;
}

.modal-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stepper-value-badge {
  font-size: 26px;
  font-weight: 800;
  font-family: monospace;
  color: var(--text-primary);
  min-width: 40px;
  text-align: center;
  user-select: none;
}

.stepper-value-badge.winning {
  color: var(--neon);
  font-size: 28px;
}

.score-grid-container-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gloss);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

[data-theme="light"] .score-grid-container-card {
  background-color: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.score-selector-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-grid-selector {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.score-pill {
  height: 34px;
  border-radius: 10px;
  background-color: var(--surface-high);
  border: 1px solid var(--border-gloss);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .score-pill {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.score-pill:hover {
  border-color: var(--neon);
  background-color: var(--surface-highest);
  transform: translateY(-1px);
}

.score-pill:active {
  transform: scale(0.92);
}

.score-pill.active {
  background: var(--neon) !important;
  color: #000000 !important;
  border-color: var(--neon) !important;
  font-weight: 900;
  box-shadow: 0 0 12px var(--neon-glow);
}

.score-pill.winner-pill.active {
  background: #ffd60a !important;
  color: #000000 !important;
  border-color: #ffd60a !important;
  box-shadow: 0 0 14px rgba(255, 214, 10, 0.6);
}

.modal-stepper-team-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-stepper-team-info span {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.modal-stepper-team-info h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.stepper-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stepper-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--input-bg);
  border: 1px solid var(--surface-highest);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stepper-btn:active {
  transform: scale(0.92);
}

.winner-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 214, 10, 0.3);
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.1) 0%, rgba(255, 149, 0, 0.2) 100%);
  color: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.winner-btn .material-symbols-outlined {
  font-size: 20px;
  font-variation-settings: 'FILL' 0, 'wght' 400;
  transition: all 0.3s ease;
}

.winner-btn:hover {
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.2) 0%, rgba(255, 149, 0, 0.3) 100%);
  border-color: var(--neon);
  box-shadow: 0 0 15px rgba(255, 214, 10, 0.2);
  transform: translateY(-2px);
}

.winner-btn:hover .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 500;
  transform: scale(1.1);
}

.winner-btn:active {
  transform: scale(0.92);
}

.stepper-value {
  width: 60px;
  text-align: center;
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  text-align-last: center;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
}

.stepper-value::-webkit-outer-spin-button,
.stepper-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper-value.winning {
  color: var(--neon);
}

.stepper-value option {
  background-color: var(--surface);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.modal-vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -6px 0;
  position: relative;
  z-index: 10;
}

.modal-vs-divider-line {
  flex: 1;
  height: 1px;
  background-color: var(--surface-high);
}

.modal-vs-divider-badge {
  padding: 8px;
  background-color: var(--surface-highest);
  border-radius: 50%;
  border: 4px solid var(--surface);
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
}

.modal-live-feedback {
  width: 100%;
  border-radius: 16px;
  padding: 12px 16px;
  background-color: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.feedback-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.feedback-value {
  font-size: 16px;
  font-weight: 800;
}

.feedback-positive {
  color: var(--green);
}

.feedback-positive .feedback-value {
  color: var(--green);
}

.feedback-negative {
  color: var(--red);
}

.feedback-negative .feedback-value {
  color: var(--red);
}

/* --- CLOUD SYNC & TOURNAMENT CONTROL STYLES --- */
.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--surface);
  border: 1px solid var(--surface-high);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sync-status span {
  font-size: 14px;
}

.status-syncing {
  color: var(--text-secondary);
}

.status-syncing span {
  animation: pulse 1.2s infinite ease-in-out;
  color: var(--text-secondary);
}

.status-saved {
  color: var(--green);
  border-color: rgba(74, 222, 128, 0.2);
}

.status-saved span {
  color: var(--green);
}

.status-error {
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.2);
}

.status-error span {
  color: var(--red);
}

.sync-text {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.5px;
}

@media (max-width: 480px) {
  .sync-text {
    display: none;
  }

  .sync-status {
    padding: 6px 8px;
  }
}

/* --- STAGE 2 FINAL STAGE DESIGN STYLES --- */
:root {
  --gold: #ffd700;
  --gold-glow: rgba(255, 215, 0, 0.15);
  --silver: #e0e0e0;
  --silver-glow: rgba(224, 224, 224, 0.12);
  --bronze: #cd7f32;
  --bronze-glow: rgba(205, 127, 50, 0.12);
}

.tier-card-gold {
  border-color: var(--gold) !important;
  box-shadow: 0px 4px 20px var(--gold-glow);
}

.tier-card-gold .tier-header-title {
  color: var(--gold);
}

.tier-card-silver {
  border-color: var(--silver) !important;
  box-shadow: 0px 4px 16px var(--silver-glow);
}

.tier-card-silver .tier-header-title {
  color: var(--silver);
}

.tier-card-bronze {
  border-color: var(--bronze) !important;
  box-shadow: 0px 4px 16px var(--bronze-glow);
}

.tier-card-bronze .tier-header-title {
  color: var(--bronze);
}

.tier-players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.tier-player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: var(--input-bg);
  border-radius: 8px;
  font-size: 14px;
}

.tier-player-item .seed-badge {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 800;
  color: var(--text-secondary);
}

.tier-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
}

/* --- KANBAN PLAYER ENTRY BOARD SYSTEM --- */
#view-player-entry.screen-view {
  max-width: 1100px;
  /* Expands to fit side-by-side columns on tablet/desktop! */
  transition: max-width 0.4s ease;
}

.player-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
  align-items: start;
  width: 100%;
}

.board-column {
  background-color: var(--surface);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.board-column.active-drop-target {
  border-color: var(--neon);
  box-shadow: 0px 0px 16px var(--neon-glow);
}

.board-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--surface-high);
  padding-bottom: 10px;
}

.board-column-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.board-column-title .material-symbols-outlined {
  font-size: 18px;
  color: var(--neon);
}

.capacity-badge {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.capacity-badge.valid {
  background-color: var(--green-bg);
  color: var(--green);
}

.capacity-badge.invalid {
  background-color: var(--red-bg);
  color: var(--red);
}

.capacity-badge.bench {
  background-color: var(--surface-highest);
  color: var(--text-secondary);
}

.player-drag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 80px;
  /* Allows drag over even if empty */
  position: relative;
}

.player-drag-item {
  display: flex;
  align-items: center;
  background-color: var(--input-bg);
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 6px 12px;
  gap: 10px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.2s ease;
  touch-action: pan-y;
  /* Allows smooth vertical scrolling on mobile touch screens */
}

.player-drag-item:hover {
  border-color: var(--surface-highest);
  background-color: var(--surface-high);
}

.drag-handle {
  cursor: grab;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  user-select: none;
  transition: color 0.2s ease;
  touch-action: none;
  /* Prevents scrolling ONLY when grabbing the handle */
}

.drag-handle:hover {
  color: var(--neon);
}

.player-drag-item.is-dragging .drag-handle {
  cursor: grabbing;
  color: var(--neon);
}

.player-drag-input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 0;
  transition: border-color 0.2s ease;
}

.player-drag-input::placeholder {
  color: rgba(196, 201, 172, 0.3);
}

.player-drag-input:focus {
  outline: none;
  border-bottom: 1px solid var(--neon);
}

.player-display-name {
  flex: 1;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edit-player-btn, .save-player-btn, .cancel-player-btn, .delete-player-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.edit-player-btn:hover {
  color: var(--neon);
  background-color: rgba(255, 214, 10, 0.1);
}

.save-player-btn:hover {
  color: var(--green);
  background-color: var(--green-bg);
}

.cancel-player-btn:hover {
  color: var(--red);
  background-color: var(--red-bg);
}

.delete-player-btn:hover {
  background-color: var(--red-bg);
  color: var(--red);
}

.board-column.bench-column {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.02);
}

.board-column.bench-column.active-drop-target {
  border-color: var(--neon);
  box-shadow: 0px 0px 16px var(--neon-glow);
  background-color: rgba(255, 255, 255, 0.05);
}

.inline-add-player-btn {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.inline-add-player-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.player-drag-item.is-dragging {
  opacity: 0.4;
  border: 1px dashed var(--neon);
  background-color: var(--surface);
  transform: scale(0.96);
}

/* Floating Drag Ghost */
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  background-color: var(--surface-high);
  border: 2px solid var(--neon) !important;
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.4) !important;
  border-radius: 12px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.95;
  transform: rotate(1.5deg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.drag-ghost span:not(.material-symbols-outlined) {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.drag-ghost .drag-handle {
  color: var(--neon);
}

/* Vertical Placement Drop Indicator Line */
.drop-indicator {
  height: 3px;
  background-color: var(--neon);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--neon);
  margin: 4px 0;
  transition: all 0.1s ease;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  min-height: calc(72px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  border-top: 1px solid var(--border-gloss);
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  z-index: 1000;
  box-shadow: 0px -4px 32px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  flex: 1;
}

.nav-item .material-symbols-outlined {
  font-size: 24px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item.active {
  flex-direction: row !important;
  color: var(--text-black) !important;
  background-color: var(--neon) !important;
  box-shadow: 0px 4px 18px var(--neon-glow);
  font-weight: 800;
  font-size: 12px;
  padding: 10px 18px;
  border-radius: 18px;
  gap: 6px;
  flex: auto;
}

.nav-item.active .material-symbols-outlined {
  transform: scale(1.08);
  font-variation-settings: 'FILL' 1;
}

.nav-item:not(.active):hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Leaderboard Segmented Control Styles */
.leaderboard-toggle-btn.active {
  background-color: var(--surface-highest) !important;
  color: var(--neon) !important;
  box-shadow: var(--shadow-glass);
}

.leaderboard-toggle-btn:not(.active):hover {
  color: var(--text-primary);
}

/* --- PREMIUM AI SETTINGS CARD STYLING --- */
.provider-select:hover, .text-input:hover {
  border-color: var(--border-gloss-hover) !important;
  background-color: rgba(255, 255, 255, 0.02) !important;
}

.provider-select:focus, .text-input:focus {
  border-color: var(--neon) !important;
  box-shadow: 0 0 12px var(--neon-glow) !important;
  background-color: rgba(0, 0, 0, 0.2) !important;
}

.provider-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23ffd60a' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
}

.text-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.4;
}

/* Gear Icon Animation */
.gear-spin-active {
  transform: rotate(90deg);
  color: var(--neon) !important;
}

/* --- RESPONSIVE ADMIN TOP HEADER BUTTONS --- */
.admin-top-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--neon);
  color: var(--neon);
  background-color: rgba(255, 214, 10, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
  height: fit-content;
  min-height: 36px;
  box-sizing: border-box;
}

.admin-top-btn:hover {
  background-color: rgba(255, 214, 10, 0.2);
}

@media (max-width: 640px) {
  .admin-top-btn {
    padding: 0;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50% !important;
  }
  .admin-top-btn .btn-label-text {
    display: none !important;
  }
  .admin-top-btn .material-symbols-outlined {
    font-size: 20px !important;
    margin: 0 !important;
  }
}

/* --- MATCH RESULTS OVERVIEW SECTION --- */
.overview-row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 12px;
}

.overview-row.clickable {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 12px;
  padding-right: 12px;
  margin-left: -12px;
  margin-right: -12px;
  border-radius: 12px;
}

.overview-row.clickable:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

[data-theme="light"] .overview-row.clickable:hover {
  background: rgba(0, 0, 0, 0.02);
}

.overview-row-action {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0.25;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 8px;
  flex-shrink: 0;
}

.overview-row.clickable:hover .overview-row-action {
  opacity: 0.95;
  color: var(--neon);
  transform: scale(1.1);
}


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

.overview-row:first-child {
  padding-top: 0;
}

.overview-row-header {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 90px;
}

.overview-row-game-label {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--neon);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.overview-row-status-text {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.overview-row-status-text.completed {
  color: var(--green);
}

.overview-row-status-text.in-progress {
  color: var(--neon);
  display: flex;
  align-items: center;
  gap: 4px;
}

.overview-row-body {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.overview-row-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  word-break: break-word;
}

.overview-row-team.team-2 {
  align-items: flex-end;
  text-align: right;
}

.overview-row-score-cell {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 65px;
}

.overview-row-score-badge {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--neon);
  background: rgba(255, 214, 10, 0.08);
  border: 1px solid rgba(255, 214, 10, 0.25);
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.overview-row-vs-badge {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- STANDINGS GRID SECTION --- */
.standings-grid-card {
  background: var(--surface);
  border: 1px solid var(--border-gloss);
  border-radius: 20px;
  box-shadow: var(--shadow-glass);
}

#standings-grid-container {
  display: flex;
  flex-direction: column;
}

.grid-player-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .grid-player-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.grid-player-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.grid-player-row:first-child {
  padding-top: 0;
}

.grid-player-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.grid-player-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.grid-group-rank-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 214, 10, 0.08);
  border: 1px solid rgba(255, 214, 10, 0.2);
  color: var(--neon);
  font-weight: 800;
  font-size: 13px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .grid-group-rank-badge {
  background: rgba(255, 149, 0, 0.08);
  border-color: rgba(255, 149, 0, 0.2);
  color: var(--neon);
}

.grid-player-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.grid-player-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.grid-player-tot-rank {
  font-size: 11px;
  color: var(--text-secondary);
}

.grid-player-right {
  display: flex;
  align-items: center;
}

.grid-player-total-badge {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.grid-player-total-badge.positive {
  background: rgba(50, 215, 75, 0.08);
  border: 1px solid rgba(50, 215, 75, 0.2);
  color: var(--green);
}

.grid-player-total-badge.negative {
  background: rgba(255, 69, 58, 0.08);
  border: 1px solid rgba(255, 69, 58, 0.2);
  color: var(--red);
}

.grid-player-total-badge.neutral {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

[data-theme="light"] .grid-player-total-badge.neutral {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.05);
}

.grid-player-games {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 46px; /* Align with details (32px badge + 14px gap) */
}

.grid-games-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.grid-games-pills {
  display: flex;
  gap: 6px;
  align-items: center;
}

.game-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  background: var(--input-bg);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .game-pill {
  border-color: rgba(0, 0, 0, 0.05);
}

.game-pill.positive {
  background: rgba(50, 215, 75, 0.08);
  border-color: rgba(50, 215, 75, 0.15);
  color: var(--green);
}

.game-pill.negative {
  background: rgba(255, 69, 58, 0.08);
  border-color: rgba(255, 69, 58, 0.15);
  color: var(--red);
}

.game-pill.neutral {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

[data-theme="light"] .game-pill.neutral {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.05);
}

/* --- PLAYER AVATARS --- */
.player-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--neon);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.player-avatar-initials {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--glass-text);
  font-size: 11px;
  font-weight: 800; /* Extra bold for visibility */
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(10px) saturate(190%);
  -webkit-backdrop-filter: blur(10px) saturate(190%);
  text-transform: uppercase;
  flex-shrink: 0;
  letter-spacing: -0.5px; /* Tighter letter spacing for initials */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Clickable Avatar hover transitions */
.clickable-avatar {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
}
.clickable-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px var(--neon-glow-high) !important;
}

/* --- MOBILE RESPONSIVE OVERRIDES --- */
@media (max-width: 500px) {
  /* 1. Court Setup Screen single-column collapse */
  .court-card-wrapper {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .court-name-input {
    flex: 1;
    min-width: 0;
    width: auto;
    max-width: 180px;
  }

  #setup-title {
    padding-right: 56px;
  }
}

@media (max-width: 480px) {
  /* 2. Global Card Spacings */
  .card {
    padding: 16px;
    border-radius: 16px;
  }

  /* 3. Score Entry Modal Adjustments */
  .modal-overlay {
    padding: 10px;
  }

  .modal-content {
    padding: 24px 16px;
    border-radius: 20px;
  }

  .modal-stepper-row {
    padding: 12px;
    border-radius: 16px;
  }

  .stepper-controls {
    gap: 8px;
  }

  .stepper-btn {
    width: 40px;
    height: 40px;
  }

  .winner-btn {
    width: 40px;
    height: 40px;
  }

  .stepper-value {
    width: 44px;
    font-size: 24px;
  }

  /* 4. Stage 2 Seeding Review */
  .tier-player-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 12px;
  }

  /* 5. Bottom Navigation Bar */
  .bottom-nav {
    min-height: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .nav-item {
    padding: 6px 8px;
    font-size: 9px;
    gap: 2px;
  }

  .nav-item.active {
    padding: 8px 12px;
    font-size: 10px;
    gap: 4px;
    border-radius: 14px;
  }

  .nav-item .material-symbols-outlined {
    font-size: 20px;
  }

  /* 6. Overview Row Mobile Alignment */
  .overview-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 0;
  }

  .overview-row-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: auto;
    width: 100%;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
  }

  [data-theme="light"] .overview-row-header {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  }

  .overview-row-body {
    width: 100%;
    gap: 8px;
  }

  .overview-row-team {
    gap: 4px;
  }
}

/* Reduce top padding on the dashboard screen since the top app bar is hidden */
#view-dashboard {
  padding-top: 20px !important;
}

/* Overview Screen Widescreen layout and styling */
.overview-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
  padding: 10px 4px 20px 4px;
  width: 100%;
  box-sizing: border-box;
}

/* Custom scrollbar for horizontal or grid overflow */
.overview-grid-container::-webkit-scrollbar {
  height: 8px;
}
.overview-grid-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}
.overview-grid-container::-webkit-scrollbar-thumb {
  background: var(--surface-highest);
  border-radius: 10px;
  border: 1px solid var(--border-gloss);
}
.overview-grid-container::-webkit-scrollbar-thumb:hover {
  background: var(--neon);
}

.overview-court-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border-gloss);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-glass);
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.overview-court-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-gloss);
  padding-bottom: 12px;
}

.overview-court-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--neon);
  margin: 0;
}

.overview-court-tier {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.overview-court-body {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 12px;
  align-items: start;
}

.overview-matches-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.overview-match-card {
  background: var(--surface-high);
  border: 1px solid var(--border-gloss);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overview-match-card.clickable {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.overview-match-card.clickable:hover {
  background: var(--surface-highest);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .overview-match-card.clickable:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

.overview-match-action {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0.25;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.overview-match-card.clickable:hover .overview-match-action {
  opacity: 0.95;
  color: var(--neon);
  transform: scale(1.1);
}

.overview-match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overview-match-game-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.overview-standings-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  border-left: 1px solid var(--border-gloss);
  padding-left: 10px;
}

.overview-standings-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.overview-standings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.overview-standing-card {
  background: var(--surface-high);
  border: 1px solid var(--border-gloss);
  border-radius: 12px;
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

[data-theme="light"] .overview-standing-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.overview-standing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
}

.overview-standing-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-grow: 1;
}

.overview-standing-rank {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  width: 18px;
  flex-shrink: 0;
}

.overview-standing-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex-grow: 1;
}

.overview-standing-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.overview-standing-subrank {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary);
}

.overview-standing-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .overview-standing-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.overview-games-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.overview-games-pills {
  display: flex;
  gap: 3px;
  align-items: center;
}

.overview-standing-card .game-pill {
  min-width: 22px;
  height: 18px;
  font-size: 9px;
  border-radius: 4px;
}

@media (max-width: 580px) {
  .overview-grid-container {
    grid-template-columns: 1fr;
  }
  .overview-court-body {
    grid-template-columns: 1fr;
  }
  .overview-standings-section {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border-gloss);
    padding-top: 14px;
  }
}

/* Override top padding for overview screen */
#view-overview {
  padding-top: 24px !important;
}