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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  min-height: 100vh;
  color: #1e293b;
  line-height: 1.6;
}

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

/* Header */
header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.5rem 0;
  text-align: center;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.subtitle {
  font-size: 1rem;
  color: #64748b;
  font-weight: 400;
}

.header-nav {
  margin-top: 1rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  transition: all 0.2s;
  margin: 0 0.25rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.nav-link:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Server Grid - More Compact */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.server-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.server-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.server-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.server-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.server-icon img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.server-icon i {
  color: white;
  font-size: 1.25rem;
}

.server-info h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.server-url {
  font-size: 0.875rem;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
}

/* Status Section - Compact */
.status-section {
  space-y: 1rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-weight: 500;
  font-size: 0.875rem;
}

.status-online { color: #10b981; }
.status-offline { color: #ef4444; }
.status-loading { color: #64748b; }

.player-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.player-stat {
  text-align: center;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.player-stat .number {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.player-stat .label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Player List - Compact */
.player-list {
  margin: 1rem 0;
}

.player-list h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.players {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.player-tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Buttons - Streamlined */
.chart-toggle, .stats-toggle, .review-button, .add-review-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

.chart-toggle:hover, .stats-toggle:hover, .review-button:hover, .add-review-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Charts */
.chart-container {
  margin-top: 1rem;
  height: 250px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* Statistics */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.stat-item {
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.stat-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 0.25rem;
}

/* Reviews - Compact */
.review-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0 0.5rem 0;
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rating-stars {
  color: #fbbf24;
}

.rating-value {
  font-weight: 600;
  color: #1e293b;
}

.review-count {
  color: #64748b;
  font-size: 0.875rem;
}

/* Sections */
.sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.section {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Leaderboards */
.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab-button {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-button.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.tab-button:hover:not(.active) {
  background: #e2e8f0;
  color: #1e293b;
}

.leaderboard-controls {
  margin-bottom: 1rem;
}

.leaderboard-controls select {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
}

/* Loading States */
.loading, .loading-servers {
  text-align: center;
  color: #64748b;
  font-style: italic;
  padding: 2rem;
}

/* Utilities */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .servers-grid { grid-template-columns: 1fr; }
  .sections { grid-template-columns: 1fr; }
  .player-info { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr; }
}

/* Events & Calendar Section */
.events-calendar-section {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  margin: 2rem 0;
}

.events-calendar-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.calendar-controls h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.calendar-nav {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.calendar-nav:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e2e8f0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.calendar-header {
  background: #f1f5f9;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 600;
  color: #64748b;
  font-size: 0.875rem;
}

.calendar-day {
  background: #ffffff;
  min-height: 80px;
  padding: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
}

.calendar-day:hover {
  background: #f8fafc;
}

.calendar-day.empty {
  background: #f9fafb;
  cursor: default;
}

.calendar-day.has-events {
  background: #eff6ff;
}

.calendar-day.has-events:hover {
  background: #dbeafe;
}

.day-number {
  font-weight: 500;
  color: #1e293b;
  font-size: 0.875rem;
}

.day-events {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
}

.upcoming-events h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 1.5rem 0 1rem 0;
}

.event-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.event-header h4 {
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.event-date {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.event-type {
  font-size: 0.75rem;
  color: #6366f1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 0.5rem;
}

.event-desc {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.event-server {
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
}

/* Leaderboards Section */
.leaderboards-section {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  margin: 2rem 0;
}

.leaderboards-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.server-filter {
  margin-bottom: 1rem;
}

.server-filter label {
  font-size: 0.875rem;
  color: #64748b;
  margin-right: 0.5rem;
}

.leaderboard-grid {
  margin-top: 1rem;
}

.leaderboard-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  align-items: center;
  transition: all 0.2s;
}

.leaderboard-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.leaderboard-item.rank-1 {
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  border-color: #f59e0b;
}

.leaderboard-item.rank-2 {
  background: linear-gradient(135deg, #f3f4f6, #9ca3af);
  border-color: #6b7280;
}

.leaderboard-item.rank-3 {
  background: linear-gradient(135deg, #fed7aa, #fb923c);
  border-color: #ea580c;
}

.rank-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  min-width: 60px;
}

.rank-number {
  font-size: 1.25rem;
  color: #1e293b;
}

.rank-icon {
  color: #fbbf24;
  font-size: 1rem;
}

.player-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.player-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
}

.player-server {
  font-size: 0.875rem;
  color: #64748b;
}

.player-stats {
  text-align: right;
}

.primary-stat {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
}

.secondary-stat {
  font-size: 0.875rem;
  color: #64748b;
}

.last-seen {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 80px;
}

/* Community Section */
.community-section {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  margin: 2rem 0;
  text-align: center;
}

.community-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
}

.community-section p {
  color: #64748b;
  margin-bottom: 1.5rem;
}

.community-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.discord-widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.discord-widget iframe {
  border-radius: 6px;
}

.community-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  background: #f1f5f9;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
}

.community-link:hover {
  background: #3b82f6;
  color: white;
}

/* Footer */
footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 2rem 0;
  margin-top: 3rem;
}

footer p {
  color: #64748b;
  font-size: 0.875rem;
  text-align: center;
  line-height: 1.6;
}

/* Dashboard Specific Styles */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
}

.stat-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.stat-card i {
  font-size: 2.5rem;
  color: #3b82f6;
  width: 60px;
  text-align: center;
}

.stat-content h3 {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 0.5rem 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1;
}

.dashboard-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dashboard-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-wrapper {
  position: relative;
  height: 400px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Server Performance Grid */
.performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.performance-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
}

.performance-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1rem 0;
}

.performance-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.performance-metric:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.metric-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.metric-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.metric-value.good { color: #10b981; }
.metric-value.warning { color: #f59e0b; }
.metric-value.danger { color: #ef4444; }

/* Activity Heatmap Styles */
.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* Server Stats Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

#server-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

#server-stats-table th,
#server-stats-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

#server-stats-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

#server-stats-table tbody tr:hover {
  background: #f8fafc;
}

#server-stats-table tbody tr:last-child td {
  border-bottom: none;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-badge.online {
  background: #dcfce7;
  color: #166534;
}

.status-badge.offline {
  background: #fee2e2;
  color: #991b1b;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
  .stats-overview {
    grid-template-columns: 1fr;
  }
  
  .chart-wrapper {
    height: 300px;
  }
  
  .performance-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 1.5rem;
  }
  
  .stat-card i {
    font-size: 2rem;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .table-wrapper {
    font-size: 0.75rem;
  }
  
  #server-stats-table th,
  #server-stats-table td {
    padding: 0.5rem 0.25rem;
  }
}

/* Update Timestamp */
.last-updated {
  background: #f1f5f9;
  color: #64748b;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  text-align: center;
  margin: 2rem 0;
}