/* ============================================
   MX League — Design System & User Styles
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: #1F2933;
  --bg-card-hover: #263240;
  --accent-primary: #22C55E;
  --accent-primary-hover: #16A34A;
  --accent-secondary: #38BDF8;
  --accent-secondary-hover: #0EA5E9;
  --text-primary: #E5E7EB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --border-color: #374151;
  --border-light: #4B5563;
  --danger: #EF4444;
  --danger-hover: #DC2626;
  --warning: #F59E0B;
  --success: #22C55E;
  --glass-bg: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(55, 65, 81, 0.5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(34, 197, 94, 0.15);

  /* Typography */
  --font-body: 'Poppins', sans-serif;
  --font-heading: 'Orbitron', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Container */
  --container-max: 1200px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-secondary-hover);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: var(--space-2xl);
  position: relative;
  color: var(--text-primary);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-primary);
  margin: var(--space-sm) auto 0;
  border-radius: var(--radius-full);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-secondary);
  border: 2px solid var(--accent-secondary);
}

.btn-secondary:hover {
  background: var(--accent-secondary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-primary);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-info {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-secondary);
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
}

table th {
  background: var(--bg-secondary);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--border-color);
}

table td {
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
}

table tr:last-child td {
  border-bottom: none;
}

table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Top 3 highlight — see enhanced styles in Points Table Section below */

/* --- Toast Notification --- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 360px;
}

.toast-success {
  background: var(--accent-primary);
}

.toast-error {
  background: var(--danger);
}

.toast-info {
  background: var(--accent-secondary);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.1rem;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

/* --- Stepper --- */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-xl);
}

.step-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  transition: all var(--transition-base);
}

.step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  display: none;
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--border-color);
  margin: 0 var(--space-xs);
  transition: background var(--transition-base);
}

.step-item.active .step-circle {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.step-item.active .step-label {
  color: var(--accent-primary);
}

.step-item.completed .step-circle {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.step-item.completed~.step-line-before {
  background: var(--accent-primary);
}

/* --- Loading Spinner --- */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.95rem;
}

/* --- Full Page Loader --- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.page-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-spinner {
  position: relative;
  width: 64px;
  height: 64px;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}

.loader-ring:nth-child(1) {
  border-top-color: var(--accent-primary);
  animation: loaderSpin 1s linear infinite;
}

.loader-ring:nth-child(2) {
  inset: 6px;
  border-right-color: var(--accent-secondary);
  animation: loaderSpin 1.5s linear infinite reverse;
}

.loader-ring:nth-child(3) {
  inset: 12px;
  border-bottom-color: var(--accent-primary);
  animation: loaderSpin 2s linear infinite;
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Button inline spinner */
.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loaderSpin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.logo-text span {
  color: var(--accent-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-base);
  border-radius: var(--radius-full);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.btn-apk {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  background: linear-gradient(135deg, var(--accent-primary), #16A34A);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-apk:hover {
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(15, 23, 42, 0.88) 0%,
      rgba(15, 23, 42, 0.65) 50%,
      rgba(15, 23, 42, 0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl);
  animation: fadeInUp 0.8s ease;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content .tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  font-weight: 300;
  letter-spacing: 2px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--space-3xl) 0;
}

.section-alt {
  background: var(--bg-secondary);
}

/* --- Points Table Section --- */
#points .table-wrapper {
  animation: fadeInUp 0.5s ease;
}

.points-select-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.points-select-wrapper select {
  max-width: 320px;
}

/* Winner Highlight Card */
.winner-highlight {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(234, 179, 8, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.3);
  animation: fadeInUp 0.5s ease;
}

.winner-crown {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  flex-shrink: 0;
  animation: crownBounce 2s ease infinite;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

@keyframes crownBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.winner-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.winner-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.winner-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #F59E0B;
}

.winner-stats {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Enhanced Table Rows */
.pts-row {
  animation: rowSlideIn 0.4s ease both;
}

@keyframes rowSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

table tr.rank-1 td {
  background: rgba(245, 158, 11, 0.08);
}

table tr.rank-2 td {
  background: rgba(148, 163, 184, 0.08);
}

table tr.rank-3 td {
  background: rgba(205, 127, 50, 0.06);
}

table tr.rank-1 td:first-child {
  border-left: 3px solid #F59E0B;
}

table tr.rank-2 td:first-child {
  border-left: 3px solid #94A3B8;
}

table tr.rank-3 td:first-child {
  border-left: 3px solid #CD7F32;
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.rank-medal {
  font-size: 1.3rem;
}

.team-name-cell {
  font-weight: 600;
}

.kill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  font-weight: 700;
  font-size: 0.85rem;
}

.points-val {
  color: var(--accent-primary);
  font-family: var(--font-heading);
  font-size: 1rem;
}

/* Upload Progress Bar */
.upload-progress {
  display: none;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  margin-top: var(--space-sm);
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

/* --- Upcoming Tournaments --- */
.tournaments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.tournament-card {
  position: relative;
  overflow: hidden;
}

.tournament-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.tournament-card h3 {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.tournament-card .card-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tournament-card .card-meta .meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.tournament-card .card-meta i {
  width: 16px;
  color: var(--accent-secondary);
}

.tournament-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
}

.tournament-card .prize {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.tournament-card .slots-info {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tournament-card .slots-bar {
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  margin-top: var(--space-sm);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.tournament-card .slots-bar-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.tournament-card .slots-bar-fill.almost-full {
  background: var(--warning);
}

.tournament-card .slots-bar-fill.full {
  background: var(--danger);
}

.btn-full {
  background: var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Join Flow Section --- */
.join-section {
  max-width: 600px;
  margin: 0 auto;
}

/* Step content */
.step-content {
  display: none;
}

.step-content.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

/* Payment section */
.payment-info {
  text-align: center;
}

.payment-info .qr-image {
  max-width: 220px;
  margin: var(--space-md) auto;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
}

.payment-info .upi-id {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--accent-secondary);
  margin: var(--space-sm) 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  display: inline-block;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.payment-info .fee-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  font-family: var(--font-heading);
  margin: var(--space-md) 0;
}

/* Upload area */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-2xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.upload-area:hover {
  border-color: var(--accent-primary);
  background: rgba(34, 197, 94, 0.03);
}

.upload-area.has-file {
  border-color: var(--accent-primary);
  border-style: solid;
}

.upload-area i {
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.upload-area p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-preview {
  max-width: 200px;
  margin: var(--space-md) auto 0;
  border-radius: var(--radius-sm);
}

/* Confirmation */
.confirmation-box {
  text-align: center;
  padding: var(--space-2xl);
}

.confirmation-box .check-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  font-size: 2rem;
  color: var(--accent-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-logo img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.footer-logo span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 0.95rem;
}

.footer-social a:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.footer-bottom {
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle {
    display: flex;
  }

  .btn-apk {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content .tagline {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .tournaments-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .step-label {
    display: none;
  }

  .stepper {
    gap: 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 260px;
  }

  .card {
    padding: var(--space-md);
  }

  table th,
  table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 769px) {
  .step-label {
    display: block;
  }
}