/* ============================================================
   AGORA — COMPARISON STYLES  v2.0
   Player Comparison, Seasons, Missions, ELO, Highlights, Live,
   Duels, Heatmaps, Clans
   ============================================================ */


/* ---- 25. Player Comparison -------------------------------- */
.stats-compare-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent 50%), var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
.stats-compare-section__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-100);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.stats-compare-search {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}
.stats-compare-input {
  flex: 1;
  padding: .5rem .75rem;
  background: var(--bg-700);
  border: 1px solid var(--line-500);
  border-radius: var(--r-xs);
  color: var(--text-100);
  font-size: .9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.stats-compare-input::placeholder { color: var(--text-400); }
.stats-compare-input:focus { outline: 2px solid var(--brand-500); outline-offset: -1px; }
.stats-compare-loading, .stats-compare-error {
  padding: .75rem;
  border-radius: var(--r-xs);
  font-size: .9rem;
  text-align: center;
}
.stats-compare-loading { background: var(--bg-700); color: var(--text-300); }
.stats-compare-error { background: rgba(255,60,60,.1); color: #ff6b6b; border: 1px solid rgba(255,60,60,.2); }

/* Header with avatars */
.stats-compare-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-500);
}
.stats-compare-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  min-width: 100px;
}
.stats-compare-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--line-500);
}
.stats-compare-vs {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-500);
}
.stats-compare-score {
  font-size: .75rem;
  color: var(--text-400);
}
.stats-compare-score--winner { color: var(--brand-400); font-weight: 600; }

/* Comparison bars */
.stats-compare-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.stats-compare-val {
  width: 60px;
  font-size: .8rem;
  color: var(--text-300);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.stats-compare-val--left { text-align: right; }
.stats-compare-val--right { text-align: left; }
.stats-compare-val.stats-compare-bar--winner { color: var(--brand-400); font-weight: 600; }
.stats-compare-bar-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  height: 24px;
  background: var(--bg-700);
  border-radius: 4px;
  overflow: hidden;
}
.stats-compare-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-200);
  z-index: 1;
  text-shadow: 0 1px 3px var(--bg-900);
  white-space: nowrap;
}
.stats-compare-bar {
  height: 100%;
  transition: width .4s ease;
}
.stats-compare-bar--left {
  background: var(--bg-600);
  position: absolute;
  right: 50%;
  border-radius: 4px 0 0 4px;
}
.stats-compare-bar--right {
  background: var(--bg-600);
  position: absolute;
  left: 50%;
  border-radius: 0 4px 4px 0;
}
.stats-compare-bar--winner.stats-compare-bar--left { background: var(--brand-600); }
.stats-compare-bar--winner.stats-compare-bar--right { background: var(--brand-600); }

.stats-compare-actions {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .stats-compare-search { flex-direction: column; }
  .stats-compare-header { gap: .75rem; }
  .stats-compare-val { width: 45px; font-size: .7rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   26 · SEASONS
   ═══════════════════════════════════════════════════════════════════════════ */

.seasons-hero { text-align: center; padding-top: 2rem; }
.seasons-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text-100);
}
.seasons-hero__subtitle {
  color: var(--text-300);
  margin-top: .5rem;
  font-size: .95rem;
}

/* Loading & empty */
.seasons-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 2rem 0;
  color: var(--text-300);
}
.seasons-empty {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-300);
}
.seasons-empty h2,
.seasons-empty h3 { color: var(--text-100); margin-bottom: .5rem; }
.seasons-empty-text {
  color: var(--text-400);
  font-size: .9rem;
  text-align: center;
  padding: 1rem 0;
}

/* ── Current season card ────────────────────────────────────────────── */
.seasons-current-card {
  background: var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.seasons-current-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.seasons-current-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-100);
  margin: 0;
}
.seasons-current-card__badge {
  background: var(--brand-600);
  color: var(--text-100);
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.seasons-current-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
  font-size: .85rem;
  color: var(--text-300);
}
.seasons-current-card__countdown {
  color: var(--brand-400);
  font-weight: 600;
}
.seasons-current-card__progress {
  margin-top: .75rem;
  height: 6px;
  background: var(--bg-700);
  border-radius: 3px;
  overflow: hidden;
}
.seasons-current-card__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-400));
  border-radius: 3px;
  width: 0;
  transition: width .6s ease;
}

/* Rankings title */
.seasons-rankings-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-100);
  margin-top: 1.5rem;
  margin-bottom: .75rem;
}

/* Live rankings table wrapper */
.seasons-live-table-wrapper {
  overflow-x: auto;
}
.seasons-live-row.seasons-rank--top1 td:first-child {
  color: #ffd700;
  font-weight: 700;
}
.seasons-live-row.seasons-rank--top2 td:first-child {
  color: #c0c0c0;
  font-weight: 700;
}
.seasons-live-row.seasons-rank--top3 td:first-child {
  color: #cd7f32;
  font-weight: 700;
}

/* ── Archive grid ───────────────────────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 1rem;
}
.seasons-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* Season card */
.seasons-card {
  background: var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-sm);
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
}
.seasons-card:hover,
.seasons-card:focus-visible {
  border-color: var(--brand-500);
  transform: translateY(-2px);
  outline: none;
}
.seasons-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.seasons-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-100);
  margin: 0;
}
.seasons-card__status {
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .5rem;
  border-radius: var(--r-lg);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.seasons-card__status--completed {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.seasons-card__dates {
  color: var(--text-400);
  font-size: .8rem;
  margin-top: .4rem;
}

/* Mini podium in card */
.seasons-card-podium {
  margin-top: .75rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.seasons-card-podium__player {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-200);
}
.seasons-card-podium__medal {
  font-size: 1rem;
  width: 1.2rem;
  text-align: center;
}
.seasons-card-podium__avatar {
  border-radius: 50%;
  object-fit: cover;
}
.seasons-card-podium__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seasons-card-podium__kills {
  color: var(--text-400);
  font-size: .75rem;
  white-space: nowrap;
}
.seasons-card__cta {
  color: var(--brand-400);
  font-size: .8rem;
  margin-top: .75rem;
  font-weight: 500;
}

/* ── Season detail modal ────────────────────────────────────────────── */
.modal--wide {
  max-width: 800px;
  width: 95vw;
}
.season-detail-dates {
  color: var(--text-400);
  font-size: .85rem;
  margin: .25rem 0 1rem;
}
.season-detail-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.season-podium-card {
  background: var(--bg-700);
  border-radius: var(--r-sm);
  padding: 1rem;
  text-align: center;
  min-width: 140px;
  flex: 0 1 180px;
}
.season-podium-card--1 {
  border: 1px solid #ffd700;
  transform: translateY(-8px);
}
.season-podium-card--2 {
  border: 1px solid #c0c0c0;
}
.season-podium-card--3 {
  border: 1px solid #cd7f32;
}
.season-podium-card__rank {
  font-size: 1.5rem;
  margin-bottom: .25rem;
}
.season-podium-card__avatar {
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto .5rem;
}
.season-podium-card__name {
  font-weight: 600;
  color: var(--text-100);
  font-size: .9rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.season-podium-card__stat {
  color: var(--text-300);
  font-size: .78rem;
  margin: .25rem 0 0;
}
.season-podium-card__badge {
  font-size: .75rem;
  color: var(--brand-400);
  margin: .25rem 0 0;
}

.season-detail-table-wrapper {
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}
.season-detail-table thead { position: sticky; top: 0; z-index: 1; background: var(--bg-800); }

@media (max-width: 600px) {
  .seasons-current-card { padding: 1rem; }
  .seasons-current-card__title { font-size: 1.15rem; }
  .seasons-archive-grid { grid-template-columns: 1fr; }
  .season-detail-podium { gap: .5rem; }
  .season-podium-card { min-width: 100px; padding: .75rem; }
  .season-podium-card--1 { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   27 · MISSIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.stats-missions-section { margin-top: 2rem; }
.stats-missions-section__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 1rem;
}
.stats-missions-loading,
.stats-missions-error {
  color: var(--text-400);
  font-size: .9rem;
  padding: .5rem 0;
}
.stats-missions-error { color: var(--danger-500); }

.stats-missions-group { margin-bottom: 1.5rem; }
.stats-missions-group__title {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-200);
  margin-bottom: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stats-missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
}
.stats-missions-empty {
  color: var(--text-400);
  font-size: .85rem;
}
.stats-missions-section__note {
  color: var(--text-400);
  font-size: .78rem;
  margin-top: .5rem;
}

/* Mission card */
.stats-mission-card {
  display: flex;
  gap: .75rem;
  background: var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-sm);
  padding: 1rem;
  transition: border-color .2s;
}
.stats-mission-card--completed {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
}
.stats-mission-card__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
}
.stats-mission-card__body {
  flex: 1;
  min-width: 0;
}
.stats-mission-card__title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-100);
  margin: 0 0 .2rem;
}
.stats-mission-card__desc {
  font-size: .8rem;
  color: var(--text-400);
  margin: 0 0 .5rem;
}
.stats-mission-card__progress {
  height: 6px;
  background: var(--bg-700);
  border-radius: 3px;
  overflow: hidden;
}
.stats-mission-card__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-400));
  border-radius: 3px;
  transition: width .4s ease;
}
.stats-mission-card--completed .stats-mission-card__progress-bar {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}
.stats-mission-card__progress-text {
  font-size: .75rem;
  color: var(--text-300);
  margin-top: .25rem;
}
.stats-mission-card--completed .stats-mission-card__progress-text {
  color: #22c55e;
  font-weight: 600;
}

@media (max-width: 600px) {
  .stats-missions-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   28 · ELO SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

.elo-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .65rem;
  border: 1px solid;
  border-radius: var(--r-pill);
  background: var(--bg-800);
  font-size: .82rem;
  margin-top: .5rem;
}
.elo-badge__icon { font-size: 1rem; }
.elo-badge__score { font-weight: 700; font-size: .9rem; }
.elo-badge__tier {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-300);
}
.elo-sparkline {
  width: 100%;
  max-width: 300px;
  height: 60px;
  display: block;
  margin-top: .5rem;
}
.elo-history-label {
  font-size: .8rem;
  color: var(--text-400);
  margin-bottom: .25rem;
}
.elo-leaderboard-subtitle {
  color: var(--text-400);
  font-size: .85rem;
  margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   29 · HIGHLIGHTS
   ═══════════════════════════════════════════════════════════════════════════ */

.highlights-feed { display: flex; flex-direction: column; gap: .5rem; }
.highlights-empty { color: var(--text-400); font-size: .85rem; padding: 1rem 0; }

.highlight-card {
  display: flex;
  gap: .75rem;
  background: var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-sm);
  padding: .75rem 1rem;
}
.highlight-card__icon { font-size: 1.4rem; flex-shrink: 0; }
.highlight-card__body { flex: 1; min-width: 0; }
.highlight-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.highlight-card__title {
  font-size: .88rem;
  color: var(--text-100);
}
.highlight-card__time {
  font-size: .72rem;
  color: var(--text-400);
  white-space: nowrap;
}
.highlight-card__desc {
  font-size: .8rem;
  color: var(--text-300);
  margin: .15rem 0 .3rem;
}
.highlight-card__player {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: var(--brand-400);
  text-decoration: none;
}
.highlight-card__player:hover { text-decoration: underline; }
.highlight-card__avatar {
  border-radius: 50%;
  object-fit: cover;
}

/* ─── 30 · LIVE DASHBOARD ──────────────────────────────────────────────── */

/* Hero */
.live-hero { padding: 3rem 0 1.5rem; text-align: center; }
.live-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text-100);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}
.live-hero__subtitle {
  color: var(--text-400);
  font-size: .95rem;
  margin-top: .4rem;
}

/* Pulse dot */
.live-pulse {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--brand-500);
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(59,130,246,.6); }
  50% { opacity: .7; box-shadow: 0 0 0 8px rgba(59,130,246,0); }
}

/* Server card */
.live-server-card {
  background: var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-lg);
  padding: 1.5rem 2rem;
  max-width: 600px;
  margin: 0 auto;
  transition: border-color .3s;
}
.live-server-card--online { border-color: var(--success-500, #22c55e); }
.live-server-card--offline { border-color: var(--text-400); }
.live-server-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.live-server-card__status { display: flex; align-items: center; gap: .5rem; }
.live-server-card__updated { font-size: .75rem; color: var(--text-400); }
.live-server-card__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: 1rem;
}
.live-server-card__actions { margin-top: 1.25rem; text-align: center; }

/* Status dot */
.live-status-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-400);
}
.live-status-dot--online { background: var(--success-500, #22c55e); box-shadow: 0 0 6px rgba(34,197,94,.5); }
.live-status-dot--offline { background: var(--text-400); }
.live-status-label { font-size: .85rem; font-weight: 600; color: var(--text-400); }
.live-status-label--online { color: var(--success-500, #22c55e); }
.live-status-label--offline { color: var(--text-400); }

/* Stats grid */
.live-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}
.live-stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-100);
}
.live-stat__label {
  display: block;
  font-size: .75rem;
  color: var(--text-400);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Fill bar */
.live-fill-bar { margin-top: 1rem; }
.live-fill-bar__track {
  height: 8px;
  background: var(--bg-700);
  border-radius: 4px;
  overflow: hidden;
}
.live-fill-bar__fill {
  height: 100%;
  background: var(--brand-500);
  border-radius: 4px;
  transition: width .6s ease;
}
.live-fill-bar__fill--busy { background: var(--warning-500, #f59e0b); }
.live-fill-bar__fill--full { background: var(--danger-500); }
.live-fill-bar__text {
  display: block;
  text-align: center;
  font-size: .75rem;
  color: var(--text-400);
  margin-top: .3rem;
}

/* Players section */
.live-players-count {
  font-size: .9rem;
  color: var(--text-400);
  font-weight: 400;
  margin-left: .3rem;
}
.live-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
}
.live-player-card {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .8rem;
  background: var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text-200);
  transition: border-color .2s, background .2s;
}
.live-player-card:hover {
  border-color: var(--brand-500);
  background: var(--bg-700);
}
.live-player-card__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.live-player-card__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-700);
  color: var(--text-400);
  font-size: 1rem;
  font-weight: 600;
}
.live-player-card__name {
  font-size: .85rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-players-empty {
  color: var(--text-400);
  font-size: .85rem;
  text-align: center;
  padding: 1rem;
}

@media (max-width: 600px) {
  .live-server-card { padding: 1rem 1.2rem; }
  .live-stats-grid { gap: .5rem; }
  .live-stat__value { font-size: 1.3rem; }
  .live-players-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── 31 · DUELS ───────────────────────────────────────────────────────── */

.duels-subtitle {
  color: var(--text-300);
  font-size: 1.0625rem;
  text-align: center;
  max-width: 50ch;
  margin-inline: auto;
  margin-top: var(--sp-2);
  line-height: 1.6;
}

/* Duel list */
.duel-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.duel-empty {
  color: var(--text-400); text-align: center; padding: var(--sp-8) 0;
  font-size: .9375rem;
}

/* Duel card */
.duel-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent 50%), var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.duel-card:hover {
  border-color: rgba(255,107,44,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.duel-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.duel-card__metric { font-size: .8rem; color: var(--text-400); }
.duel-card__footer {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--text-400);
  margin-top: .75rem;
}
.duel-card__actions { margin-top: .75rem; text-align: center; }

/* Status badges */
.duel-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: var(--r-xs);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.duel-badge--pending { background: var(--warning-500, #f59e0b); color: #000; }
.duel-badge--active { background: var(--brand-500); color: #fff; }
.duel-badge--completed { background: var(--success-500, #22c55e); color: #fff; }
.duel-badge--expired { background: var(--text-400); color: var(--text-200); }

/* Players row */
.duel-card__players {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.duel-card__vs {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-400);
}
.duel-player {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--text-200);
  min-width: 0;
}
.duel-player:hover { color: var(--brand-400); }
.duel-player--winner { color: var(--success-500, #22c55e); }
.duel-player__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.duel-player__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-700);
  color: var(--text-400);
  font-weight: 600;
}
.duel-player__name {
  font-size: .85rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}
.duel-player__score {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

/* Create form */
.duel-form {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent 50%), var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}
.duel-form__row { display: flex; flex-direction: column; gap: var(--sp-1); }
.duel-form__label { font-size: 0.8125rem; color: var(--text-300); font-weight: 600; letter-spacing: 0.02em; }
.duel-form__input,
.duel-form__select {
  padding: 12px var(--sp-4);
  background: var(--bg-700);
  border: 1px solid var(--line-500);
  border-radius: var(--r-sm);
  color: var(--text-100);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.duel-form__input::placeholder { color: var(--text-400); }
.duel-form__input:focus,
.duel-form__select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(255,107,44,0.12);
}
.duel-form .btn { margin-top: var(--sp-2); }
.duel-form__msg { font-size: 0.8125rem; text-align: center; min-height: 1.2em; }
.duel-form__msg--success { color: var(--success-500, #22c55e); }
.duel-form__msg--error { color: var(--danger-500); }

@media (max-width: 600px) {
  .duel-card__players { flex-direction: column; gap: .5rem; }
  .duel-player__name { max-width: 100px; }
}

/* ─── 32 · HEATMAPS ───────────────────────────────────────────────────── */

.heatmap-subtitle {
  color: var(--text-400);
  font-size: .95rem;
  text-align: center;
  margin-top: -.5rem;
  margin-bottom: 1rem;
}
.heatmap-controls {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.heatmap-controls__row { display: flex; flex-direction: column; gap: .25rem; }
.heatmap-controls__label { font-size: .8rem; color: var(--text-400); font-weight: 500; }
.heatmap-controls__select,
.heatmap-controls__input {
  padding: .45rem .7rem;
  background: var(--bg-700);
  border: 1px solid var(--line-500);
  border-radius: var(--r-sm);
  color: var(--text-100);
  font-size: .85rem;
  font-family: inherit;
  min-width: 160px;
}
.heatmap-controls__select:focus,
.heatmap-controls__input:focus { outline: none; border-color: var(--brand-500); }
.heatmap-count { font-size: .85rem; color: var(--text-400); font-weight: 400; margin-left: .3rem; }
.heatmap-canvas-wrapper {
  max-width: 800px;
  margin: 1rem auto 0;
  border: 1px solid var(--line-500);
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 1;
}
.heatmap-canvas-wrapper canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.heatmap-note {
  text-align: center;
  font-size: .8rem;
  color: var(--text-400);
  margin-top: .5rem;
}
.heatmap-unavailable-card {
  background: var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: center;
  color: var(--text-400);
  max-width: 500px;
  margin: 0 auto;
}
.heatmap-unavailable-card p { margin: .4rem 0; font-size: .9rem; }

/* ─── 33 · CLANS ───────────────────────────────────────────────────────── */

.clan-subtitle {
  color: var(--text-400);
  font-size: .95rem;
  text-align: center;
  margin-top: -.5rem;
  margin-bottom: 1rem;
}
.clan-empty { color: var(--text-400); text-align: center; padding: 2rem 0; font-size: .9rem; }
.clan-search-row { max-width: 400px; margin: 0 auto 1rem; }

/* Clan list */
.clan-list { display: flex; flex-direction: column; gap: .5rem; }
.clan-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  background: var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text-200);
  transition: border-color .2s;
}
.clan-row:hover { border-color: var(--brand-500); }
.clan-row__rank {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-400);
  min-width: 2ch;
  text-align: center;
}
.clan-row__tag {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-400);
  font-size: .9rem;
}
.clan-row__name {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clan-row__stat {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  text-align: right;
  min-width: 70px;
}
.clan-row__stat small {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 400;
  color: var(--text-400);
  display: block;
}

/* Clan detail */
.clan-detail__desc {
  color: var(--text-400);
  font-size: .9rem;
  margin-bottom: 1rem;
  text-align: center;
}
.clan-detail__members-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-300);
  margin: 1.5rem 0 .75rem;
}
.clan-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .6rem;
}
.clan-member-card {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .75rem;
  background: var(--bg-800);
  border: 1px solid var(--line-500);
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text-200);
  transition: border-color .2s;
}
.clan-member-card:hover { border-color: var(--brand-500); }
.clan-member-card__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.clan-member-card__avatar--ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-700); color: var(--text-400); font-weight: 600;
}
.clan-member-card__info { flex: 1; min-width: 0; }
.clan-member-card__name {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clan-member-card__role {
  display: block;
  font-size: .7rem;
  color: var(--text-400);
  text-transform: uppercase;
}
.clan-member-card__stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: .75rem;
  color: var(--text-400);
  gap: .1rem;
}

/* Clan form */
.clan-form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.clan-form__row { display: flex; flex-direction: column; gap: .25rem; }
.clan-form__label { font-size: .8rem; color: var(--text-400); font-weight: 500; }
.clan-form__input,
.clan-form__select {
  padding: .5rem .75rem;
  background: var(--bg-700);
  border: 1px solid var(--line-500);
  border-radius: var(--r-sm);
  color: var(--text-100);
  font-size: .9rem;
  font-family: inherit;
}
.clan-form__input:focus { outline: none; border-color: var(--brand-500); }
.clan-form__msg { font-size: .8rem; text-align: center; min-height: 1.2em; }
.clan-form__msg--success { color: var(--success-500, #22c55e); }
.clan-form__msg--error { color: var(--danger-500); }

@media (max-width: 600px) {
  .clan-row { flex-wrap: wrap; gap: .4rem; }
  .clan-row__stat { min-width: auto; font-size: .8rem; }
  .clan-members-grid { grid-template-columns: 1fr; }
}
