/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --accent: #e63946;
  --accent-glow: rgba(230, 57, 70, 0.3);
  --accent-light: #ff6b6b;
  --text-primary: #e8e8e8;
  --text-secondary: #8a8a9a;
  --text-muted: #555566;
  --border: #2a2a3e;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

/* === Header === */
.header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(180deg, #12121a 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border);
}

.header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.header__logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px var(--accent-glow));
  border-radius: 8px;
}

.header__title {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* === Tabs === */
.tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.tabs__btn {
  padding: 0.7rem 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tabs__btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.tabs__btn--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* === Content === */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.tab-panel {
  display: none;
}

.tab-panel--active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Leaderboard (Poster Grid) === */
.leaderboard {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* === WANTED Poster Card === */
.poster {
  width: 160px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.poster:hover {
  transform: scale(1.05);
}

.poster__inner {
  background: #f4e4c1;
  border: 2px solid #8b6914;
  border-radius: 3px;
  padding: 0.4rem 0.5rem 0.5rem;
  text-align: center;
  position: relative;
  box-shadow:
    0 3px 15px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(139, 105, 20, 0.15);
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(139, 105, 20, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 105, 20, 0.08) 0%, transparent 50%);
}

.poster__header {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: #1a1a1a;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  text-shadow: 1px 1px 0 rgba(139, 105, 20, 0.3);
}

.poster__photo-wrap {
  width: 130px;
  margin: 0 auto 0.2rem;
  border: 2px solid #8b6914;
  overflow: hidden;
  background: #d4c49a;
}

.poster__photo {
  width: 100%;
  height: auto;
  display: block;
}

.poster__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  width: 100%;
  height: 120px;
}

.poster__dead {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.5rem;
  color: #1a1a1a;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
  font-weight: 600;
}

.poster__name {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.8rem;
  font-weight: 900;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster__bounty {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.75rem;
  font-weight: 800;
  color: #8b1a1a;
  letter-spacing: 0.5px;
}

.poster__rank {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 0.6rem;
  font-weight: 800;
  color: #8b6914;
  opacity: 0.6;
}

/* Clean poster — just the image, no extra text */
.poster__inner--clean {
  padding: 0;
  overflow: hidden;
  border-radius: 3px;
}

.poster__inner--clean .poster__rank {
  color: #fff;
  opacity: 0.8;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  font-size: 0.7rem;
  top: 5px;
  right: 7px;
}

.poster__fullimg {
  width: 100%;
  height: auto;
  display: block;
}

/* === Empty state === */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* === Info / How to earn === */
.info-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-alert {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(230, 57, 70, 0.08);
  border: 1px solid rgba(230, 57, 70, 0.25);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.info-alert__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.highlight {
  color: var(--accent-light);
  font-weight: 700;
}

/* === Rules === */
.rules {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rules h2 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.rule {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.rule__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* === Points Tables === */
.tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.points-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.points-table--tournaments {
  max-width: 400px;
}

.points-table__title {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), transparent);
  border-bottom: 1px solid var(--border);
}

.points-table__desc {
  padding: 0.75rem 1rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 0.6rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(42, 42, 62, 0.5);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(230, 57, 70, 0.05);
}

tbody td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--accent-light);
}

/* === Responsive === */
@media (max-width: 600px) {
  .header__logo {
    flex-direction: column;
    gap: 0.5rem;
  }

  .header__title {
    font-size: 1.2rem;
  }

  .tabs__btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .tables-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard {
    gap: 1rem;
  }

  .poster {
    width: 160px;
  }

  .poster__photo-wrap {
    width: 120px;
    height: 105px;
  }

  .poster__header {
    font-size: 1.3rem;
  }
}
