﻿/* ==================== HERO SECTION ==================== */
.ladder-hero {
  position: relative;
  padding: 60px 0 50px;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.95) 0%, rgba(22, 27, 34, 0.9) 100%);
  overflow: hidden;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, transparent, #58a6ff, #8b5cf6, #58a6ff, transparent) 1;
}

.hero-bg-effects {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.hero-glow-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #58a6ff 0%, transparent 70%);
  top: -100px;
  left: 20%;
  animation: float-glow 8s ease-in-out infinite;
}

.hero-glow-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  bottom: -50px;
  right: 25%;
  animation: float-glow 6s ease-in-out infinite reverse;
}

@keyframes float-glow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 25px;
}

.hero-icon {
  font-size: 3em;
  color: #58a6ff;
  filter: drop-shadow(0 0 20px rgba(88, 166, 255, 0.6));
  animation: icon-pulse 3s ease-in-out infinite;
}

.hero-icon-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border: 2px solid rgba(88, 166, 255, 0.3);
  animation: ring-spin 10s linear infinite;
}

.hero-icon-ring-2 {
  width: 130px;
  height: 130px;
  border-color: rgba(139, 92, 246, 0.2);
  animation-direction: reverse;
  animation-duration: 15s;
}

@keyframes icon-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(88, 166, 255, 0.6)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 30px rgba(88, 166, 255, 0.8)); }
}

@keyframes ring-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.ladder-title {
  font-size: 2.5em;
  font-weight: 800;
  letter-spacing: 6px;
  margin: 0;
  background: linear-gradient(135deg, #58a6ff 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.title-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.deco-line {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #58a6ff, transparent);
}

.deco-gem {
  color: #8b5cf6;
  font-size: 0.7em;
  animation: gem-rotate 4s ease-in-out infinite;
}

@keyframes gem-rotate {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
}

.ladder-subtitle {
  color: #8b949e;
  font-size: 1.2em;
  margin: 0;
  font-weight: 400;
}

.realm-highlight {
  color: #58a6ff;
  font-weight: 700;
}

.hero-stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
  padding: 15px 30px;
  background: rgba(22, 27, 34, 0.8);
  border: 1px solid rgba(88, 166, 255, 0.2);
  display: inline-flex;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.hero-stat i {
  font-size: 1.3em;
  color: #58a6ff;
}

.hero-stat .alliance-icon { color: #4da6ff; }
.hero-stat .horde-icon { color: #ff4444; }

.stat-value {
  font-size: 2em;
  font-weight: 900;
  color: #fff;
}

.stat-label {
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #6e7681;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, transparent, rgba(88, 166, 255, 0.3), transparent);
}

.hero-bottom-border {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.5), transparent);
}

/* ==================== MAIN SECTION ==================== */
.ladder-section {
  padding: 50px 0;
  background: transparent;
}

/* ==================== FILTER PANEL ==================== */
.filter-panel {
  background: linear-gradient(180deg, #12161c 0%, #0d1117 100%);
  border: 1px solid rgba(88, 166, 255, 0.15);
  margin-bottom: 30px;
  overflow: hidden;
}

.filter-header {
  background: rgba(88, 166, 255, 0.1);
  padding: 12px 20px;
  border-bottom: 1px solid rgba(88, 166, 255, 0.15);
  font-weight: 700;
  font-size: 0.85em;
  letter-spacing: 2px;
  color: #58a6ff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-form {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 20px;
  flex-wrap: wrap;
}

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

.filter-label {
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 1px;
  color: #6e7681;
}

.filter-select {
  background: #0d1117 !important;
  border: 1px solid rgba(88, 166, 255, 0.2) !important;
  color: #c9d1d9 !important;
  padding: 10px 15px !important;
  min-width: 160px;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.filter-select:hover {
  border-color: rgba(88, 166, 255, 0.4) !important;
}

.filter-select:focus {
  border-color: #58a6ff !important;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1) !important;
  outline: none;
}

.filter-btn {
  background: linear-gradient(135deg, #58a6ff 0%, #8b5cf6 100%) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 10px 30px !important;
  font-size: 0.85em !important;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(88, 166, 255, 0.4);
}

/* ==================== CLASS LEGEND ==================== */
.class-legend {
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 15px 20px;
  margin-bottom: 30px;
}

.legend-title {
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 2px;
  color: #6e7681;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8em;
  color: #8b949e;
  cursor: help;
  transition: color 0.2s;
}

.legend-item:hover {
  color: #fff;
}

.color-dot {
  width: 10px;
  height: 10px;
}

.color-dot.warrior { background: #C79C6E; }
.color-dot.paladin { background: #F58CBA; }
.color-dot.hunter { background: #ABD473; }
.color-dot.rogue { background: #FFF569; }
.color-dot.priest { background: #FFFFFF; }
.color-dot.death-knight { background: #C41F3B; }
.color-dot.shaman { background: #0070DE; }
.color-dot.mage { background: #69CCF0; }
.color-dot.warlock { background: #9482C9; }
.color-dot.druid { background: #FF7D0A; }

/* ==================== LADDER TABLE ==================== */
.ladder-container {
  background: linear-gradient(180deg, #12161c 0%, #0d1117 100%);
  border: 1px solid rgba(88, 166, 255, 0.15);
  overflow: hidden;
}

.ladder-table-header {
  display: grid;
  grid-template-columns: 80px 1fr 120px 100px 120px 60px 100px 100px 100px; gap: 10px;
  background: rgba(88, 166, 255, 0.08);
  border-bottom: 2px solid rgba(88, 166, 255, 0.2);
  padding: 15px 20px;
  font-size: 0.7em;
  font-weight: 800;
  letter-spacing: 2px;
  color: #58a6ff;
}

.ladder-body {
  /* max-height: removed */
  /* overflow-y: removed */
}

.ladder-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 100px 120px 60px 100px 100px 100px; gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  align-items: center;
  transition: all 0.2s ease;
  cursor: default;
}

.ladder-row:hover {
  background: rgba(88, 166, 255, 0.05);
  border-left: 3px solid #58a6ff;
  padding-left: 17px;
}

.ladder-row.top-1 {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), transparent);
  border-left: 3px solid #8b5cf6;
  padding-left: 17px;
}

.ladder-row.top-2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), transparent);
  border-left: 3px solid #c0c0c0;
  padding-left: 17px;
}

.ladder-row.top-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), transparent);
  border-left: 3px solid #cd7f32;
  padding-left: 17px;
}

/* Rank Column */
.rank-medal {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
}

.rank-medal.gold {
  color: #8b5cf6;
  animation: gold-glow 2s ease-in-out infinite;
}

.rank-medal.silver {
  color: #c0c0c0;
}

.rank-medal.bronze {
  color: #cd7f32;
}

@keyframes gold-glow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.5)); }
  50% { filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.8)); }
}

.rank-number {
  font-weight: 700;
  color: #6e7681;
  font-size: 0.9em;
}

/* Character Name */
.col-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.char-name {
  font-weight: 700;
  font-size: 1em;
  transition: all 0.2s;
}

.char-name:hover {
  filter: brightness(1.3);
}

.gender-badge {
  font-size: 0.75em;
  color: #6e7681;
  opacity: 0.7;
}

/* Class Colors */
.class-warrior { color: #C79C6E !important; }
.class-paladin { color: #F58CBA !important; }
.class-hunter { color: #ABD473 !important; }
.class-rogue { color: #FFF569 !important; }
.class-priest { color: #FFFFFF !important; }
.class-death-knight { color: #C41F3B !important; }
.class-shaman { color: #0070DE !important; }
.class-mage { color: #69CCF0 !important; }
.class-warlock { color: #9482C9 !important; }
.class-monk { color: #00FF96 !important; }
.class-druid { color: #FF7D0A !important; }
.class-demon-hunter { color: #A330C9 !important; }

/* Faction Tag */
.faction-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.faction-tag.alliance {
  background: rgba(0, 112, 221, 0.2);
  border: 1px solid rgba(0, 112, 221, 0.4);
  color: #4da6ff;
}

.faction-tag.horde {
  background: rgba(183, 28, 28, 0.2);
  border: 1px solid rgba(183, 28, 28, 0.4);
  color: #ff4444;
}

.faction-tag:hover {
  transform: scale(1.05);
}

/* Race & Class */
.col-faction { padding-right: 20px; }
.col-race {
  color: #8b949e;
  font-size: 0.85em;
}

.class-tag {
  font-weight: 600;
  font-size: 0.85em;
}

/* Level Display */
.level-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 1.1em;
  color: #58a6ff;
}

.level-display.max-level {
  color: #ec4899;
}

.max-star {
  font-size: 0.6em;
  animation: star-pulse 1s ease-in-out infinite;
}

@keyframes star-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

/* Kills Display */
.kills-display {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ff6b6b;
  font-size: 0.85em;
  font-weight: 600;
}

/* Time Display */
.time-display {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8b949e;
  font-size: 0.85em;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
}

.status-badge.online {
  color: #22c55e;
}

.status-badge.offline {
  color: #6e7681;
}

.status-dot {
  width: 8px;
  height: 8px;
}

.status-badge.online .status-dot {
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: status-pulse 2s ease-in-out infinite;
}

.status-badge.offline .status-dot {
  background: #6e7681;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* No Results */
.no-results {
  text-align: center;
  padding: 80px 20px;
}

.no-results-icon {
  font-size: 4em;
  color: #2d333b;
  margin-bottom: 20px;
}

.no-results h3 {
  color: #6e7681;
  margin: 0 0 10px;
}

.no-results p {
  color: #484f58;
  margin: 0;
}

/* Pagination */
.pagination-container {
  margin-top: 30px;
  text-align: center;
}

.pagination {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 25px;
  background: rgba(13, 17, 23, 0.9);
  border: 1px solid rgba(88, 166, 255, 0.2);
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.2);
  color: #58a6ff;
  text-decoration: none;
  transition: all 0.2s;
}

.page-btn:hover {
  background: rgba(88, 166, 255, 0.2);
  border-color: #58a6ff;
  color: #fff;
}

.page-info {
  color: #8b949e;
  font-size: 0.9em;
  padding: 0 15px;
}

.page-info strong {
  color: #58a6ff;
}

/* Footer */
.ladder-footer {
  margin-top: 20px;
  text-align: center;
}

.footer-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #6e7681;
  font-size: 0.9em;
}

.footer-info strong {
  color: #58a6ff;
}

/* ==================== RESPONSIVE ==================== */
.ladder-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1199px) {
  .ladder-table-header,
  .ladder-row {
    grid-template-columns: 60px 1fr 90px 80px 90px 50px 80px;
    font-size: 0.8rem;
  }
  
  .col-time, .col-kills {
    display: none;
  }
}

@media (max-width: 960px) {
  .ladder-table-header,
  .ladder-row {
    grid-template-columns: 50px 1fr 70px 70px 80px 45px 70px;
    font-size: 0.78rem;
  }
}

@media (max-width: 640px) {
  .ladder-title {
    font-size: 2em;
    letter-spacing: 4px;
  }
  
  .hero-stats-bar {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }
  
  .hero-stat-divider {
    width: 50px;
    height: 1px;
  }
  
  .ladder-table-header,
  .ladder-row {
    grid-template-columns: 40px 1fr 50px 40px;
    font-size: 0.75rem;
  }
  
  .col-race, .col-class, .col-status {
    display: none;
  }
  
  .filter-form {
    flex-direction: column;
  }
  
  .filter-select, .filter-btn {
    width: 100%;
  }
  
  .class-legend {
    display: none;
  }
}


/* Improved Mobile Responsiveness */
@media (max-width: 480px) {
  .ladder-title {
    font-size: 1.5em;
    letter-spacing: 2px;
  }
  
  .ladder-subtitle {
    font-size: 0.9rem;
  }
  
  .hero-stat-number {
    font-size: 1.5rem;
  }
  
  .hero-stat-label {
    font-size: 0.7rem;
  }
  
  .filter-panel {
    padding: 15px;
  }
  
  .filter-header {
    font-size: 0.8rem;
  }
  
  .ladder-table-header,
  .ladder-row {
    grid-template-columns: 40px 1fr 50px 40px 60px;
    gap: 5px;
    padding: 8px 5px;
    font-size: 0.75rem;
  }
  
  .ladder-table-header {
    font-size: 0.65rem;
  }
  
  .col-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .char-name {
    font-size: 0.8rem;
  }
  
  .gender-badge {
    display: none;
  }
  
  .faction-tag {
    padding: 4px 6px;
    font-size: 0.7rem;
  }
  
  .faction-tag span {
    display: none;
  }
  
  .level-display {
    padding: 4px 8px;
    font-size: 0.8rem;
  }
  
  .max-star {
    display: none;
  }
  
  .rank-medal {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  
  .rank-number {
    font-size: 0.8rem;
  }
  
  .status-badge {
    padding: 3px 6px;
    font-size: 0.65rem;
  }
  
  .status-badge i {
    display: none;
  }
  
  .col-race, .col-class, .col-time, .col-kills {
    display: none;
  }
  
  .ladder-container {
    margin: 0 -15px;
    border-radius: 0;
  }
  
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
  }
  
  .page-number, .page-arrow {
    min-width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
}

/* Scrollbar */
.ladder-body::-webkit-scrollbar {
  width: 8px;
}

.ladder-body::-webkit-scrollbar-track {
  background: #0d1117;
}

.ladder-body::-webkit-scrollbar-thumb {
  background: rgba(88, 166, 255, 0.3);
}

.ladder-body::-webkit-scrollbar-thumb:hover {
  background: rgba(88, 166, 255, 0.5);
}
