/* Ranking Page Enhancements */
.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding: 2.5rem 2rem;
  border: 1px solid var(--bg-highlight);
  position: relative;
  background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.05) 0%, transparent 40%),
              linear-gradient(to bottom, rgba(30,30,35,1) 0%, rgba(20,20,25,1) 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.ranking-header::after {
    /* Removed bottom line, using container border/glow instead */
    content: none;
}

.ranking-title h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -2px;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.ranking-subtitle {
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ranking-stats {
  display: flex;
  gap: 1rem;
}

.rank-stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-highlight);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s;
}

.rank-stat-item:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.rank-stat-item i {
  color: var(--accent);
  font-size: 1rem;
}

.ranking-table-header {
  display: flex;
  padding: 0 20px 1rem;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--bg-highlight);
  margin-bottom: 1rem;
}

.col-rank { width: 60px; text-align: center; }
.col-player { flex: 1; padding-left: 20px; }
.col-tier { width: 80px; text-align: center; font-family: var(--font-mono); font-weight: 800; }
.col-score { width: 100px; text-align: center; }
.col-kd { width: 80px; text-align: center; }
.col-hs { width: 80px; text-align: center; }
.col-time { width: 120px; text-align: right; padding-right: 10px; }

/* Ranking List Items */
.ranking-card {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  margin-bottom: 8px;
  height: auto;
  cursor: default;
  background: var(--bg-surface);
  border: 1px solid var(--bg-highlight);
  border-radius: 8px;
  transition: all 0.2s;
}

.ranking-card:hover {
  border-color: var(--text-tertiary);
  transform: translateX(5px);
}

.ranking-card .col-rank {
  font-weight: 800;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
}

.ranking-card .col-player {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #fff;
}

.ranking-card .col-score {
  font-family: var(--font-mono);
  color: #fbbf24;
  font-weight: 700;
}

.ranking-card .col-kd,
.ranking-card .col-hs {
  font-family: var(--font-mono);
  opacity: 0.8;
}

.ranking-card .col-time {
  font-family: var(--font-mono);
  opacity: 0.6;
  font-size: 0.9rem;
}
@media (max-width: 768px) {
  .ranking-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .ranking-title h1 {
    font-size: 2.5rem;
  }
  .ranking-stats {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 5px;
  }
}

/* Ranking Podium */
.ranking-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2rem;
  margin: 3rem auto 4rem;
  padding: 0 1rem;
  max-width: 800px;
}

.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.3s var(--ease-out);
}

.podium-item:hover {
  transform: translateY(-10px);
}

.podium-rank-2, .podium-rank-3 {
  width: 160px;
}

.podium-rank-1 {
  width: 200px;
  z-index: 2;
  margin-bottom: 20px;
}

.podium-avatar-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.podium-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--bg-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-tertiary);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  overflow: hidden;
}

.podium-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podium-rank-1 .podium-avatar {
  width: 100px;
  height: 100px;
  border-color: #fbbf24;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}

.podium-rank-2 .podium-avatar {
  border-color: #94a3b8;
  box-shadow: 0 0 20px rgba(148, 163, 184, 0.2);
}

.podium-rank-3 .podium-avatar {
  border-color: #b45309;
  box-shadow: 0 0 20px rgba(180, 83, 9, 0.2);
}

.podium-crown {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: #fbbf24;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

.podium-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.podium-tier {
  font-family: var(--font-mono);
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  font-size: 1.1rem;
}

.podium-rank-1 .podium-tier {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.podium-rank-1 .podium-name {
  font-size: 1.5rem;
  color: #fbbf24;
}

.podium-score {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--bg-highlight);
}

.podium-rank-1 .podium-score {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
  font-weight: 700;
}

.podium-pedestal {
  width: 100%;
  background: linear-gradient(to bottom, var(--bg-highlight), var(--bg-core));
  border-radius: 8px 8px 0 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 3rem;
  color: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
  border-bottom: none;
  margin-top: 1rem;
}

.podium-rank-2 .podium-pedestal { height: 80px; }
.podium-rank-1 .podium-pedestal { height: 120px; background: linear-gradient(to bottom, rgba(251, 191, 36, 0.15), var(--bg-core)); border-color: rgba(251, 191, 36, 0.3); }
.podium-rank-3 .podium-pedestal { height: 60px; }

/* Responsive Podium */
@media (max-width: 768px) {
  .ranking-podium {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
  }
  .podium-item {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    padding: 1rem;
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px solid var(--bg-highlight);
  }
  .podium-pedestal { display: none; }
  .podium-crown { display: none; }
  .podium-rank-1 { order: -1; margin-bottom: 0; }
  .podium-avatar { width: 50px; height: 50px; font-size: 1.25rem; margin-right: 1rem; }
  .podium-rank-1 .podium-avatar { width: 60px; height: 60px; }
  .podium-info { text-align: left; }
  .podium-pedestal { margin-top: 0; }
}

/* Ranking Season Dropdown */
.season-selector-wrapper {
    position: relative;
    cursor: pointer;
    min-width: 180px;
    justify-content: space-between;
    z-index: 100;
}

.season-selector-wrapper.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.1);
}

.season-selector-wrapper .season-arrow {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.season-selector-wrapper.active .season-arrow {
    transform: rotate(180deg);
}

.season-dropdown-list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 100%;
    min-width: 200px;
    background: var(--bg-surface);
    border: 1px solid var(--bg-highlight);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 2px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 101;
}

.season-selector-wrapper.active .season-dropdown-list {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.season-dropdown-item {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.season-dropdown-item:hover {
    background: var(--bg-highlight);
    color: var(--text-primary);
}

.season-dropdown-item.active {
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent);
    font-weight: 700;
}

.season-dropdown-item.active i {
    color: var(--accent);
    font-size: 0.8em;
    margin-left: 8px;
}

/* Scrollbar for dropdown */
.season-dropdown-list::-webkit-scrollbar { width: 4px; }
.season-dropdown-list::-webkit-scrollbar-track { background: transparent; }
.season-dropdown-list::-webkit-scrollbar-thumb { background: var(--bg-highlight); border-radius: 4px; }

/* --- New Additions --- */
/* Custom Ranking Page Width & Avatar */
#section-ranking.server-list-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Ensure avatars are circular */
.ranking-card .col-player img {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
