* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0a0a;
  color: #fff;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 28px;
  background: linear-gradient(90deg, #fe2c55, #25f4ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.refresh-btn {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.refresh-btn:hover {
  background: #252525;
  border-color: #fe2c55;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-card {
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #fe2c55;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 13px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  border-bottom: 1px solid #252525;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.tab {
  background: transparent;
  border: none;
  color: #888;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.tab:hover {
  color: #fff;
  background: #1a1a1a;
}

.tab.active {
  color: #fff;
  background: #fe2c55;
}

/* Tab Content */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #252525;
}

.data-table th {
  background: #151515;
  font-weight: 600;
  color: #888;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tr:hover {
  background: #202020;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* Rank styling */
.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
}

.rank-1 {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
}

.rank-2 {
  background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
  color: #000;
}

.rank-3 {
  background: linear-gradient(135deg, #cd7f32, #a0522d);
  color: #fff;
}

/* Username styling */
.username {
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

a.username:hover {
  color: #fe2c55;
}

.nickname {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

/* Diamond value */
.diamonds {
  color: #25f4ee;
  font-weight: 600;
}

/* Win rate */
.win-rate {
  font-weight: 600;
}

.win-rate.high {
  color: #4ade80;
}

.win-rate.medium {
  color: #fbbf24;
}

.win-rate.low {
  color: #f87171;
}

/* Filters */
.filters {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filters label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #888;
  font-size: 14px;
}

.filters select {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  min-width: 150px;
  cursor: pointer;
}

.filters select:hover {
  border-color: #fe2c55;
}

.filters select:focus {
  outline: none;
  border-color: #fe2c55;
}

/* Country Stats */
.country-stats-content {
  margin-bottom: 20px;
}

.country-summary {
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.country-summary h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.back-btn {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #888;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 20px;
}

.back-btn:hover {
  color: #fff;
  border-color: #fe2c55;
}

.summary-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.summary-stats span {
  font-size: 16px;
  color: #888;
}

.summary-stats .diamonds {
  color: #25f4ee;
  font-weight: 600;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 15px;
  margin-top: 10px;
}

.page-btn {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: #252525;
  border-color: #fe2c55;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-info {
  color: #888;
  font-size: 14px;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  h1 {
    font-size: 22px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-value {
    font-size: 22px;
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tab {
    white-space: nowrap;
    padding: 8px 15px;
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 10px;
    font-size: 13px;
  }
}

.supporters-cell {
  font-size: 12px;
  min-width: 140px;
}

.supporter-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px solid #1a1a1a;
}

.supporter-row:last-child {
  border-bottom: none;
}

.supporter-name {
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.supporter-score {
  color: #ffd700;
  white-space: nowrap;
}
