/* ==========================================================================
   Rankings Page Styles
   ========================================================================== */

.rankings-page {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-16) 0;
  margin-bottom: var(--space-16);
}

.hero-section .hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-section .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(8, 8, 8, 0.4), var(--bg-color));
  z-index: 1;
}

.hero-section .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero-section h1 {
  font-size: var(--text-4xl);
  font-family: var(--font-serif);
  color: var(--text-color);
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.hero-section p {
  font-size: var(--text-lg);
  color: var(--gray-200);
  margin-bottom: var(--space-6);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* Leaderboards Section */
.leaderboards-section {
  padding: var(--space-16) 0;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: var(--space-12);
}

.section-header h2 {
  font-size: var(--text-3xl);
  font-family: var(--font-serif);
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Tabs */
.tabs-container {
  margin-bottom: var(--space-12);
}

.tabs-header {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.tab-btn {
  padding: var(--space-3) var(--space-6);
  background-color: var(--surface-color);
  border: 2px solid var(--gray-800);
  color: var(--text-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 600;
  transition: all var(--transition-base);
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--bg-color);
}

/* Table Styles */
.table-responsive {
  overflow-x: auto;
  margin-bottom: var(--space-8);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--surface-color);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.leaderboard-table thead {
  background-color: rgba(212, 175, 55, 0.1);
  border-bottom: 2px solid var(--primary);
}

.leaderboard-table th {
  padding: var(--space-4);
  color: var(--primary);
  font-weight: 700;
  font-family: var(--font-serif);
  text-align: left;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.leaderboard-table td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--gray-800);
  color: var(--text-color);
  font-size: var(--text-sm);
}

.leaderboard-table tbody tr {
  transition: all var(--transition-base);
}

.leaderboard-table tbody tr:hover {
  background-color: rgba(212, 175, 55, 0.05);
}

.leaderboard-table tbody tr:nth-child(1) {
  background-color: rgba(212, 175, 55, 0.08);
}

.leaderboard-table tbody tr:nth-child(2) {
  background-color: rgba(192, 192, 192, 0.05);
}

.leaderboard-table tbody tr:nth-child(3) {
  background-color: rgba(205, 127, 50, 0.05);
}

.player-name {
  font-weight: 600;
  color: var(--primary);
}

.points {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--primary);
  font-size: var(--text-lg);
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Calculation Section */
.calculation-section {
  padding: var(--space-16) 0;
  background-color: var(--surface-color);
  border-top: 1px solid var(--gray-800);
  border-bottom: 1px solid var(--gray-800);
}

.calc-card {
  background-color: var(--bg-color);
  border: 1px solid var(--gray-800);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.calc-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
  transform: translateY(-4px);
}

.calc-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  display: inline-block;
}

.calc-card h3 {
  color: var(--primary);
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.calc-card p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--line-height-relaxed);
}

/* Regional Section */
.regional-section,.champions-section,.gallery-section,.eligibility-section,.cta-section {
  padding: var(--space-16) 0;
}

.region-card {
  background-color: var(--surface-color);
  border: 1px solid var(--gray-800);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.region-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-gold);
}

.region-card h3 {
  color: var(--primary);
  margin-bottom: var(--space-4);
  font-size: var(--text-lg);
  font-family: var(--font-serif);
  border-bottom: 2px solid var(--primary);
  padding-bottom: var(--space-3);
}

.regional-list {
  list-style-type: decimal;
  list-style-position: inside;
  padding: 0;
  margin: 0;
}

.regional-list li {
  padding: var(--space-3) 0;
  color: var(--text-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-800);
  font-size: var(--text-sm);
}

.regional-list li:last-child {
  border-bottom: none;
}

.regional-pts {
  color: var(--primary);
  font-weight: 600;
  font-family: var(--font-serif);
}

/* Grid Utilities */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background-color: var(--surface-color);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

/* Text Utilities */
.text-center {
  text-align: center;
}

.justify-center {
  justify-content: center;
}

.mt-8 {
  margin-top: var(--space-8);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

.flex {
  display: flex;
}

/* Responsive */
@media (max-width: 767px) {
  .hero-section h1 {
    font-size: var(--text-3xl);
  }

  .leaderboards-section {
    padding: var(--space-12) 0;
  }

  .table-responsive {
    font-size: var(--text-xs);
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: var(--space-2);
  }

  .tabs-header {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }
}
