@import url('https://fonts.googleapis.com/css2?family=Anton&family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --black: #0a0a0a;
  --charcoal: #161616;
  --grey: #262626;
  --grey-light: #3a3a3a;
  --grey-border: #333333;
  --text-light: #b8b8b8;
  --white: #f5f5f4;
  --red: #c81717;
  --red-bright: #e2262a;
  --red-glow: #ff3b3b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100%;
}

body {
  background-image:
    radial-gradient(circle at 15% 0%, rgba(200, 23, 23, 0.12), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(200, 23, 23, 0.08), transparent 40%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }

.headline {
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--grey-border);
  background: linear-gradient(180deg, #000000 0%, #0a0a0a 100%);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-mark {
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: 30px;
  line-height: 1;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.brand-mark span {
  color: var(--red-bright);
  text-shadow: 0 0 18px rgba(226, 38, 42, 0.55);
}

.brand-tag {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-left: 1px solid var(--grey-border);
  padding-left: 10px;
  display: none;
}

@media (min-width: 560px) {
  .brand-tag { display: inline; }
}

.main-nav {
  display: flex;
  gap: 6px;
  background: var(--charcoal);
  border: 1px solid var(--grey-border);
  border-radius: 999px;
  padding: 4px;
}

.main-nav a {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
  color: var(--white);
}

.main-nav a.active {
  background: var(--red);
  color: var(--white);
}

/* ---------- Hero ---------- */

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 28px;
  border-bottom: 1px solid var(--grey-border);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 58px);
  margin: 0 0 8px;
  color: var(--white);
}

.hero h1 .accent {
  color: var(--red-bright);
  text-shadow: 0 0 24px rgba(226, 38, 42, 0.45);
}

.hero p {
  color: var(--text-light);
  max-width: 560px;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Page shell ---------- */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-light);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--grey-border);
}

/* ---------- Search & sort ---------- */

.controls-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}

.controls-row .search-wrap {
  margin-bottom: 0;
}

.search-input {
  width: 100%;
  height: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--grey-border);
  background: var(--charcoal);
  color: var(--white);
  font-size: 14px;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 23, 23, 0.15);
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.sort-select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--grey-border);
  background: var(--charcoal);
  color: var(--white);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.sort-select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 23, 23, 0.15);
}

.no-results {
  color: var(--text-light);
  font-size: 14px;
  padding: 8px 4px 20px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.pagination-btn {
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--grey-border);
  background: var(--charcoal);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--red);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.pagination-status {
  font-size: 13px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Episode tiles ---------- */

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.episode-tile {
  background: var(--charcoal);
  border: 1px solid var(--grey-border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.episode-tile.open {
  border-color: var(--red);
}

.episode-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white);
  text-align: left;
  font-family: inherit;
}

.episode-toggle-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
}

.episode-number {
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: 26px;
  color: var(--red-bright);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.episode-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
}

.episode-date {
  font-size: 13px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.episode-chevron {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--grey-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.15s ease, border-color 0.15s ease;
  color: var(--text-light);
}

.episode-tile.open .episode-chevron {
  transform: rotate(180deg);
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.episode-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.episode-tile.open .episode-body {
  grid-template-rows: 1fr;
}

.episode-body-inner {
  overflow: hidden;
}

.episode-body-content {
  padding: 4px 22px 24px;
  border-top: 1px solid var(--grey-border);
}

.gas-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(230, 178, 46, 0.12);
  border: 1px solid rgba(230, 178, 46, 0.5);
  color: #e6b22e;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

a.gas-badge:hover {
  border-color: #e6b22e;
  background: rgba(230, 178, 46, 0.2);
}

.contestant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.contestant-card {
  background: var(--grey);
  border: 1px solid var(--grey-border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contestant-card.is-winner {
  border-color: var(--red-bright);
  box-shadow: 0 0 0 1px var(--red-bright), 0 0 20px rgba(226, 38, 42, 0.35);
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: 18px;
  color: var(--white);
  background: linear-gradient(145deg, var(--grey-light), #1c1c1c);
  border: 1px solid var(--grey-border);
  position: relative;
}

.contestant-card.is-winner .avatar:not(.avatar-photo) {
  background: linear-gradient(145deg, var(--red), #3d0808);
  border-color: var(--red-bright);
}

.contestant-card.is-winner .avatar.avatar-photo {
  border-color: var(--red-bright);
  box-shadow: 0 0 0 2px var(--red-bright), 0 0 16px rgba(226, 38, 42, 0.5);
}

.avatar-photo {
  background-size: cover;
  background-position: center;
  font-size: 0;
}

.winner-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--red-bright);
  color: var(--white);
  font-size: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--charcoal);
}

.contestant-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 6px;
  line-height: 1.25;
}

.contestant-record {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.contestant-record strong {
  color: var(--white);
}

.ig-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--grey-border);
  color: var(--text-light);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.ig-link:hover {
  color: var(--red-bright);
  border-color: var(--red-bright);
}

.ig-link svg { width: 14px; height: 14px; }

.episode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn-outline {
  background: transparent;
  border-color: var(--grey-border);
  color: var(--white);
}

.btn-outline:hover { border-color: var(--white); }

.btn-reveal {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 0 18px rgba(200, 23, 23, 0.35);
}

.btn-reveal:hover { background: var(--red-bright); }

.btn-reveal[disabled] {
  background: var(--grey-light);
  color: var(--text-light);
  box-shadow: none;
  cursor: default;
}

.btn-reveal.is-revealed {
  background: var(--grey-light);
  color: var(--white);
  box-shadow: none;
}

.btn-reveal.is-revealed:hover {
  background: var(--grey-border);
}

/* ---------- Comedians directory ---------- */

.comedian-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.comedian-card {
  background: var(--charcoal);
  border: 1px solid var(--grey-border);
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.comedian-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}

.comedian-card .avatar {
  width: 68px;
  height: 68px;
  font-size: 22px;
  margin-bottom: 14px;
}

.comedian-card .contestant-name {
  font-size: 15px;
  margin-bottom: 8px;
}

.comedian-card .contestant-record {
  font-size: 12px;
  margin-bottom: 12px;
}

/* ---------- Stats ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--charcoal);
  border: 1px solid var(--grey-border);
  border-radius: 14px;
  padding: 22px;
}

.stat-card-title {
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin: 0 0 18px;
}

.stat-card-caption {
  margin: -12px 0 16px;
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.summary-tile {
  background: var(--charcoal);
  border: 1px solid var(--grey-border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.summary-value {
  display: block;
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: 40px;
  color: var(--red-bright);
  text-shadow: 0 0 20px rgba(226, 38, 42, 0.35);
  line-height: 1.1;
}

.summary-label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rivalry-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.rivalry-guest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.rivalry-guest .stat-name {
  white-space: normal;
}

.rivalry-vs {
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: 14px;
  color: var(--text-light);
  flex-shrink: 0;
}

.rivalry-count {
  text-align: center;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-light);
}

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-rank {
  width: 20px;
  flex-shrink: 0;
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: 16px;
  color: var(--text-light);
  text-align: center;
}

.stat-row:first-child .stat-rank {
  color: var(--red-bright);
}

.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 13px;
  margin: 0;
}

.stat-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value {
  font-family: 'Anton', 'Bebas Neue', sans-serif;
  font-size: 18px;
  color: var(--white);
  flex-shrink: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--grey-border);
  padding: 26px 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.site-footer span { color: var(--red-bright); }
