/* ============================================
   Calendario Mundial Biotech 2026
   Design System & Global Styles
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Bebas+Neue&display=swap');

/* --- Twemoji Country Flags Polyfill (For Windows/Linux Support) --- */
@font-face {
  font-family: "Twemoji Country Flags";
  src: url("https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1.3/dist/TwemojiCountryFlags.woff2") format("woff2");
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0061-E007A, U+E007F;
}

/* --- HandelGothic BT Regular Font --- */
@font-face {
  font-family: 'HandelGothic BT Regular';
  src: url('assets/fonts/HandelGothicRegular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Variables (Design Tokens) --- */
:root {
  /* Background & Surface */
  --color-bg: #0a0e17;
  --color-bg-alt: rgba(125, 154, 179, 0.6);
  --color-surface: rgba(216, 224, 231, 0.6);
  --color-surface-hover: rgba(216, 224, 231, 0.75);
  --color-surface-border: #1e2a42;

  /* Accent Colors */
  --color-gold: #d4a843;
  --color-gold-light: #f0d060;
  --color-gold-dark: #7a6a2f;
  --color-gold-dim: rgba(212, 168, 67, 0.15);
  --color-green: #2ecc71;
  --color-green-light: #55efc4;
  --color-green-dim: rgba(46, 204, 113, 0.15);
  --color-green-brand: #33BE01;
  --color-red: #e74c3c;
  --color-red-dim: rgba(231, 76, 60, 0.15);
  --color-red-brand: #E30117;
  --color-red-brand-dim: rgba(227, 1, 23, 0.15);
  --color-blue: #3498db;
  --color-blue-dim: rgba(52, 152, 219, 0.15);
  --color-live: #ff4757;

  /* Text */
  --color-text: #0a0e17;
  --color-text-secondary: #a0aec0;
  --color-text-tertiary: #eef0f6;
  --color-text-quaternary: #950606;
  --color-text-muted: #41516c;

  /* Typography */
  --font-primary: "Twemoji Country Flags", 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: "Twemoji Country Flags", 'Bebas Neue', 'Impact', sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow-gold: 0 0 20px rgba(212, 168, 67, 0.2);
  --shadow-glow-green: 0 0 20px rgba(46, 204, 113, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  background-image: url('assets/images/bg_fullscreen');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

tr {
  color: var(--color-text);
}

footer {
  position: relative;
  z-index: 10;
  margin-top: auto;
}

/* --- Header --- */
.header {
  background: #00478f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: var(--space-lg) var(--space-xl);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header .main-tab {
  color: rgba(255, 255, 255, 0.75);
}

.header .main-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.header .main-tab.active {
  color: var(--color-gold-light);
  background: rgba(255, 255, 255, 0.15);
}

.header .main-tab.active::after {
  background: var(--color-gold-light);
}

.header__user-menu .user-display-name {
  color: #ffffff !important;
}

.header__user-menu .logout-btn {
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}

.header__user-menu .logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.header__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header__logo {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header__logo-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.header__title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.header__title {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__title-img {
  height: 30px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.header__subtitle {
  font-family: 'HandelGothic BT Regular';
  font-size: 0.72rem;
  color: var(--color-gold);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: center;
}

/* --- Main Tabs (Level 1) --- */
.main-tabs {
  display: flex;
  gap: var(--space-xs);
}

.main-tab {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.main-tab.active {
  color: var(--color-gold);
  background: var(--color-gold-dim);
}

.main-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 2px;
  background: var(--color-gold);
  border-radius: 2px;
}

/* --- Sub Tabs (Level 2) --- */
.sub-tabs {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-xl);
  max-width: 1440px;
  margin: 0 auto;
}

.sub-tab {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-border);
  color: var(--color-bg);
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.sub-tab:hover {
  color: var(--color-text-secondary);
  border-color: var(--color-surface-border);
}

.sub-tab.active {
  color: var(--color-gold);
  background: var(--color-gold-dim);
  border-color: var(--color-gold);
}

/* --- Content Panels --- */
.content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-2xl);
}

.main-panel,
.sub-panel {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.main-panel.active,
.sub-panel.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Calendar Styles --- */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.calendar-nav__btn {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-border);
  color: var(--color-gold-dark);
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav__btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
  border-color: var(--color-gold);
}

.calendar-nav__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-nav__label {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 2px;
  color: var(--color-gold-dark);
  min-width: 220px;
  text-align: center;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-md);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  padding: var(--space-sm) 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-day {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-sm);
  min-height: 110px;
  padding: var(--space-xs);
  position: relative;
  transition: all var(--transition-fast);
}

.calendar-day:hover {
  border-color: var(--color-gold-dim);
}

.calendar-day.other-month {
  opacity: 0.25;
}

.calendar-day.today {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-glow-gold);
}

.calendar-day__number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-bg);
  margin-bottom: var(--space-xs);
  padding: 0 var(--space-xs);
}

.calendar-day.today .calendar-day__number {
  color: var(--color-gold);
}

.calendar-day__matches {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.match-stripe {
  /*background: linear-gradient(90deg, var(--color-blue-dim) 0%, var(--color-surface-hover) 100%);*/
  background-image: url("./assets/images/stripe");
  border-left: 3px solid var(--color-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 3px 6px;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--color-text-tertiary);
  transition: all var(--transition-fast);
  cursor: default;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.match-stripe:hover {
  background: linear-gradient(90deg, rgba(52, 152, 219, 0.25) 0%, var(--color-surface-hover) 100%);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
  transform: translateY(-1px);
}

.match-stripe--completed {
  border-left-color: var(--color-green);
  background: linear-gradient(90deg, var(--color-green-dim) 0%, var(--color-surface-hover) 100%);
}

.match-stripe--live {
  border-left-color: var(--color-live);
  background: linear-gradient(90deg, rgba(255, 71, 87, 0.15) 0%, var(--color-surface-hover) 100%);
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.match-stripe__teams {
  font-weight: 600;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.match-stripe__flag {
  font-size: 0.9rem;
  line-height: 1;
  display: inline-block;
}

.match-stripe__flag--home {
  margin-right: 4px;
}

.match-stripe__flag--away {
  margin-left: 4px;
}

.team-flag {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.match-stripe__time {
  font-size: 0.6rem;
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

.match-stripe__score {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--color-green-light);
  letter-spacing: 1px;
}

/* --- Eliminatorias List Styles --- */
.eliminatorias-filters {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.eliminatorias-filter {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-border);
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.eliminatorias-filter:hover {
  border-color: var(--color-gold);
  color: var(--color-text);
}

.eliminatorias-filter.active {
  background: var(--color-gold-dim);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.eliminatorias-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-surface-border);
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
}

.eliminatorias-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.eliminatorias-table thead th {
  background: rgba(0, 0, 0, 0.15);
  color: var(--color-text-quaternary);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--color-surface-border);
}

.eliminatorias-table tbody tr {
  background: transparent;
  border-bottom: 1px solid var(--color-surface-border);
  transition: background var(--transition-fast);
}

.eliminatorias-table tbody tr:hover {
  background: var(--color-surface-hover);
}

.eliminatorias-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.eliminatorias-table tbody tr:nth-child(even):hover {
  background: var(--color-surface-hover);
}

.eliminatorias-table td {
  padding: var(--space-sm) var(--space-md);
  white-space: nowrap;
}

.eliminatorias-table .td-date {
  color: var(--color-text);
  font-size: 0.78rem;
}

.eliminatorias-table .td-time {
  color: var(--color-text);
  font-size: 0.78rem;
}

.eliminatorias-table .td-team {
  font-weight: 600;
  color: var(--color-text);
}

.eliminatorias-table .td-team--tbd {
  color: var(--color-text);
  font-style: italic;
}

.eliminatorias-table .td-score {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 2px;
  text-align: center;
  min-width: 60px;
}

.eliminatorias-table .td-stadium {
  color: var(--color-text);
  font-size: 0.75rem;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 20px;
}

.badge--fin {
  background: var(--color-green-dim);
  color: var(--color-green);
}

.badge--live {
  background: rgba(255, 71, 87, 0.15);
  color: var(--color-live);
  animation: pulse-live 2s ease-in-out infinite;
}

.badge--live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-live);
}

.badge--upcoming {
  background: var(--color-blue-dim);
  color: var(--color-text-muted);
}

/* --- Standings Styles --- */
.standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: var(--space-lg);
}

.standing-card {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.group-legend-item {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--color-bg);
  font-weight: 600;
  transition: all var(--transition-base);
}

.group-legend-item:hover {
  border-color: rgba(212, 168, 67, 0.3);
}

.standing-card:hover {
  border-color: rgba(212, 168, 67, 0.3);
  box-shadow: var(--shadow-sm);
}

.standing-card__header {
  background: linear-gradient(135deg, var(--color-gold-dim) 0%, transparent 100%);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-surface-border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.standing-card__group-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 2px;
  color: var(--color-text-quaternary);
}

.standing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  flex-grow: 1;
}

.standing-table thead th {
  color: var(--color-text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-sm);
  text-align: center;
  border-bottom: 1px solid var(--color-surface-border);
}

.standing-table thead th:nth-child(2) {
  text-align: left;
}

.standing-table tbody td {
  padding: var(--space-xs) var(--space-sm);
  text-align: center;
  border-bottom: 1px solid rgba(30, 42, 66, 0.5);
}

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

.standing-table tbody td:nth-child(2) {
  text-align: left;
  font-weight: 600;
}

.standing-table tbody tr {
  transition: background var(--transition-fast);
}

.standing-table tbody tr:hover {
  background: var(--color-surface-hover);
}

.standing-table .row-qualified {
  background: rgba(39, 174, 96, 0.35);
}

.standing-table .row-third {
  background: rgba(184, 134, 11, 0.35);
}

.standing-table .col-pts {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-gold-dark);
  letter-spacing: 1px;
}

/* --- Predictions Styles --- */
.predictions-header {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.predictions-header__score {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 2px;
  color: var(--color-gold-dark);
}

.predictions-header__label {
  font-size: 0.82rem;
  color: var(--color-text);
  margin-top: var(--space-xs);
}

.prediction-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  transition: all var(--transition-fast);
}

.prediction-row:hover {
  border-color: var(--color-surface-hover);
  background: var(--color-surface-hover);
}

.prediction-row__date {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  min-width: 80px;
}

.prediction-row__team {
  font-weight: 600;
  font-size: 0.88rem;
  min-width: 90px;
  text-align: right;
}

.prediction-row__team--away {
  text-align: left;
}

.prediction-row__inputs {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.prediction-input {
  width: 44px;
  height: 40px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-align: center;
  letter-spacing: 1px;
  transition: border-color var(--transition-fast);
  -moz-appearance: textfield;
}

.prediction-input::-webkit-inner-spin-button,
.prediction-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.prediction-input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px var(--color-gold-dim);
}

.prediction-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prediction-row__separator {
  color: var(--color-text-muted);
  font-size: 1rem;
  font-weight: 300;
}

.prediction-row__result {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
}

.prediction-row__actual {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.prediction-row__actual-score {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-text-secondary);
  letter-spacing: 1px;
}

/* Prediction badges */
.pred-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pred-badge--exact {
  background: var(--color-green-dim);
  color: var(--color-green);
}

.pred-badge--winner {
  background: var(--color-gold-dim);
  color: var(--color-gold);
}

.pred-badge--miss {
  background: var(--color-red-dim);
  color: var(--color-red);
}

/* --- Loading & Error States --- */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  gap: var(--space-md);
}

.loading-spinner__circle {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-surface-border);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner__text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.error-msg {
  background: var(--color-red-dim);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  color: var(--color-red);
  font-size: 0.88rem;
}

.stale-warning {
  background: var(--color-gold-dim);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  color: var(--color-gold);
  font-size: 0.78rem;
  margin-bottom: var(--space-md);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  body {
    background-image: url('assets/images/bg_fullscreen_responsive');
  }

  .header__inner {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .header__title-img {
    height: 26px;
  }

  .header__subtitle {
    font-size: 0.6rem;
  }

  .main-tabs {
    width: 100%;
    justify-content: center;
  }

  .main-tab {
    font-size: 0.78rem;
    padding: var(--space-xs) var(--space-md);
  }

  .sub-tabs {
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .sub-tab {
    font-size: 0.78rem;
    padding: var(--space-xs) var(--space-sm);
  }

  .content {
    padding: 0 var(--space-md) var(--space-xl);
  }

  /* Calendar collapses to list */
  .calendar-weekdays,
  .calendar-grid {
    display: none;
  }

  .calendar-list-mobile {
    display: block !important;
  }

  .calendar-nav__label {
    font-size: 1.3rem;
    min-width: 180px;
  }

  /* Standings single column */
  .standings-grid {
    grid-template-columns: 1fr;
  }

  /* Prediction row stacks */
  .prediction-row {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .prediction-row__team {
    min-width: 70px;
    font-size: 0.8rem;
  }
}

/* Calendar list mobile view (hidden on desktop) */
.calendar-list-mobile {
  display: none;
}

.calendar-list-mobile__day {
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.calendar-list-mobile__date {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-surface-border);
}

@media (max-width: 480px) {
  .eliminatorias-table {
    font-size: 0.75rem;
  }

  .standing-table {
    font-size: 0.7rem;
  }

  .prediction-input {
    width: 38px;
    height: 34px;
    font-size: 1.1rem;
  }
}

/* --- Tournament Simulator Additional Styles --- */
.simulator-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  justify-content: center;
  border-bottom: 1px solid var(--color-surface-border);
  padding-bottom: var(--space-sm);
}

.simulator-tab {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-surface-border);
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.simulator-tab:hover {
  border-color: var(--color-gold);
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.simulator-tab.active {
  background: var(--color-gold-dim);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.reset-sim-btn {
  background: transparent;
  border: 1px solid var(--color-text-quaternary);
  color: var(--color-text-quaternary);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: var(--space-xs);
}

.reset-sim-btn:hover {
  background: rgba(149, 6, 6, 0.15);
  color: var(--color-text-quaternary);
  border-color: var(--color-text-quaternary);
}

.penales-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-xs);
  padding: var(--space-xs);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  width: 100%;
}

.penales-title {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.penales-buttons {
  display: flex;
  gap: var(--space-xs);
}

.penales-btn {
  background: var(--color-bg);
  border: 1px solid var(--color-surface-border);
  color: var(--color-text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.penales-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-text);
}

.penales-btn.active {
  background: var(--color-gold-dim);
  border-color: var(--color-gold);
  color: var(--color-gold);
  box-shadow: 0 0 4px var(--color-gold);
}

.penales-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.submit-preds-btn {
  background: var(--color-gold-light);
  border: 1px solid var(--color-bg);
  color: var(--color-bg);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: var(--space-xs);
}

.submit-preds-btn:hover:not(:disabled) {
  background: var(--color-gold);
  color: var(--color-bg);
  border-color: var(--color-bg);
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.4);
}

.submit-preds-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--color-surface-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
}

/* Modal confirmación */
.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.confirm-modal-overlay.show {
  opacity: 1;
}

.confirm-modal-content {
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.confirm-modal-overlay.show .confirm-modal-content {
  transform: scale(1);
}

.confirm-modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-gold-dark);
  margin-bottom: var(--space-md);
  letter-spacing: 1px;
}

.confirm-modal-message {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.confirm-modal-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.confirm-modal-btn {
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.confirm-modal-btn--cancel {
  background: transparent;
  border-color: var(--color-surface-border);
  color: var(--color-text);
}

.confirm-modal-btn--cancel:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.confirm-modal-btn--confirm {
  background: var(--color-gold-dim);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.confirm-modal-btn--confirm:hover {
  background: var(--color-gold);
  color: var(--color-surface);
  box-shadow: 0 0 12px rgba(212, 168, 67, 0.5);
}

/* Estado disabled de los inputs */
.prediction-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: var(--color-surface-hover);
  border-color: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
}

.simulated-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.thirds-ranking-card {
  margin-top: var(--space-lg);
  border: 1px solid var(--color-gold);
  box-shadow: 0 0 8px rgba(212, 168, 67, 0.1);
}

/* ============================================
   Inline Authentication Overlay
   ============================================ */
.predictions-auth-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: var(--space-xl) 0;
  animation: authFadeIn var(--transition-slow);
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

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

.auth-card {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  position: relative;
}

.auth-card__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.auth-card__title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 2px;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
}

.auth-card__subtitle {
  font-size: 0.82rem;
  color: var(--color-text);
  line-height: 1.4;
}

.auth-error-msg,
.alert-error {
  background: var(--color-red-brand);
  border: 1px solid var(--color-red-brand);
  color: var(--color-text-tertiary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-lg);
  line-height: 1.4;
}

.auth-error-msg {
  animation: shake 0.3s ease-in-out;
}

.alert-success {
  background: var(--color-green-brand);
  border: 1px solid var(--color-green-brand);
  color: var(--color-text-tertiary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-lg);
  line-height: 1.4;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  background: var(--color-bg);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  padding: var(--space-sm) var(--space-md);
  transition: all var(--transition-fast);
}

.auth-card .form-group input {
  color: var(--color-text-tertiary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px var(--color-gold-dim);
}

.auth-btn {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--color-bg);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 700;
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: var(--space-xs);
  box-shadow: var(--shadow-sm);
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-gold);
  filter: brightness(1.05);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-toggle-text {
  font-size: 0.82rem;
  color: var(--color-text);
  text-align: center;
  margin-top: var(--space-md);
}

.auth-toggle-text a {
  color: var(--color-gold-dark);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.auth-toggle-text a:hover {
  color: var(--color-gold-light);
  text-decoration: underline;
}

/* ============================================
   Registration Form Centering Styles
   ============================================ */
#register-form {
  display: none;
}

#register-form.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#overlay-register-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#register-form .form-group,
#overlay-register-form .form-group {
  width: 100%;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#register-form .form-label,
#overlay-register-form .form-group label {
  text-align: center;
  width: 100%;
}

#register-form .form-input,
#overlay-register-form .form-group input {
  width: 100%;
  text-align: center;
}

#register-form .form-input::placeholder,
#overlay-register-form .form-group input::placeholder {
  text-align: center;
}

#register-form .login-btn,
#overlay-register-form .auth-btn {
  width: 100%;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

#overlay-login-form label {
  color: var(--color-text-quaternary);
}

/* ============================================
   Site Footer (Biotech Branding)
   ============================================ */
.site-footer {
  background-color: #00478f;
  /* Brand blue from the desktop photo */
  color: #ffffff;
  padding: 0;
  font-family: var(--font-primary);
  border-top: none;
  font-size: 0.85rem;
  width: 100%;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.site-footer a {
  color: #ffffff;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.site-footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.site-footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px var(--space-xl);
  display: grid;
  grid-template-columns: 1.2fr auto 2fr auto 1.2fr;
  align-items: center;
  gap: var(--space-lg);
}

/* Status/Sync row at the top (centered) */
.site-footer__status-row {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-xl) 0;
  text-align: center;
}

.site-footer__status-row .sync-badge {
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 4px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #ffffff;
  transition: all var(--transition-fast);
}

/* Brand Column */
.site-footer__brand-col {
  grid-column: 1;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-md);
}

.biotech-logo-svg {
  flex-shrink: 0;
}

.biotech-logo-img {
  width: 290px;
  height: auto;
}

.footer__brand-text {
  display: flex;
  flex-direction: column;
}

.footer__logo-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.2;
  color: #ffffff;
}

.footer__logo-rif {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  letter-spacing: 1px;
}

/* Dividers */
.site-footer__divider {
  width: 1px;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.35);
  justify-self: center;
  align-self: center;
}

.site-footer__divider-1 {
  grid-column: 2;
}

.site-footer__divider-2 {
  grid-column: 4;
}

/* Contact Info Column */
.site-footer__contact-col {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: left;
}

.site-footer__contact-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.site-footer__contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.4;
  margin: -10px 0;
}

.site-footer__contact-item svg {
  flex-shrink: 0;
  width: 50px;
  height: 65px;
  color: #ffffff;
}

.site-footer__contact-item strong {
  font-weight: 700;
}

/* Footer Bottom Bar (Terms & Privacy) */
.site-footer__bottom {
  background-color: #00366d;
  /* Darker blue band spanning full width */
  padding: var(--space-md) var(--space-xl);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__terms-row {
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
}

/* Social Icons Column */
.site-footer__social-col {
  grid-column: 5;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
}

.site-footer__social-link {
  color: #ffffff;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer__social-link:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.site-footer__social-link svg {
  stroke: #ffffff;
}

/* Responsive Footer Styles */
@media (max-width: 768px) {
  .site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 0;
  }

  .site-footer__status-row {
    padding: var(--space-md) var(--space-md) 0;
  }

  .site-footer__divider {
    display: none;
  }

  .site-footer__brand-col {
    order: 1;
    padding: var(--space-lg) var(--space-md) var(--space-sm);
    justify-content: center;
    width: 100%;
  }

  .site-footer__contact-col {
    order: 2;
    padding: var(--space-sm) var(--space-md) var(--space-md);
    width: 100%;
    align-items: center;
  }

  .site-footer__contact-list {
    align-self: center;
    width: 100%;
    max-width: 380px;
    padding: 0 var(--space-sm);
  }

  .site-footer__social-col {
    order: 3;
    width: 100%;
    background-color: #00366d;
    /* Darker blue band on mobile */
    padding: var(--space-md) 0;
    justify-content: center;
    gap: 32px;
  }

  .site-footer__bottom {
    padding: var(--space-md) var(--space-md) var(--space-lg);
    font-size: 0.8rem;
  }

  .site-footer__contact-item {
    font-size: 0.85rem;
  }

  .footer__logo-title {
    font-size: 1.5rem;
  }

  .biotech-logo-img {
    width: 230px;
  }
}

/* --- Simulation Reset Button --- */
.reset-preds-btn {
  background: transparent;
  border: 1px solid var(--color-red);
  color: var(--color-red);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: var(--space-xs);
  margin-left: var(--space-sm);
}

.reset-preds-btn:hover:not(:disabled) {
  background: var(--color-red);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.4);
}

.reset-preds-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--color-surface-border);
  color: var(--color-text-muted);
}

/* --- Login & Reset Password Card Styles --- */
.login-card {
  background: var(--color-surface);
}