/* =========================================================
   BARBARIE FC — DESIGN SYSTEM (REGLAS ESTÉTICAS OFICIALES)
   Bordó #440810 | Carmesí #68101C | Negro #101010/#0C0C0C
   Dorado Imperial #F0A424/#F6AA2A | Blanco Cálido #F6F6E5
   ========================================================= */

:root {
  --bg-outer: #070405;
  --bg-app: #0E090A;
  --bg-surface: #171012;
  --bg-surface-elevated: #211417;
  --bg-burgundy: #440810;
  --bg-burgundy-deep: #2B0409;
  --bg-crimson: #68101C;
  --bg-black: #0C0C0C;

  --gold: #F0A424;
  --gold-bright: #F6AA2A;
  --gold-soft: rgba(240, 164, 36, 0.14);
  --gold-line: rgba(240, 164, 36, 0.28);

  --text-primary: #F6F6E5;
  --text-cream: #FBFACC;
  --text-secondary: #B9A9AB;
  --text-muted: #7F6D70;

  --coral: #E7986D;
  --green: #38C172;
  --green-soft: rgba(56, 193, 114, 0.14);
  --red: #E04F5F;
  --red-soft: rgba(224, 79, 95, 0.14);

  --border-subtle: rgba(246, 246, 229, 0.08);
  --border-strong: rgba(246, 246, 229, 0.14);

  --font-display: 'Oswald', Impact, 'Arial Narrow', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --nav-height: 68px;
  --header-height: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background-color: var(--bg-outer);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* =========================================================
   MOBILE APP SHELL (480px centered frame on desktop, 100% on mobile)
   ========================================================= */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.85);
}

@media (min-width: 520px) {
  body {
    background: radial-gradient(circle at top, #28060B 0%, #070405 60%);
  }
  .app-shell {
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
  }
}

/* =========================================================
   TOP APP BAR
   ========================================================= */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: calc(var(--header-height) + env(safe-area-inset-top, 0px) + 10px);
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(43, 4, 9, 0.98) 0%, rgba(14, 9, 10, 0.94) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-bar-crest {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.top-bar-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.top-bar-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.top-bar-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.top-bar-stars {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
}

.star-icon {
  color: var(--gold-bright);
  font-size: 0.85rem;
  line-height: 1;
}

/* =========================================================
   MAIN VIEWPORT & SECTION SPACING
   ========================================================= */
.main-content {
  flex: 1;
  padding: 16px 16px calc(var(--nav-height) + 28px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeUp 0.22s ease-out;
}

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

.page-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-bright);
  line-height: 1.1;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.section-action {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  padding: 2px 4px;
}

/* =========================================================
   CLUB HERO CARD (WITH WOVEN TEMPLATE TEXTURE)
   ========================================================= */
.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 20px 18px;
  background-color: var(--bg-burgundy);
  background-image:
    linear-gradient(165deg, rgba(68, 8, 16, 0.72) 0%, rgba(12, 12, 12, 0.92) 100%),
    url('../assets/bg-template.webp');
  background-size: cover;
  background-position: center;
  border: 1px solid var(--gold-line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-crest {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.hero-info h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--gold-bright);
  line-height: 1.05;
}

.hero-motto {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-cream);
  margin-top: 3px;
}

.hero-trophies {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(246, 246, 229, 0.12);
}

.kpi-item {
  text-align: center;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.kpi-value.gold {
  color: var(--gold-bright);
}

.kpi-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* =========================================================
   SURFACE CARDS
   ========================================================= */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.card-match {
  background: linear-gradient(155deg, #27090E 0%, #140D0E 65%);
  border: 1px solid var(--gold-line);
}

.match-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.match-versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin-bottom: 14px;
}

.team-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.team-crest-md {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.team-crest-rival {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.team-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.team-name.club {
  color: var(--gold-bright);
}

.vs-badge {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg-black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-details-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-cream);
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: rgba(12, 12, 12, 0.45);
  margin-bottom: 14px;
}

/* RSVP Buttons */
.rsvp-prompt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.rsvp-count {
  color: var(--gold-bright);
  font-weight: 700;
}

.rsvp-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.rsvp-btn {
  padding: 9px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: transform 0.12s ease, background-color 0.15s ease, color 0.15s ease;
}

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

.rsvp-btn.active-confirmed {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}

.rsvp-btn.active-maybe {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.rsvp-btn.active-out {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

/* =========================================================
   LEADERS STRIP (HOME)
   ========================================================= */
.leaders-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.leader-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.leader-card:active {
  transform: scale(0.98);
}

.leader-card:hover {
  border-color: var(--gold-line);
}

.leader-tag {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.leader-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--bg-burgundy) 0%, var(--bg-black) 100%);
  border: 1px solid var(--gold-line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.leader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.leader-stat {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.leader-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* =========================================================
   VITRINA & SPONSORS
   ========================================================= */
.vitrina-img {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  border: 1px solid var(--border-subtle);
}

.champions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.champion-card {
  background: var(--bg-surface);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.champion-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.champion-caption {
  padding: 12px 14px;
  background: linear-gradient(180deg, #1F0A0E 0%, #140C0E 100%);
  border-top: 1px solid var(--gold-line);
}

.champion-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.champion-sub {
  font-size: 0.76rem;
  color: var(--text-cream);
  margin-top: 2px;
}

.sponsors-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  padding: 12px 10px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 6px;
}

.sponsor-pill {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.85;
}

/* =========================================================
   SEGMENTED TABS (PARTIDOS / COMUNIDAD)
   ========================================================= */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.segmented-control.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.match-detail-tbd {
  color: var(--coral);
  font-weight: 600;
}

.seg-btn {
  padding: 9px 6px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.seg-btn.active {
  background: var(--bg-burgundy);
  color: var(--gold-bright);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}

/* =========================================================
   CONVOCADOS CHECKLIST
   ========================================================= */
.convocados-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pill-stats {
  display: flex;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
}

.pill-green { color: var(--green); }
.pill-gold { color: var(--gold-bright); }
.pill-red { color: var(--red); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--bg-black);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 0.12s ease, background-color 0.15s ease;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
}

.convocado-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.convocado-row:last-child {
  border-bottom: none;
}

.convocado-player {
  display: flex;
  align-items: center;
  gap: 10px;
}

.convocado-num {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  width: 26px;
  text-align: right;
}

.convocado-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.convocado-pos {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.status-toggle {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-confirmed {
  background: var(--green-soft);
  color: var(--green);
}

.status-maybe {
  background: var(--gold-soft);
  color: var(--gold-bright);
}

.status-out {
  background: var(--red-soft);
  color: var(--red);
}

/* =========================================================
   STANDINGS TABLE (MATCHING OFFICIAL GRAPHIC)
   ========================================================= */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--gold-line);
  background: var(--bg-surface);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.standings-table thead th {
  background: var(--bg-burgundy);
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 10px 6px;
  text-align: center;
  border-bottom: 1px solid var(--gold);
}

.standings-table thead th.col-team {
  text-align: left;
  padding-left: 10px;
}

.standings-table tbody td {
  padding: 10px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.standings-table tbody td.col-team {
  text-align: left;
  padding-left: 10px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.standings-table tbody td.col-pts {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.standings-table tbody tr.row-club {
  background: linear-gradient(90deg, rgba(104, 16, 28, 0.75) 0%, rgba(68, 8, 16, 0.5) 100%);
  box-shadow: inset 3px 0 0 var(--gold-bright);
}

.standings-table tbody tr.row-club td {
  color: var(--text-cream);
  font-weight: 700;
}

/* =========================================================
   FIXTURE & RESULTS LISTS
   ========================================================= */
.fixture-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fixture-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.fixture-item.club-match {
  background: linear-gradient(135deg, rgba(104, 16, 28, 0.65) 0%, rgba(23, 16, 18, 0.95) 100%);
  border-color: var(--gold-line);
}

.fixture-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fixture-home { text-align: right; }
.fixture-away { text-align: left; }

.fixture-vs {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg-surface-elevated);
  color: var(--gold);
}

.fixture-item.club-match .fixture-vs {
  background: var(--gold);
  color: var(--bg-black);
}

.fixture-sub {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-score-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.score-box {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-burgundy);
  color: var(--gold-bright);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.result-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.result-meta {
  font-size: 0.75rem;
  color: var(--text-cream);
}

/* =========================================================
   SQUAD / PLANTEL
   ========================================================= */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-row {
  display: flex;
  gap: 8px;
}

.input-field {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
}

.input-field:focus {
  border-color: var(--gold);
}

.sort-select {
  width: auto;
  min-width: 118px;
}

.pos-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pos-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.pos-pill.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg-black);
}

.squad-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-align: left;
  width: 100%;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.player-card:hover {
  border-color: var(--gold-line);
}

.player-card:active {
  transform: scale(0.99);
}

.player-thumb {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--bg-burgundy) 0%, #10090A 100%);
  border: 1px solid var(--gold-line);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.player-thumb-num {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.player-main {
  flex: 1;
  min-width: 0;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-dorsal {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
}

.player-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.player-mini-stats {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.mini-stat {
  text-align: center;
  min-width: 24px;
}

.mini-stat-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.mini-stat-val.gold {
  color: var(--gold-bright);
}

.mini-stat-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* =========================================================
   COMMUNITY / GAMES (MVP POLL, SOPA DE LETRAS, TRIVIA)
   ========================================================= */
.poll-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.poll-option {
  position: relative;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  text-align: left;
  transition: border-color 0.15s ease;
}

.poll-option.voted {
  border-color: var(--gold);
}

.poll-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(240, 164, 36, 0.18);
  transition: width 0.35s ease;
  pointer-events: none;
}

.poll-content {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
}

.poll-player {
  font-weight: 600;
  font-size: 0.9rem;
}

.poll-pct {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-bright);
}

/* Word Search (Sopa de Letras) */
.ws-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.ws-word-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-cream);
}

.ws-word-chip.found {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
  text-decoration: line-through;
}

.ws-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: #0A0607;
  border: 1px solid var(--gold-line);
  user-select: none;
}

.ws-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: background-color 0.1s ease, color 0.1s ease;
}

.ws-cell.selected {
  background: var(--gold);
  color: var(--bg-black);
}

.ws-cell.found {
  background: var(--bg-crimson);
  color: var(--gold-bright);
}

/* Trivia */
.trivia-q {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-cream);
  margin: 10px 0 14px;
}

.trivia-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trivia-opt {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  font-size: 0.88rem;
  font-weight: 500;
}

.trivia-opt.correct {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}

.trivia-opt.wrong {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

/* =========================================================
   ADMIN PANEL
   ========================================================= */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stepper-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.stepper-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.stepper-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.stepper-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-burgundy);
  color: var(--gold-bright);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* =========================================================
   PLAYER DETAIL BOTTOM SHEET MODAL
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-top: 2px solid var(--gold);
  border-radius: 22px 22px 0 0;
  padding: 18px 18px 28px;
  animation: slideUp 0.22s ease-out;
}

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

.modal-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(155deg, rgba(68, 8, 16, 0.85) 0%, rgba(12, 12, 12, 0.96) 100%),
    url('../assets/bg-template.webp');
  background-size: cover;
  border: 1px solid var(--gold-line);
  margin-bottom: 16px;
}

.modal-portrait {
  width: 96px;
  height: 112px;
  border-radius: 12px;
  background: rgba(12, 12, 12, 0.5);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.modal-big-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stat-tile {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.stat-tile-val {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-tile-val.gold {
  color: var(--gold-bright);
}

.stat-tile-lbl {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* =========================================================
   BOTTOM NAVIGATION BAR
   ========================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding: 6px 6px calc(env(safe-area-inset-bottom, 0px) + 6px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(14, 9, 10, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-strong);
  z-index: 40;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-item svg {
  width: 21px;
  height: 21px;
}

.nav-item.active {
  color: var(--gold-bright);
}

/* =========================================================
   TOAST NOTIFICATION
   ========================================================= */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--gold);
  color: var(--bg-black);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 80;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
