:root {
  --bg: #050914;
  --bg-secondary: #0a0f1b;
  --surface: #0b1020;
  --surface-hover: #151d35;
  --border: rgba(255, 255, 255, 0.08);
  --text-main: #f9fbff;
  --text-muted: #9aa3b7;
  --accent: #3aa6ff;
  --accent-secondary: #7d5bff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
}

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

/* ===============================
   HEADER
   =============================== */

.header {
  background: linear-gradient(135deg, rgba(11, 16, 32, 0.8), rgba(13, 18, 35, 0.8));
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 32px;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.header-left {
  flex-shrink: 0;
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.header-center {
  flex: 1;
}

.header-center h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.header-center p {
  font-size: 13px;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(58, 166, 255, 0.3);
}

.btn-discord {
  background: rgba(88, 101, 242, 0.2);
  color: #58a8ff;
  border: 1px solid rgba(88, 101, 242, 0.4);
}

.btn-discord:hover {
  background: rgba(88, 101, 242, 0.3);
  border-color: rgba(88, 101, 242, 0.6);
}

.btn-secondary {
  background: rgba(58, 166, 255, 0.15);
  color: #6ee7ff;
  border: 1px solid rgba(58, 166, 255, 0.4);
}

.btn-secondary:hover {
  background: rgba(58, 166, 255, 0.25);
  border-color: rgba(58, 166, 255, 0.7);
  transform: translateY(-2px);
}

/* ===============================
   TABS
   =============================== */

.tabs-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  margin-bottom: 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tabs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 8px;
  min-height: 48px;
  align-items: center;
}

.tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  height: 48px;
  display: flex;
  align-items: center;
}

.tab:hover {
  color: var(--text-main);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===============================
   MAIN CONTENT
   =============================== */

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  margin-bottom: 60px;
}

.tiers-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  grid-auto-rows: max-content;
}

.tier-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.tier-section:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(58, 166, 255, 0.1);
}

.tier-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.tier-label-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tier-label-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  flex: 1;
}

.tier-player-badge {
  background: rgba(58, 166, 255, 0.1);
  border: 1px solid rgba(58, 166, 255, 0.3);
  color: var(--accent);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* High tier (brighter background) */
.tier-player-badge.high-tier {
  background: rgba(58, 166, 255, 0.25);
  border-color: rgba(58, 166, 255, 0.6);
  color: #6ee7ff;
}

.tier-player-badge:hover {
  background: rgba(58, 166, 255, 0.2);
  border-color: rgba(58, 166, 255, 0.5);
  transform: translateX(4px);
}

.tier-player-badge.high-tier:hover {
  background: rgba(58, 166, 255, 0.35);
  border-color: rgba(58, 166, 255, 0.8);
}

.tier-empty {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  padding: 8px 0;
}

/* ===============================
   MODAL
   =============================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  z-index: 2;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 24px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
}

.modal-tiers-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-tier-section {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.modal-tier-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 100px;
  font-size: 12px;
  text-transform: uppercase;
}

.modal-tier-value {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===============================
   FOOTER
   =============================== */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.footer p {
  margin: 0;
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .header-center h1 {
    font-size: 24px;
  }

  .header-right {
    width: 100%;
    justify-content: center;
  }

  .tabs-container {
    padding: 0 12px;
  }

  .tiers-table th,
  .tiers-table td {
    padding: 12px 16px;
    font-size: 12px;
  }

  .tier-badge {
    padding: 3px 8px;
    font-size: 11px;
  }

  .modal-content {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .header {
    margin-bottom: 20px;
  }

  .logo {
    width: 48px;
    height: 48px;
  }

  .header-center h1 {
    font-size: 20px;
  }

  .header-center p {
    font-size: 12px;
  }

  .btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .tiers-table th,
  .tiers-table td {
    padding: 10px 12px;
    font-size: 11px;
  }
}

