/* style-areas.css — page and feature areas (hero, articles, teams, matches, room, notifications, error pages, footer, game cards).
   Split out of style.css; loaded right after it, in this order: style.css, style-areas.css,
   style-overrides.css. The order is the cascade, so keep the three links together. */

/* ---------------- HERO ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */
.hero {
  position: relative;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 60% at 50% 0%,
    var(--teal-glow-lg) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------------- STATS STRIP ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.stats-strip {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* ---------------- LEADERBOARD ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */

/* ---------------- NEWS GRID -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */

/* News categories for show page */

/* ---------------- ARTICLE PAGE -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */

.article-body {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.article-body h2,
.article-body h3 {
  margin: 1.5rem 0 0.5rem;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

/* Rich story typography (news detail redesign) */
.news-story-prose {
  color: var(--text-secondary);
  line-height: 1.85;
  font-size: 0.98rem;
}

.news-story-prose > :first-child {
  margin-top: 0;
}

.news-story-prose h2,
.news-story-prose h3,
.news-story-prose h4 {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  line-height: 1.2;
}

.news-story-prose h2 {
  font-size: 1.7rem;
  border-left: 3px solid var(--teal-border-solid);
  padding-left: 0.7rem;
}

.news-story-prose h3 {
  font-size: 1.35rem;
  color: var(--legacy-purple-200);
}

.news-story-prose p {
  margin-bottom: 1.05rem;
}

.news-story-prose a {
  color: var(--legacy-cyan-300);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-story-prose a:hover {
  color: #a5f3fc;
}

.news-story-prose blockquote {
  margin: 1.2rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--accent-purple);
  background: var(--teal-glow-sm);
  color: var(--text-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.news-story-prose pre,
.news-story-prose code {
  font-family: Consolas, "Courier New", monospace;
}

.news-story-prose pre {
  background: #0a1020;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  overflow: auto;
  margin: 1rem 0;
}

.news-story-prose code {
  background: rgba(var(--legacy-scrim-rgb), 0.9);
  border: 1px solid rgba(var(--neutral-500-rgb), 0.2);
  border-radius: 5px;
  padding: 0.08rem 0.35rem;
  font-size: 0.9em;
}

.news-story-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.news-story-prose th,
.news-story-prose td {
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.news-story-prose th {
  background: var(--teal-glow-md);
  color: var(--text-primary);
}

/* Body editor feature classes */
.news-story-prose u {
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.news-story-prose .lead {
  font-size: 1.1rem;
  color: #dbe7ff;
}

.news-story-prose .callout {
  border-left: 4px solid rgba(var(--legacy-cyan-400-rgb), 0.75);
  background: rgba(var(--legacy-cyan-400-rgb), 0.08);
  padding: 0.75rem 0.9rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.news-story-prose .text-red {
  color: var(--legacy-red-400);
}

.news-story-prose .text-orange {
  color: var(--legacy-orange-400);
}

.news-story-prose .text-amber {
  color: var(--st-warning);
}

.news-story-prose .text-yellow {
  color: var(--legacy-yellow-400);
}

.news-story-prose .text-green {
  color: var(--bd-green);
}

.news-story-prose .text-cyan {
  color: var(--brand-secondary-light);
}

.news-story-prose .text-blue {
  color: var(--brand-primary-light);
}

.news-story-prose .text-purple {
  color: var(--legacy-purple-400);
}

.news-story-prose .text-pink {
  color: #f472b6;
}

.news-story-prose .text-slate {
  color: var(--neutral-300);
}

.news-story-prose .text-white {
  color: var(--neutral-0);
}

.news-story-prose .text-muted {
  color: var(--text-secondary);
}

.news-story-prose figure {
  margin: 1rem 0;
}

.news-story-prose figure img,
.news-story-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.news-story-prose figcaption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.45rem;
  text-align: center;
}

.news-story-prose figure.img-left,
.news-story-prose img.img-left {
  float: left;
  width: min(46%, 320px);
  margin: 0.35rem 1rem 0.8rem 0;
}

.news-story-prose figure.img-right,
.news-story-prose img.img-right {
  float: right;
  width: min(46%, 320px);
  margin: 0.35rem 0 0.8rem 1rem;
}

.news-story-prose figure.img-center,
.news-story-prose img.img-center {
  display: block;
  margin: 1rem auto;
  float: none;
}

.news-story-prose figure.img-wide,
.news-story-prose img.img-wide {
  width: 100%;
  float: none;
  margin: 1rem 0;
}

.news-story-prose figure.img-small,
.news-story-prose img.img-small {
  width: min(34%, 240px);
}

.news-story-prose::after {
  content: "";
  display: block;
  clear: both;
}

/* ---------------- RICH LEGACY EDITOR -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.rte-wrap {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
}

.rte-wrap:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px var(--teal-glow-lg);
}

/* Toolbar */
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 8px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  row-gap: 4px;
}

.rte-sep {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
  margin: 0 4px;
  flex-shrink: 0;
}

.rte-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  white-space: nowrap;
}

.rte-btn:hover {
  background: rgba(var(--neutral-0-rgb), 0.07);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.rte-btn.active {
  background: var(--teal-glow-xl);
  color: var(--accent-purple-light);
  border-color: var(--teal-border-lg);
}

.rte-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  height: 26px;
  padding: 0 6px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  max-width: 120px;
}

.rte-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

/* Color swatch group */
.rte-color-group {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.rte-color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(var(--neutral-0-rgb), 0.15);
  cursor: pointer;
  transition:
    transform 0.1s,
    border-color 0.1s;
  flex-shrink: 0;
}

.rte-color-swatch:hover {
  transform: scale(1.25);
  border-color: var(--neutral-0);
}

/* Line numbers wrapper */
.rte-editor-wrap {
  display: flex;
  flex: 1;
  min-height: 340px;
  max-height: 700px;
  overflow: hidden;
}

.rte-line-numbers {
  min-width: 38px;
  padding: 10px 6px 10px 8px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  text-align: right;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.78rem;
  color: var(--neutral-600);
  user-select: none;
  line-height: 1.65;
  overflow: hidden;
  flex-shrink: 0;
}

.rte-line-numbers span {
  display: block;
  line-height: inherit;
}

/* The editable area */
.rte-content {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.93rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  line-height: 1.65;
  color: var(--text-primary);
  overflow-y: auto;
  max-height: 700px;
  outline: none;
}

.rte-content:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
  display: block;
}

/* styling inside the editor */
.rte-content h2 {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 1.45rem;
  color: var(--legacy-purple-200);
  margin-top: 1rem;
  margin-bottom: 0.3rem;
}

.rte-content h3 {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  color: #a5f3fc;
  margin-top: 0.8rem;
  margin-bottom: 0.25rem;
}

.rte-content h4 {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  margin-top: 0.7rem;
  margin-bottom: 0.2rem;
}

.rte-content blockquote {
  border-left: 3px solid var(--accent-purple);
  padding-left: 0.75rem;
  margin: 0.6rem 0;
  color: var(--neutral-300);
}

.rte-content figure {
  margin: 0.8rem 0;
}

.rte-content figure img,
.rte-content img {
  max-width: 100%;
  border-radius: 6px;
}

.rte-content figcaption {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.3rem;
}

.rte-content code {
  font-family: Consolas, monospace;
  background: rgba(var(--legacy-scrim-rgb), 0.9);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  font-size: 0.88em;
}

/* Status bar */
.rte-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--neutral-600);
  gap: 1rem;
}

.rte-statusbar-left {
  display: flex;
  gap: 0.75rem;
}

/* Image dialog */
.rte-img-dialog {
  display: none;
  position: absolute;
  z-index: 300;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1rem;
  min-width: 300px;
  box-shadow: 0 16px 48px rgba(var(--shadow-color), 0.5);
}

.rte-img-dialog.show {
  display: block;
}

.rte-img-dialog-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 299;
}

.rte-img-dialog-backdrop.show {
  display: block;
}

/* ---------------- AUTH PAGES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 128px);
  padding: 3rem 1rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-card-wide {
  max-width: 620px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.auth-title {
  font-size: 1.75rem;
}

.auth-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* ---------------- DEMO CREDENTIALS ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */
.auth-container {
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.role-badge-admin {
  background: var(--accent-purple);
  color: var(--neutral-0);
}

.role-badge-staff {
  background: var(--legacy-cyan-600);
  color: var(--neutral-0);
}

.role-badge-organizer {
  background: var(--legacy-emerald-600);
  color: var(--neutral-0);
}

.role-badge-referee {
  background: #d97706;
  color: var(--neutral-0);
}

.role-badge-leader {
  background: var(--legacy-red-600);
  color: var(--neutral-0);
}

.role-badge-player {
  background: var(--neutral-600);
  color: var(--neutral-0);
}

/* ---------------- PROFILE / ACCOUNT ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.profile-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

.profile-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
}

.profile-avatar-wrap {
  margin-bottom: 1rem;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto;
  border: 3px solid var(--accent-purple);
}

.profile-avatar img {
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--accent-purple-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--neutral-0);
  margin: 0 auto;
  border: 3px solid var(--accent-purple);
}

.profile-name {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.profile-username {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.profile-meta {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Info list */

/* ---------------- TEAMS ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.team-banner {
  background: var(--bg-elevated);
  background-size: cover;
  background-position: center;
  min-height: 220px;
  position: relative;
}

.team-banner-overlay {
  background: linear-gradient(
    to top,
    rgba(10, 10, 15, 0.95) 30%,
    rgba(10, 10, 15, 0.4)
  );
  padding: 2rem 3rem 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  min-height: 220px;
}

.team-identity {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
}

.team-logo-lg {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--accent-purple);
}

.team-logo-placeholder-lg {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: var(--accent-purple-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--neutral-0);
}

.team-name {
  font-size: 2rem;
  line-height: 1.1;
}

.team-tag {
  color: var(--accent-cyan);
}

.team-elo {
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.team-region {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.team-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.team-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Lineup */

.lineup-slot-list {
  display: grid;
  gap: 1.25rem;
}

.lineup-slot-card {
  min-width: 0;
}

.lineup-refresh-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.lineup-page-header {
  align-items: center;
}

/* Match history */

.match-vs {
  flex: 1;
  font-weight: 600;
}

/* ---------------- H2H -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.h2h-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 3rem 1.5rem;
  flex-wrap: wrap;
}

.h2h-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.h2h-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.h2h-logo-init {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-purple-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--neutral-0);
}

.h2h-score {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.h2h-score-num {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  min-width: 3rem;
  text-align: center;
}

.h2h-vs {
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 700;
}

/* ---------------- MATCHES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */

.game-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}

.game-num {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.game-winner {
  font-weight: 700;
  flex: 1;
}

/* ---------------- ROOM ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */
.room-body {
  background: var(--bg-primary);
}

.room-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  gap: 1rem;
}

.room-brand {
  font-size: 1.1rem;
}

.room-match-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  flex: 1;
  text-align: center;
}

.room-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  overflow: hidden;
}

.room-score-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.room-team {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  justify-content: flex-end;
}

.room-team:last-child {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.room-team-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.room-team-name {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.room-team-winner .room-team-name {
  color: var(--accent-cyan);
}

.room-score {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.room-score-num {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  min-width: 2rem;
  text-align: center;
  transition: color 0.3s;
}

.room-score-sep {
  color: var(--text-muted);
  font-size: 1.5rem;
}

.room-meta-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.room-code {
  font-size: 0.85rem;
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
}

.room-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 0;
}

.room-panel {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.room-judge-panel {
  border-right: 1px solid var(--border-subtle);
}

.room-panel-title {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.room-feed {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feed-event {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  background: var(--bg-elevated);
  border-left: 3px solid var(--border-default);
}

.feed-ts {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.15rem;
}

.feed-msg {
  color: var(--text-secondary);
}

.feed-event-game_submitted {
  border-color: var(--accent-cyan);
}

.feed-event-dispute_raised {
  border-color: var(--status-disputed);
}

.feed-event-match_complete {
  border-color: var(--bd-green);
}

.ended-banner {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

/* ---------------- CHALLENGES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */

/* ---------------- TOURNAMENTS PAGE ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */
.tournament-banner {
  background: var(--bg-elevated);
  background-size: cover;
  background-position: center;
  min-height: 260px;
  position: relative;
}

.tournament-banner-overlay {
  background: linear-gradient(
    to top,
    rgba(10, 10, 15, 0.96) 35%,
    rgba(10, 10, 15, 0.3)
  );
  padding: 2rem 3rem 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  min-height: 260px;
}

.tournament-identity {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
}

.tournament-logo {
  width: 90px;
  height: 90px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--accent-purple);
}

.tournament-name {
  font-size: 2.2rem;
  line-height: 1.1;
}

.tournament-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.tournament-banner-actions {
  display: flex;
  gap: 0.75rem;
}

.tournament-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  padding: 2rem 0;
}

/* Teams list in tournament */

/* ---------------- BRACKETS ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.bracket-preview {
  overflow-x: auto;
  padding: 1rem 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---------------- NOTIFICATIONS ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.notif-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.2s;
}

.notif-item:hover {
  border-color: var(--teal-border-sm);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--shadow-color), 0.08);
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
  margin-top: 6px;
}

.notif-msg {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.45;
}

.notif-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  display: block;
}

@media (max-width: 640px) {
  .notif-item {
    gap: 0.7rem;
    padding: 0.9rem 1rem;
  }

  .notif-msg {
    white-space: normal;
    line-height: 1.45;
  }

  .notif-item form {
    align-self: flex-end;
  }
}

/* Notification preferences */
.pref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.7rem;
}

.pref-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition:
    background 0.2s,
    border-color 0.2s;
}

.pref-item:hover {
  border-color: var(--teal-border-sm);
  background: var(--bg-elevated);
}

.pref-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background: rgba(var(--neutral-500-rgb), 0.08);
  color: var(--accent-purple-light);
  flex-shrink: 0;
}

.pref-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pref-item input[type="checkbox"] {
  accent-color: var(--accent-purple);
  width: 16px;
  height: 16px;
}

/* ---------------- FILTER BAR ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: center;
}

.filter-search {
  max-width: 320px;
}

/* ---------------- PAGINATION ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
}

/* ---------------- EMPTY STATE ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 1rem;
}

.empty-state p a {
  color: var(--accent-purple-light);
}

/* ---------------- INFO BANNER ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.info-banner {
  background: var(--teal-glow-sm);
  border: 1px solid var(--teal-border-sm);
  border-radius: var(--radius-md);
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ---------------- MANAGE TABS ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.manage-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
  margin-bottom: -1px;
}

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

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

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---------------- ADMIN / DISPUTE CARDS -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.dispute-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.dispute-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Applications */
.applications-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.application-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.application-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.application-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.application-body p {
  margin-bottom: 0.4rem;
}

.application-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ---------------- STATS GRID (Admin) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
}

.stat-card-warn {
  border-color: rgba(var(--st-warning-rgb), 0.4);
  background: rgba(var(--st-warning-rgb), 0.05);
}

.stat-card-num {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.admin-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.admin-nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-nav-card:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* ---------------- ERROR PAGES ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/* -- MODERN ERROR PAGES ---------------------------------------- */

/* Wrapper */
.error-page-modern {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  overflow: hidden;
}

.error-page-500 {
  padding-top: 4.5rem;
}

/* Animated background orbs */
.error-bg-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.16;
  animation: none;
}

.error-bg-orb-500 {
  opacity: 0.14;
  animation: recoveryOrbFloat 22s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}

.error-bg-orb-left {
  width: 420px;
  height: 420px;
  background: rgba(var(--brand-primary-rgb), 0.35);
  top: -130px;
  left: -110px;
}

.error-bg-orb-right {
  width: 320px;
  height: 320px;
  background: rgba(var(--brand-secondary-rgb), 0.34);
  bottom: -110px;
  right: -90px;
  animation-delay: -5s;
}

.error-card-500 {
  padding-top: 2rem;
}

.error-recovery-visual {
  position: relative;
  z-index: 2;
  width: min(100%, 440px);
  margin: 0 auto 1.5rem;
}

.recovery-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.22);
  background: rgba(var(--legacy-scrim-rgb), 0.55);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.recovery-status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brand-primary-light);
  box-shadow: 0 0 0 0 rgba(var(--brand-primary-rgb), 0.45);
  animation: recoveryPulse 1.9s ease-out infinite;
}

.recovery-scene {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 16 / 11;
  margin: 0 auto;
  border-radius: 28px;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.18);
  background:
    radial-gradient(circle at 50% 30%, rgba(var(--brand-primary-rgb), 0.14), transparent 38%),
    linear-gradient(180deg, rgba(8, 16, 32, 0.88), rgba(7, 13, 24, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(var(--neutral-0-rgb), 0.04),
    0 24px 60px rgba(var(--shadow-color), 0.35);
  overflow: hidden;
}

.recovery-scene::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(var(--neutral-500-rgb), 0.08);
  pointer-events: none;
}

.recovery-scene::after {
  content: '';
  position: absolute;
  inset: auto 18px 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--brand-primary-rgb), 0.45), transparent);
  opacity: 0.7;
}

.recovery-monitor {
  position: absolute;
  top: 18px;
  left: 50%;
  width: min(72%, 290px);
  transform: translateX(-50%);
  animation: recoveryLift 5.2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.recovery-monitor-top {
  width: 44%;
  height: 10px;
  margin: 0 auto;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.86), rgba(var(--neutral-500-rgb), 0.62));
}

.recovery-screen {
  position: relative;
  width: 100%;
  height: 164px;
  margin-top: 10px;
  border-radius: 18px;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.28);
  background:
    radial-gradient(circle at 50% 20%, rgba(var(--brand-primary-rgb), 0.22), transparent 45%),
    linear-gradient(180deg, rgba(var(--legacy-scrim-rgb), 0.98), rgba(2, 8, 23, 0.98));
  overflow: hidden;
  box-shadow: 0 0 34px rgba(var(--brand-primary-rgb), 0.16);
}

.recovery-screen-lines {
  position: absolute;
  inset: 30px 20px 34px;
  display: grid;
  gap: 12px;
}

.recovery-screen-lines span {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--brand-primary-rgb), 0.15), rgba(var(--brand-primary-rgb), 0.95), rgba(var(--legacy-cyan-400-rgb), 0.55));
  transform-origin: left center;
  animation: recoveryCodeFill 2.6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.recovery-screen-lines span:nth-child(2) {
  width: 78%;
  animation-delay: -0.5s;
}

.recovery-screen-lines span:nth-child(3) {
  width: 54%;
  animation-delay: -0.9s;
}

.recovery-cursor {
  position: absolute;
  left: 20px;
  bottom: 22px;
  width: 12px;
  height: 22px;
  border-radius: 4px;
  background: rgba(191, 219, 254, 0.92);
  animation: recoveryBlink 1.1s steps(2, end) infinite;
}

.recovery-monitor-base {
  width: 44%;
  height: 18px;
  margin: 10px auto 0;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, rgba(var(--text-muted-rgb), 0.82), rgba(var(--legacy-scrim-rgb), 0.9));
  box-shadow: 0 10px 24px rgba(var(--shadow-color), 0.25);
}

.recovery-developer {
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 220px;
  height: 120px;
  transform: translateX(-50%);
  animation: recoveryBob 4.8s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.recovery-head,
.recovery-torso,
.recovery-arm,
.recovery-shoulder,
.recovery-keyboard,
.recovery-mouse,
.recovery-tools,
.recovery-pulse {
  position: absolute;
}

.recovery-head {
  left: 86px;
  top: 2px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--legacy-amber-200) 0 16%, var(--st-warning) 16% 100%);
  box-shadow: 0 0 0 6px rgba(var(--bd-amber-rgb), 0.08);
}

.recovery-helm {
  position: absolute;
  inset: -7px -6px auto;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--brand-primary-rgb), 0.95), rgba(var(--brand-primary-rgb), 0.9));
}

.recovery-face {
  position: absolute;
  left: 11px;
  top: 23px;
  width: 30px;
  height: 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 50%, var(--neutral-800) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 50%, var(--neutral-800) 0 2px, transparent 3px),
    linear-gradient(90deg, transparent 0 40%, var(--neutral-800) 40% 60%, transparent 60% 100%);
}

.recovery-torso {
  left: 78px;
  top: 46px;
  width: 72px;
  height: 54px;
  border-radius: 18px 18px 20px 20px;
  background: linear-gradient(180deg, rgba(var(--legacy-violet-600-rgb), 0.9), rgba(var(--neutral-800-rgb), 0.96));
  box-shadow: inset 0 1px 0 rgba(var(--neutral-0-rgb), 0.08);
}

.recovery-shoulder {
  top: 42px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(var(--neutral-500-rgb), 0.16);
  border: 1px solid rgba(var(--neutral-500-rgb), 0.18);
}

.recovery-shoulder-left {
  left: 68px;
}

.recovery-arm {
  width: 54px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--bd-amber-rgb), 0.85), rgba(249, 115, 22, 0.78));
  transform-origin: left center;
}

.recovery-arm-left {
  left: 48px;
  top: 58px;
  transform: rotate(28deg);
}

.recovery-arm-right {
  left: 132px;
  top: 62px;
  width: 58px;
  transform: rotate(-20deg);
}

.recovery-keyboard {
  left: 58px;
  bottom: 2px;
  width: 106px;
  height: 24px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.95), rgba(var(--legacy-scrim-rgb), 0.98));
  border: 1px solid rgba(var(--brand-primary-rgb), 0.18);
  box-shadow: 0 12px 24px rgba(var(--shadow-color), 0.22);
}

.recovery-keyboard::before {
  content: '';
  position: absolute;
  inset: 5px 9px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(var(--neutral-500-rgb), 0.12) 50%, transparent 0) 0 0 / 16px 100%,
    linear-gradient(rgba(var(--neutral-500-rgb), 0.12) 50%, transparent 0) 0 0 / 100% 6px;
  opacity: 0.85;
}

.recovery-mouse {
  right: 54px;
  bottom: 3px;
  width: 24px;
  height: 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.94), rgba(var(--legacy-scrim-rgb), 0.98));
  border: 1px solid rgba(var(--brand-primary-rgb), 0.16);
}

.recovery-tools {
  width: 28px;
  height: 28px;
  top: 34px;
  border-radius: 50%;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.22);
  background:
    linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.7), rgba(var(--brand-secondary-rgb), 0.8));
  box-shadow: 0 0 28px rgba(var(--brand-primary-rgb), 0.14);
  animation: recoveryOrbit 6.8s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}

.recovery-tools::before,
.recovery-tools::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  background: rgba(var(--neutral-0-rgb), 0.92);
  border-radius: 999px;
}

.recovery-tools::before {
  width: 12px;
  height: 3px;
}

.recovery-tools::after {
  width: 3px;
  height: 12px;
}

.recovery-tools-left {
  left: 34px;
}

.recovery-tools-right {
  right: 34px;
  animation-delay: -2.4s;
}

.recovery-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(var(--brand-primary-rgb), 0.25);
  background: rgba(var(--brand-primary-rgb), 0.18);
  animation: recoveryPulse 2.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.recovery-pulse-one {
  left: 18px;
  bottom: 46px;
}

.recovery-pulse-two {
  right: 16px;
  top: 28px;
  animation-delay: -1.8s;
}

.recovery-progress {
  width: min(100%, 300px);
  height: 10px;
  margin: 1.15rem auto 0.55rem;
  border-radius: 999px;
  background: rgba(var(--legacy-scrim-rgb), 0.9);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.16);
  overflow: hidden;
}

.recovery-progress span {
  display: block;
  width: 48%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  animation: recoveryProgress 3.2s cubic-bezier(0.42, 0, 0.58, 1) infinite;
}

.recovery-progress-label {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

@keyframes recoveryOrbFloat {
  0% { transform: translate3d(-20px, 20px, 0) scale(0.95); opacity: 0.08; }
  25% { transform: translate3d(10px, -10px, 0) scale(1.02); opacity: 0.16; }
  50% { transform: translate3d(-5px, 15px, 0) scale(1.05); opacity: 0.14; }
  75% { transform: translate3d(15px, -5px, 0) scale(1.01); opacity: 0.15; }
  100% { transform: translate3d(-20px, 20px, 0) scale(0.95); opacity: 0.08; }
}

@keyframes recoveryLift {
  0%, 100% { transform: translateX(-50%) translateY(0) rotateZ(0deg); }
  25% { transform: translateX(-50%) translateY(-8px) rotateZ(-1deg); }
  50% { transform: translateX(-50%) translateY(-12px) rotateZ(0deg); }
  75% { transform: translateX(-50%) translateY(-6px) rotateZ(1deg); }
}

@keyframes recoveryCodeFill {
  0% { transform: scaleX(0.4) scaleY(0.8); opacity: 0.35; filter: blur(1px); }
  35% { transform: scaleX(0.85) scaleY(1); opacity: 0.75; filter: blur(0.5px); }
  50% { transform: scaleX(1) scaleY(1.08); opacity: 1; filter: blur(0); }
  65% { transform: scaleX(0.95) scaleY(1.04); opacity: 0.95; filter: blur(0); }
  100% { transform: scaleX(0.4) scaleY(0.8); opacity: 0.35; filter: blur(1px); }
}

@keyframes recoveryBlink {
  0%, 48% { opacity: 1; box-shadow: inset 0 0 3px rgba(var(--brand-primary-rgb), 0.5); }
  50%, 100% { opacity: 0.1; box-shadow: inset 0 0 8px rgba(var(--brand-primary-rgb), 0.2); }
}

@keyframes recoveryBob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotateZ(0deg); }
  25% { transform: translateX(-50%) translateY(-8px) rotateZ(-2deg); }
  50% { transform: translateX(-50%) translateY(-14px) rotateZ(0deg); }
  75% { transform: translateX(-50%) translateY(-6px) rotateZ(2deg); }
}

@keyframes recoveryOrbit {
  0% { transform: translateY(0) translateX(0) rotate(0deg) scale(1); }
  25% { transform: translateY(-12px) translateX(8px) rotate(8deg) scale(1.05); }
  50% { transform: translateY(-16px) translateX(0) rotate(16deg) scale(1.08); }
  75% { transform: translateY(-8px) translateX(-8px) rotate(24deg) scale(1.04); }
  100% { transform: translateY(0) translateX(0) rotate(32deg) scale(1); }
}

@keyframes recoveryPulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--brand-primary-rgb), 0.7); transform: scale(1); opacity: 1; }
  40% { box-shadow: 0 0 0 12px rgba(var(--brand-primary-rgb), 0.3); transform: scale(1.1); opacity: 0.9; }
  70% { box-shadow: 0 0 0 24px rgba(var(--brand-primary-rgb), 0); transform: scale(1.15); opacity: 0.4; }
  100% { box-shadow: 0 0 0 0 rgba(var(--brand-primary-rgb), 0); transform: scale(1); opacity: 0; }
}

@keyframes recoveryProgress {
  0% { transform: translateX(-130%); }
  30% { transform: translateX(-40%); }
  60% { transform: translateX(45%); }
  100% { transform: translateX(140%); }
}

/* Giant gradient error code */
.error-code-modern {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: clamp(5.5rem, 18vw, 9.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(
    135deg,
    var(--accent-purple) 0%,
    var(--accent-purple-light) 55%,
    var(--accent-cyan) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(var(--brand-primary-rgb), 0.35));
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 2;
  animation: none;
}

/* Icon badge */

/* Glassmorphism content card */
.error-card {
  position: relative;
  z-index: 2;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem 2.75rem;
  max-width: 520px;
  width: 100%;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 28px 70px rgba(var(--shadow-color), 0.38),
    inset 0 1px 0 rgba(var(--neutral-0-rgb), 0.06);
  animation: none;
}

/* Typography */
.error-h1 {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.error-desc {
  color: var(--text-secondary);
  font-size: 0.935rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* Primary action row */
.error-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* Login prompt (403 unauthenticated) */
.error-login-box {
  background: rgba(var(--brand-primary-rgb), 0.07);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.22);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.error-login-box p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.error-login-box .error-actions {
  margin-bottom: 0;
}

/* Quick links bar */
.error-quick-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.1rem;
  margin-top: 0.75rem;
}

.error-quick-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

.error-quick-links {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  flex-wrap: wrap;
}

.error-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  background: none;
  cursor: pointer;
  transition:
    color 0.18s,
    border-color 0.18s,
    background 0.18s;
}

.error-quick-link:hover {
  color: var(--accent-purple);
  border-color: var(--accent-purple);
  background: rgba(var(--brand-primary-rgb), 0.08);
}

/* Dev error stack */
.error-stack-box {
  background: rgba(var(--legacy-scrim-rgb), 0.85);
  border: 1px solid rgba(var(--legacy-red-500-rgb), 0.25);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.75rem;
  color: var(--legacy-red-400);
  text-align: left;
  overflow: auto;
  max-height: 220px;
  white-space: pre-wrap;
  font-family: Consolas, "Courier New", monospace;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  .error-page-500 {
    padding-top: 3.5rem;
  }

  .error-card {
    padding: 1.75rem 1.1rem;
  }

  .error-card-500 {
    padding-top: 1.5rem;
  }

  .error-recovery-visual {
    margin-bottom: 1.1rem;
  }

  .recovery-status-chip {
    margin-bottom: 0.9rem;
  }

  .recovery-scene {
    border-radius: 22px;
  }

  .recovery-monitor {
    width: min(78%, 256px);
  }

  .recovery-screen {
    height: 144px;
  }

  .recovery-developer {
    width: 194px;
    height: 108px;
  }

  .recovery-head {
    left: 78px;
    width: 46px;
    height: 46px;
  }

  .recovery-torso {
    left: 72px;
    width: 62px;
    height: 48px;
  }

  .recovery-arm-left {
    left: 46px;
  }

  .recovery-arm-right {
    left: 118px;
    width: 52px;
  }

  .recovery-keyboard {
    left: 50px;
    width: 94px;
  }

  .recovery-mouse {
    right: 46px;
  }

  .recovery-tools-left {
    left: 18px;
  }

  .recovery-tools-right {
    right: 18px;
  }

  .recovery-progress {
    width: min(100%, 260px);
  }

  .error-code-modern {
    margin-bottom: 1.1rem;
  }

  .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-actions .esports-btn {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .error-bg-orb,
  .recovery-status-dot,
  .recovery-monitor,
  .recovery-screen-lines span,
  .recovery-cursor,
  .recovery-developer,
  .recovery-tools,
  .recovery-pulse,
  .recovery-progress span,
  .error-code-modern {
    animation: none !important;
  }

  .recovery-progress span {
    transform: translateX(0);
    width: 62%;
  }
}

/* Legacy classes kept for backward compatibility */

/* ---------------- FOOTER -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
}

.footer-brand .brand-icon {
  font-size: 1.3rem;
}

.footer-brand strong {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 1.3rem;
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.6;
  max-width: 32rem;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.footer-social a {
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--brand-primary-light);
}

.footer-links-group h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.footer-links-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-links-group a,
.footer-links-group button {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.footer-links-group a:hover,
.footer-links-group button:hover {
  color: var(--brand-primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-credit a {
  color: var(--text-secondary);
  font-weight: 600;
  transition: color 0.2s;
}

.footer-credit a:hover {
  color: var(--brand-primary-light);
}

@media (max-width: 640px) {
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

/* ---------------- HERO FLOATING GAME ICONS ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */
.hero-floating-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  perspective: 1000px;
  transform-style: preserve-3d;
}

@keyframes hero-icon-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotateX(var(--rot-x, -10deg))
      rotateY(var(--rot-y, 30deg)) rotateZ(var(--rot-z, 58deg));
  }

  50% {
    transform: translate3d(0, calc(var(--float-bob, 16px) * -1), 0)
      rotateX(var(--rot-x, -10deg)) rotateY(var(--rot-y, 30deg))
      rotateZ(var(--rot-z, 58deg));
  }
}

.hero-floating-icon {
  position: absolute;
  width: var(--icon-size, 88px);
  height: var(--icon-size, 88px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-color, var(--brand-secondary));
  background:
    linear-gradient(
      155deg,
      rgba(var(--neutral-0-rgb), 0.1),
      rgba(var(--neutral-0-rgb), 0.02)
    ),
    rgba(var(--icon-rgb, 124, 58, 237), 0.08);
  border: 1px solid rgba(var(--icon-rgb, 124, 58, 237), 0.45);
  box-shadow:
    0 0 0 1px rgba(var(--icon-rgb, 124, 58, 237), 0.18) inset,
    0 10px 28px rgba(var(--shadow-color), 0.45),
    0 0 28px rgba(var(--icon-rgb, 124, 58, 237), 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform-origin: center;
  transform-style: preserve-3d;
  animation: hero-icon-float var(--float-duration, 6.5s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform;
  opacity: 0.56;
}

.hero-floating-icon::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1px solid rgba(var(--icon-rgb, 124, 58, 237), 0.48);
  filter: blur(5px);
  opacity: 0.45;
}

.hero-floating-icon::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 13px;
  background: radial-gradient(
    circle at 26% 20%,
    rgba(var(--neutral-0-rgb), 0.18),
    transparent 65%
  );
  opacity: 0.7;
}

.hero-floating-img {
  position: relative;
  z-index: 1;
  width: 74%;
  height: 74%;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(var(--shadow-color), 0.45));
  transform: translateZ(10px);
}

.hero-floating-fallback {
  display: none;
  position: relative;
  z-index: 1;
  font-size: clamp(1.6rem, 1.25rem + 1vw, 2.4rem);
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(var(--icon-rgb, 59, 130, 246), 0.7));
  transform: translateZ(8px);
}

/* ---------------- GAME BADGE INLINE (used on tournament/team pages) ---------------- */
.game-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  background: rgba(var(--gc-rgb), 0.12);
  border: 1px solid rgba(var(--gc-rgb), 0.4);
  color: var(--gc, var(--accent-purple));
  transition:
    background 0.2s,
    border-color 0.2s;
}

/* --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   MODERN AUTH FORMS (LOGIN & REGISTER) - REDESIGNED
   -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */

/* Background & Layout */

/* Floating animations */
@keyframes float-slow {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }

  33% {
    transform: translateY(-24px) translateX(12px);
  }

  66% {
    transform: translateY(-12px) translateX(-8px);
  }
}

@keyframes float-slower {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }

  33% {
    transform: translateY(-18px) translateX(-16px);
  }

  66% {
    transform: translateY(-8px) translateX(20px);
  }
}

/* Modern Auth Card */

/* Demo Card Variant */

/* Form Group & Label */

/* Modern Input Style */

/* Floating Placeholder */

/* Primary Button */

/* Secondary Button */

/* Demo Buttons */

/* Role Option */
.role-option-modern input[type="radio"] {
  display: none;
}

.role-option-modern {
  cursor: pointer;
}

/* Error Message */

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.game-badge-inline:hover {
  background: rgba(var(--gc-rgb), 0.22);
  border-color: rgba(var(--gc-rgb), 0.65);
}

.game-badge-inline img,
.game-badge-inline .gi-wrap img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 2px;
}

/* gi-wrap inside badge: keep it inline */
.game-badge-inline .gi-wrap {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Large variant: used in cards/info panels */
.game-badge-lg {
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  gap: 0.5rem;
}

.game-badge-lg img,
.game-badge-lg .gi-wrap img {
  width: 22px;
  height: 22px;
}

.game-badge-lg .gi-wrap {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ---------------- GAME SHOWCASE CARDS (3-D float + blur glow) ------------------------ */
@keyframes game-float {
  0%,
  100% {
    transform: translateY(0) rotateX(4deg);
  }

  50% {
    transform: translateY(-14px) rotateX(-4deg);
  }
}

.game-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.75rem 1.25rem 1.5rem;
  width: 148px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  /* Per-card accent colour injected via --gc / --gc-rgb inline style */
  background: rgba(var(--gc-rgb), 0.07);
  border: 1px solid rgba(var(--gc-rgb), 0.45);
  box-shadow:
    0 0 16px 4px rgba(var(--gc-rgb), 0.28),
    0 0 42px 10px rgba(var(--gc-rgb), 0.1),
    inset 0 0 24px rgba(var(--gc-rgb), 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* 3-D continuous float */
  perspective: 600px;
  transform-style: preserve-3d;
  animation: game-float 3.5s ease-in-out infinite;
  transition:
    box-shadow 0.3s,
    border-color 0.3s;
  will-change: transform;
}

.game-card:hover {
  animation-play-state: paused;
  border-color: rgba(var(--gc-rgb), 0.85);
  box-shadow:
    0 0 28px 8px rgba(var(--gc-rgb), 0.55),
    0 0 72px 20px rgba(var(--gc-rgb), 0.2),
    inset 0 0 32px rgba(var(--gc-rgb), 0.1);
}

.game-card__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(var(--gc-rgb), 0.6));
  pointer-events: none;
}

.game-card__icon {
  font-size: 2.6rem;
  color: rgba(var(--gc-rgb), 1);
  filter: drop-shadow(0 0 10px rgba(var(--gc-rgb), 0.7));
  line-height: 1;
}

.game-card__name {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .game-card {
    animation: none;
  }
}

/* ---------------- PLATFORM FEATURES GRID ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */

/* ---------------- GAME FILTER TABS ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */
.game-filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.game-tab {
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  background: var(--bg-elevated);
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}

.game-tab:hover,
.game-tab.active {
  border-color: var(--accent-purple);
  color: var(--accent-purple-light);
  background: var(--teal-glow-md);
}

