/*
 * ═══════════════════════════════════════════════════════════════════
 *  NhaBex Games — Stylesheet
 *  app/assets/css/games.css
 *
 *  Uses MD3 design tokens from md3-tokens.css
 * ═══════════════════════════════════════════════════════════════════
 */

/* ─── GAMES PAGE LAYOUT ──────────────────────────────────────────── */
.games-page {
  /* override app-main padding-bottom to ensure cards don't hide behind bottom nav */
  padding-bottom: calc(var(--md-sys-layout-bottom-nav-h) + 64px + env(safe-area-inset-bottom, 0)) !important;
}

/* ─── HERO SECTION ───────────────────────────────────────────────── */
.games-hero {
  background: linear-gradient(135deg,
    var(--games-hero-accent, var(--md-sys-color-primary)) 0%,
    color-mix(in srgb, var(--games-hero-accent, #049a7d) 85%, #000) 50%,
    color-mix(in srgb, var(--games-hero-accent, #037a63) 70%, #000) 100%);
  padding: 24px 16px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.games-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.games-hero::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.games-hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--md-sys-layout-max-width);
  margin: 0 auto;
}

.games-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 12px;
  border-radius: var(--md-sys-shape-full);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
}

.games-hero__badge .material-symbols-rounded {
  font-size: 16px;
}

.games-hero__title {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
}

.games-hero__subtitle {
  font-size: 0.875rem;
  opacity: 0.85;
  line-height: 1.4;
}

.games-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 24px;
  background: #fff;
  color: var(--md-sys-color-primary);
  border: none;
  border-radius: var(--md-sys-shape-full);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--md-sys-typescale-font);
  cursor: pointer;
  transition: all var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
  box-shadow: var(--md-sys-elevation-2);
}

.games-hero__cta .material-symbols-rounded {
  font-size: 20px;
}

.games-hero__cta:hover {
  box-shadow: var(--md-sys-elevation-4);
  transform: translateY(-1px);
}

/* ─── STICKY ZONE (sports chips + stats + tabs) ──────────────────── */
.games-sticky-zone {
  position: sticky;
  top: var(--md-sys-layout-top-app-bar-h, 56px);
  z-index: var(--md-sys-z-sticky, 10);
  background: var(--md-sys-color-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ─── SPORT CATEGORIES SCROLL ────────────────────────────────────── */
.games-sports-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  z-index: 1;
  background: var(--md-sys-color-primary);
}

.games-sports-scroll::-webkit-scrollbar {
  display: none;
}

.games-sport-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--md-sys-shape-full);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
  backdrop-filter: blur(4px);
}

.games-sport-chip .material-symbols-rounded {
  font-size: 18px;
}

.games-sport-chip:hover {
  background: rgba(255, 255, 255, 0.2);
}

.games-sport-chip--active {
  background: #fff;
  color: var(--md-sys-color-primary);
  border-color: #fff;
  font-weight: 600;
}

/* ─── SPORT CHIP WRAP (for favorite button) ─────────────────────── */
.games-sport-chip-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.games-sport-fav-btn {
  position: absolute;
  top: -6px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
  z-index: 1;
  backdrop-filter: blur(4px);
}

.games-sport-fav-btn .material-symbols-rounded {
  font-size: 12px;
}

.games-sport-fav-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fbbf24;
  transform: scale(1.15);
}

.games-sport-fav-btn .icon-fill {
  color: #fbbf24;
}

.games-sport-chip--fav {
  border-color: rgba(251, 191, 36, 0.5);
}

/* ─── QUICK STATS ────────────────────────────────────────────────── */
.games-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--md-sys-color-outline-variant);
  margin: 0;
  overflow: hidden;
  max-width: var(--md-sys-layout-max-width);
  position: relative;
  z-index: 2;
}

.games-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  background: var(--md-sys-color-surface);
}

.games-stat-item__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  line-height: 1;
}

.games-stat-item__label {
  font-size: 0.6875rem;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 4px;
  font-weight: 500;
}

/* ─── NAVIGATION TABS ────────────────────────────────────────────── */
.games-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 10px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: var(--md-sys-layout-max-width);
  margin: 0 auto;
  background: var(--md-sys-color-surface);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.games-tabs::-webkit-scrollbar {
  display: none;
}

.games-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--md-sys-shape-medium);
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.6875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
  min-width: 60px;
  flex: 1;
}

.games-tab .material-symbols-rounded {
  font-size: 22px;
}

.games-tab:hover {
  background: var(--md-sys-color-primary-10);
}

.games-tab--active {
  background: var(--md-sys-color-primary-10);
  color: var(--md-sys-color-primary);
  font-weight: 600;
}

.games-tab--active .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── SECTIONS ───────────────────────────────────────────────────── */
.games-section {
  padding: 16px;
  max-width: var(--md-sys-layout-max-width);
  margin: 0 auto;
}

.games-section-intro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--md-sys-color-primary-container);
  border-radius: var(--md-sys-shape-medium);
  margin-bottom: 16px;
}

/* ─── FILTER CHIPS ───────────────────────────────────────────────── */
.games-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.games-filter-row::-webkit-scrollbar {
  display: none;
}

.games-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--md-sys-shape-full);
  border: 1.5px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
}

.games-filter-chip .material-symbols-rounded {
  font-size: 16px;
}

.games-filter-chip:hover {
  border-color: var(--md-sys-color-primary);
}

.games-filter-chip--active {
  background: var(--md-sys-color-primary-10);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
  font-weight: 600;
}

/* ─── SEARCH BAR ─────────────────────────────────────────────────── */
.games-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-full);
  margin-bottom: 12px;
  border: 1.5px solid var(--md-sys-color-outline-variant);
  transition: border-color var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
}

.games-search-bar:focus-within {
  border-color: var(--md-sys-color-primary);
}

.games-search-bar .material-symbols-rounded {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 20px;
}

.games-search-bar__input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface);
  outline: none;
  font-family: var(--md-sys-typescale-font);
}

.games-search-bar__input::placeholder {
  color: var(--md-sys-color-on-surface-variant);
}

/* ─── CARD LIST ──────────────────────────────────────────────────── */
.games-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── TOURNAMENT CARDS ───────────────────────────────────────────── */
.games-tournament-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-large);
  overflow: hidden;
  box-shadow: var(--md-sys-elevation-1);
  transition: box-shadow var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
  cursor: pointer;
}

.games-tournament-card:hover {
  box-shadow: var(--md-sys-elevation-3);
}

.games-tournament-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  color: #fff;
}

.games-tournament-card__sport {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.games-tournament-card__sport .material-symbols-rounded {
  font-size: 18px;
}

.games-tournament-card__status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--md-sys-shape-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.games-status--open {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.games-status--ongoing {
  background: #fef3cd;
  color: #7a4e00;
}

.games-status--finished {
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
}

.games-tournament-card__body {
  padding: 14px;
}

.games-tournament-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--md-sys-color-on-surface);
}

.games-tournament-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.games-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant);
}

.games-meta-item .material-symbols-rounded {
  color: var(--md-sys-color-primary);
}

.games-tournament-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 14px 14px;
}

/* ─── PROGRESS BAR ───────────────────────────────────────────────── */
.games-progress-bar {
  height: 6px;
  background: var(--md-sys-color-surface-container-highest);
  border-radius: var(--md-sys-shape-full);
  overflow: hidden;
}

.games-progress-bar__fill {
  height: 100%;
  background: var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-full);
  transition: width var(--md-sys-motion-duration-medium-2) var(--md-sys-motion-easing-standard);
}

.games-progress-bar__fill--warning {
  background: var(--md-sys-color-warning);
}

.games-progress-bar__label {
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 4px;
}

/* ─── FIELD CARDS ────────────────────────────────────────────────── */
.games-field-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-large);
  overflow: hidden;
  box-shadow: var(--md-sys-elevation-1);
  transition: box-shadow var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
}

.games-field-card:hover {
  box-shadow: var(--md-sys-elevation-3);
}

.games-field-card__visual {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.games-field-card__icon {
  font-size: 48px;
  color: rgba(255, 255, 255, 0.3);
}

.games-field-card__type {
  position: absolute;
  bottom: 8px;
  left: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--md-sys-shape-full);
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.games-field-card__body {
  padding: 14px;
}

.games-field-card__name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.games-field-card__location {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 10px;
}

.games-field-card__location .material-symbols-rounded {
  color: var(--md-sys-color-primary);
}

.games-field-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.games-feature-tag {
  padding: 3px 10px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-full);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
}

.games-field-card__availability {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.games-availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.games-availability-dot--free {
  background: var(--md-sys-color-success);
  box-shadow: 0 0 0 3px rgba(47, 168, 141, 0.2);
}

.games-availability-dot--busy {
  background: var(--md-sys-color-error);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* ══════════════════════════════════════════
   My Account Tab
   ══════════════════════════════════════════ */
.games-myaccount-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.games-myaccount-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700; color: #fff;
}
.games-myaccount-name { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.games-myaccount-id { margin: 2px 0 0; font-size: 0.75rem; color: var(--md-sys-color-on-surface-variant, #666); }

.games-myaccount-section { margin-bottom: 20px; }
.games-myaccount-section__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface, #1a1a1a);
  margin: 0 0 10px;
}
.games-myaccount-count {
  font-size: 0.625rem;
  font-weight: 700;
  background: var(--md-sys-color-surface-container, #f0f0f0);
  color: var(--md-sys-color-on-surface-variant, #666);
  padding: 2px 7px;
  border-radius: 10px;
}

.games-myaccount-card {
  background: var(--md-sys-color-surface-container-low, #fff);
  border: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.games-myaccount-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant, #666);
}
.games-myaccount-card__details span { display: flex; align-items: center; gap: 4px; }
.games-myaccount-card__sub {
  display: block;
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant, #666);
  font-weight: 400;
}

.games-myaccount-empty {
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant, #999);
  text-align: center;
  padding: 16px 0;
}

.games-myaccount-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.games-myaccount-cta:hover { background: rgba(59,130,246,0.12); }
.games-myaccount-cta strong { font-size: 0.875rem; display: block; color: #60a5fa; }
.games-myaccount-cta p { font-size: 0.75rem; color: var(--md-sys-color-on-surface-variant, #6b7280); margin: 2px 0 0; }

/* Tournament registered badge */
.games-tournament-card__registered {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #02A586;
  background: rgba(2,165,134,0.08);
  padding: 6px 12px;
  border-radius: 20px;
}

/* Company group in tabs */
.games-company-group { margin-bottom: 16px; }
.games-company-group__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface, #1a1a1a);
  margin: 0 0 10px;
  padding: 8px 12px;
  background: var(--md-sys-color-surface-container, #f5f5f5);
  border-radius: 10px;
}
.games-company-group__title > i { color: #02A586; }

/* Company badge on cards */
.games-company-badge {
  display: inline-block;
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  background: rgba(107,114,128,0.08);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}

/* ══════════════════════════════════════════
   Points & Credits Widget
   ══════════════════════════════════════════ */
.games-points-widget {
  background: var(--md-sys-color-surface-container-low, #fff);
  border: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}
.games-points-widget__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.games-points-widget__tier {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.games-points-widget__progress { flex: 1; }
.games-points-widget__progress-bar {
  height: 6px;
  background: var(--md-sys-color-surface-container, #f0f0f0);
  border-radius: 3px;
  overflow: hidden;
}
.games-points-widget__progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.games-points-widget__progress-label {
  font-size: 0.625rem;
  color: var(--md-sys-color-on-surface-variant, #666);
  margin-top: 2px;
  display: block;
}
.games-points-widget__stats {
  display: flex;
  gap: 8px;
}
.games-points-widget__stat {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--md-sys-color-surface-container, #f5f5f5);
  border-radius: 12px;
  padding: 10px 12px;
}
.games-points-widget__stat i { font-size: 20px; }
.games-points-widget__value {
  font-size: 1rem;
  font-weight: 700;
  display: block;
  line-height: 1.1;
}
.games-points-widget__label {
  font-size: 0.625rem;
  color: var(--md-sys-color-on-surface-variant, #666);
}
.games-points-widget__convert {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 1.5px solid #02A586;
  border-radius: 12px;
  background: none;
  color: #02A586;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.games-points-widget__convert:hover { background: rgba(2,165,134,0.06); }
.games-points-widget__convert:disabled { opacity: 0.5; cursor: not-allowed; }

.games-points-widget__log {
  margin-top: 12px;
  border-top: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
  padding-top: 10px;
}
.games-points-widget__log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 0.75rem;
}
.games-points-widget__log-action { color: var(--md-sys-color-on-surface-variant, #666); }
.games-points-widget__log-points { font-weight: 700; font-family: monospace; }

/* Booking mode toggle */
.games-booking-mode {
  display: flex;
  gap: 0;
  border: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}
.games-booking-mode__btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--md-sys-color-on-surface-variant, #666);
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.games-booking-mode__btn--active {
  background: #02A586;
  color: #fff;
  font-weight: 600;
}
.games-booking-mode__btn:not(.games-booking-mode__btn--active):hover {
  background: rgba(0,0,0,0.04);
}

/* Weekday selector */
.games-weekday-selector {
  display: flex;
  gap: 6px;
}
.games-weekday-chip {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--md-sys-color-outline-variant, #e0e0e0);
  background: none;
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant, #666);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.games-weekday-chip--active {
  background: #02A586;
  border-color: #02A586;
  color: #fff;
}
.games-weekday-chip:not(.games-weekday-chip--active):hover {
  border-color: #02A586;
  color: #02A586;
}

.games-field-card__plan-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.games-field-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.games-field-card__price-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
}

/* ─── MATCH CARDS ────────────────────────────────────────────────── */
.games-date-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.games-date-scroll::-webkit-scrollbar {
  display: none;
}

.games-date-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--md-sys-shape-medium);
  border: 1.5px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface);
  cursor: pointer;
  transition: all var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
  min-width: 56px;
}

.games-date-chip:hover {
  border-color: var(--md-sys-color-primary);
}

.games-date-chip--active {
  background: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
  color: #fff;
}

.games-date-chip__weekday {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.games-date-chip__day {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.games-date-chip__month {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0.7;
}

.games-match-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-large);
  padding: 14px;
  box-shadow: var(--md-sys-elevation-1);
  position: relative;
  overflow: hidden;
}

.games-match-card--live {
  border-left: 3px solid var(--md-sys-color-error);
}

.games-match-card__live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--md-sys-color-error);
  color: #fff;
  padding: 2px 10px;
  border-radius: var(--md-sys-shape-full);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.games-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: games-pulse 1.5s infinite;
}

@keyframes games-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.games-match-card__context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.games-match-card__versus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.games-match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.games-match-team__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--md-sys-shape-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}

.games-match-team__name {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: var(--md-sys-color-on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.games-match-card__score {
  flex-shrink: 0;
}

.games-score-display {
  display: flex;
  align-items: center;
  gap: 6px;
}

.games-score-display__home,
.games-score-display__away {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  min-width: 24px;
  text-align: center;
}

.games-score-display__sep {
  font-size: 1rem;
  color: var(--md-sys-color-on-surface-variant);
}

.games-time-display {
  text-align: center;
}

.games-time-display__time {
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
}

.games-match-card__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

/* ─── TRAINING CARDS ─────────────────────────────────────────────── */
.games-create-training-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-large);
  background: var(--md-sys-color-primary-10);
  color: var(--md-sys-color-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
  margin-bottom: 16px;
  font-family: var(--md-sys-typescale-font);
}

.games-create-training-btn .material-symbols-rounded {
  font-size: 22px;
}

.games-create-training-btn:hover {
  background: var(--md-sys-color-primary-20);
}

.games-training-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-large);
  overflow: hidden;
  box-shadow: var(--md-sys-elevation-1);
}

.games-training-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 8px;
}

.games-training-card__sport-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--md-sys-color-primary-10);
  color: var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.games-urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: #fef3cd;
  color: #7a4e00;
  border-radius: var(--md-sys-shape-full);
  font-size: 0.6875rem;
  font-weight: 600;
  animation: games-urgency-glow 2s infinite;
}

@keyframes games-urgency-glow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.15); }
}

.games-training-card__body {
  padding: 14px;
}

.games-training-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.games-training-card__organizer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.games-training-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.games-training-card__players {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.games-player-avatars {
  display: flex;
  align-items: center;
}

.games-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
}

.games-avatar-xs {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 700;
  margin-left: -6px;
  border: 2px solid var(--md-sys-color-surface);
}

.games-avatar-xs:first-child {
  margin-left: 0;
}

.games-avatar-xs--more {
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.625rem;
}

.games-training-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 14px 14px;
}

.games-btn-pulse {
  animation: games-btn-pulse-anim 2s infinite;
}

@keyframes games-btn-pulse-anim {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 4px rgba(2, 165, 134, 0.2); }
}

/* ─── TEAM CARDS ─────────────────────────────────────────────────── */
.games-team-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-large);
  overflow: hidden;
  box-shadow: var(--md-sys-elevation-1);
  cursor: pointer;
  transition: box-shadow var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
}

.games-team-card:hover {
  box-shadow: var(--md-sys-elevation-3);
}

.games-team-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: #fff;
}

.games-team-card__emblem {
  width: 48px;
  height: 48px;
  border-radius: var(--md-sys-shape-medium);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  flex-shrink: 0;
}

.games-team-card__name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.games-team-card__sport {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  opacity: 0.85;
}

.games-team-card__body {
  padding: 14px;
}

.games-team-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.games-team-stat {
  text-align: center;
  padding: 8px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-small);
}

.games-team-stat__value {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
}

.games-team-stat__label {
  font-size: 0.625rem;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.games-team-card__members {
  margin-bottom: 10px;
}

.games-team-card__next-match {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--md-sys-color-primary-container);
  border-radius: var(--md-sys-shape-small);
}

/* ─── MODAL ──────────────────────────────────────────────────────── */
.games-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--md-sys-z-dialog);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: games-fade-in 200ms ease-out;
}

@keyframes games-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.games-modal {
  background: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-extra-large) var(--md-sys-shape-extra-large) 0 0;
  width: 100%;
  max-width: var(--md-sys-layout-max-width);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: games-slide-up 300ms var(--md-sys-motion-easing-emphasized-decel);
}

@keyframes games-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.games-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: #fff;
  border-radius: var(--md-sys-shape-extra-large) var(--md-sys-shape-extra-large) 0 0;
  flex-shrink: 0;
}

.games-modal__title {
  flex: 1;
  font-size: 1.125rem;
  font-weight: 600;
}

.games-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.games-modal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  flex-shrink: 0;
}

/* ─── DETAIL GRID ────────────────────────────────────────────────── */
.games-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.games-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-small);
}

.games-detail-item .material-symbols-rounded {
  color: var(--md-sys-color-primary);
  font-size: 20px;
  margin-top: 2px;
}

.games-detail-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.games-detail-section {
  margin-bottom: 16px;
}

.games-detail-section h3 {
  margin-bottom: 8px;
}

/* ─── PRIZE CARD ─────────────────────────────────────────────────── */
.games-prize-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #fffbeb, #fef3cd);
  border-radius: var(--md-sys-shape-medium);
  margin-bottom: 16px;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.games-prize-card > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ─── REGISTERED TEAMS ───────────────────────────────────────────── */
.games-registered-teams {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.games-registered-team {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-small);
}

/* ─── FIELD BOOKING ──────────────────────────────────────────────── */
.games-time-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.games-time-slot {
  padding: 10px 8px;
  border: 1.5px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-small);
  background: var(--md-sys-color-surface);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
  font-family: var(--md-sys-typescale-font);
  color: var(--md-sys-color-on-surface);
}

.games-time-slot:hover:not(:disabled) {
  border-color: var(--md-sys-color-primary);
}

.games-time-slot--selected {
  background: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
  color: #fff;
}

.games-time-slot--unavailable {
  opacity: 0.4;
  text-decoration: line-through;
  cursor: not-allowed;
}

.games-duration-options {
  display: flex;
  gap: 8px;
}

.games-duration-chip {
  padding: 10px 20px;
  border: 1.5px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-full);
  background: var(--md-sys-color-surface);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
  font-family: var(--md-sys-typescale-font);
  color: var(--md-sys-color-on-surface);
}

.games-duration-chip--active {
  background: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
  color: #fff;
}

.games-booking-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: var(--md-sys-color-primary-container);
  border-radius: var(--md-sys-shape-medium);
  margin-top: 16px;
}

.games-booking-total__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
}

/* ─── FORM ELEMENTS ──────────────────────────────────────────────── */
.games-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.games-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.games-form-row {
  display: flex;
  gap: 12px;
}

.games-input {
  padding: 12px 14px;
  border: 1.5px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-small);
  font-size: 0.875rem;
  font-family: var(--md-sys-typescale-font);
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
  transition: border-color var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
  outline: none;
  width: 100%;
}

.games-input:focus {
  border-color: var(--md-sys-color-primary);
}

.games-textarea {
  min-height: 80px;
  resize: vertical;
}

.games-counter {
  display: flex;
  align-items: center;
  gap: 16px;
}

.games-counter__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--md-sys-color-primary);
  transition: all var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
}

.games-counter__btn:hover {
  background: var(--md-sys-color-primary-10);
  border-color: var(--md-sys-color-primary);
}

.games-counter__value {
  font-size: 1.25rem;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
}

/* ─── SUB-TABS ───────────────────────────────────────────────────── */
.games-subtabs {
  display: flex;
  gap: 4px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-full);
  padding: 4px;
  margin-bottom: 16px;
}

.games-subtab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--md-sys-shape-full);
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
  font-family: var(--md-sys-typescale-font);
}

.games-subtab:hover {
  color: var(--md-sys-color-on-surface);
}

.games-subtab--active {
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-primary);
  font-weight: 600;
  box-shadow: var(--md-sys-elevation-1);
}

/* ─── ATHLETES LIST ──────────────────────────────────────────────── */
.games-athletes-summary {
  margin-bottom: 12px;
  color: var(--md-sys-color-on-surface-variant);
}

/* ─── REGISTER ATHLETE CTA ───────────────────────────────────────── */
.games-register-athlete-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--md-sys-color-primary-container), rgba(2, 165, 134, 0.12));
  border: 2px solid var(--md-sys-color-primary-20);
  border-radius: var(--md-sys-shape-large);
  cursor: pointer;
  transition: all var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
  margin-bottom: 16px;
  text-align: left;
  font-family: var(--md-sys-typescale-font);
}

.games-register-athlete-btn:hover {
  border-color: var(--md-sys-color-primary);
  box-shadow: var(--md-sys-elevation-2);
}

.games-register-athlete-btn__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--md-sys-color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.games-register-athlete-btn__icon .material-symbols-rounded {
  font-size: 22px;
}

.games-register-athlete-btn__text {
  flex: 1;
  min-width: 0;
}

.games-register-athlete-btn__title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.games-register-athlete-btn__desc {
  display: block;
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 2px;
}

.games-register-athlete-btn > .material-symbols-rounded:last-child {
  color: var(--md-sys-color-primary);
  font-size: 20px;
  flex-shrink: 0;
}

/* ── Register Banner (persistent, below tabs) ── */
.games-register-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  margin: 0 12px 12px;
  background: var(--md-sys-color-primary-container, rgba(2, 165, 134, 0.1));
  border-radius: var(--md-sys-shape-medium, 12px);
  font-family: var(--md-sys-typescale-font);
}
.games-register-banner__content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface, #1a1a1a);
  min-width: 0;
}
.games-register-banner__content .material-symbols-rounded {
  font-size: 20px;
  color: var(--md-sys-color-primary, #02A586);
  flex-shrink: 0;
}
.games-register-banner__btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border: none;
  border-radius: var(--md-sys-shape-small, 8px);
  background: var(--md-sys-color-primary, #02A586);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

/* ── Centers Tab — Company Cards ── */
.games-center-card {
  display: flex;
  flex-direction: column;
  background: var(--md-sys-color-surface-container-low, #f8faf8);
  border: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
  border-radius: var(--md-sys-shape-large, 16px);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}
.games-center-card:hover {
  border-color: var(--md-sys-color-primary, #02A586);
  box-shadow: var(--md-sys-elevation-2, 0 2px 8px rgba(0,0,0,0.08));
}
.games-center-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
}
.games-center-card__logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.games-center-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.games-center-card__info {
  flex: 1;
  min-width: 0;
}
.games-center-card__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.games-center-card__location {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant, #666);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.games-center-card__location .material-symbols-rounded {
  font-size: 14px;
}
.games-center-card__sports {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 0 16px 10px;
}
.games-center-card__sport-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 500;
  background: var(--md-sys-color-primary-container, rgba(2,165,134,0.1));
  color: var(--md-sys-color-primary, #02A586);
}
.games-center-card__sport-chip .material-symbols-rounded {
  font-size: 13px;
}
.games-center-card__stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
}
.games-center-card__stat {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  border-right: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
}
.games-center-card__stat:last-child {
  border-right: none;
}
.games-center-card__stat-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1a1a1a);
}
.games-center-card__stat-label {
  display: block;
  font-size: 0.625rem;
  text-transform: uppercase;
  color: var(--md-sys-color-on-surface-variant, #888);
  letter-spacing: 0.03em;
}
.games-center-card__actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
}
.games-center-card__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--md-sys-shape-small, 8px);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.games-center-card__btn--primary {
  background: var(--md-sys-color-primary, #02A586);
  color: #fff;
}
.games-center-card__btn--outline {
  background: transparent;
  border: 1px solid var(--md-sys-color-outline, #ccc);
  color: var(--md-sys-color-on-surface, #333);
}
.games-center-card__btn .material-symbols-rounded {
  font-size: 16px;
}
.games-centers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .games-centers-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── REGISTRATION STEPS ─────────────────────────────────────────── */
.games-reg-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
  padding: 0 8px;
}

.games-reg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.games-reg-step__circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  transition: all var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
}

.games-reg-step--active .games-reg-step__circle {
  background: var(--md-sys-color-primary);
  color: #fff;
}

.games-reg-step--done .games-reg-step__circle {
  background: var(--md-sys-color-success);
  color: #fff;
}

.games-reg-step__label {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.games-reg-step--active .games-reg-step__label {
  color: var(--md-sys-color-primary);
  font-weight: 600;
}

.games-reg-step__line {
  flex: 1;
  height: 2px;
  background: var(--md-sys-color-outline-variant);
  margin: 0 8px;
  margin-bottom: 18px;
  min-width: 24px;
  transition: background var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
}

.games-reg-step__line--done {
  background: var(--md-sys-color-success);
}

/* ─── LEVEL CHIPS ────────────────────────────────────────────────── */
.games-level-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.games-level-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1.5px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-full);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
  font-family: var(--md-sys-typescale-font);
}

.games-level-chip:hover {
  border-color: var(--md-sys-color-primary);
}

.games-level-chip--active {
  background: var(--md-sys-color-primary-10);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
  font-weight: 600;
}

/* ─── SPORT SELECTION GRID ───────────────────────────────────────── */
.games-sports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.games-sport-select {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-medium);
  background: var(--md-sys-color-surface);
  cursor: pointer;
  transition: all var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
  position: relative;
  font-family: var(--md-sys-typescale-font);
}

.games-sport-select:hover {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-10);
}

.games-sport-select--active {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-10);
}

.games-sport-select__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--md-sys-shape-small);
  background: var(--md-sys-color-surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--md-sys-color-on-surface-variant);
  transition: all var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
}

.games-sport-select--active .games-sport-select__icon {
  background: var(--md-sys-color-primary);
  color: #fff;
}

.games-sport-select__name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.games-sport-select__check {
  color: var(--md-sys-color-primary);
  flex-shrink: 0;
}

/* ─── REGISTRATION PROFILE CARD (Step 1 - logged in) ────────────── */
.games-reg-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-medium);
  margin-bottom: 4px;
}

.games-reg-profile-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.games-reg-profile-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.games-reg-profile-card__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.games-reg-profile-card__detail {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant);
}

/* ─── REGISTRATION CONFIRMATION ──────────────────────────────────── */
.games-reg-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.games-reg-confirm__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
}

.games-reg-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-medium);
  margin-bottom: 16px;
}

.games-reg-summary__row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface);
}

.games-reg-summary__row .material-symbols-rounded {
  color: var(--md-sys-color-primary);
}

.games-reg-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 12px;
  border-radius: var(--md-sys-shape-small);
  transition: background var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
}

.games-reg-terms:hover {
  background: var(--md-sys-color-surface-container);
}

.games-reg-terms input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--md-sys-color-primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.games-athletes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.games-athlete-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-medium);
  box-shadow: var(--md-sys-elevation-1);
  cursor: pointer;
  transition: box-shadow var(--md-sys-motion-duration-short-4) var(--md-sys-motion-easing-standard);
}

.games-athlete-card:hover {
  box-shadow: var(--md-sys-elevation-3);
}

.games-athlete-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.games-athlete-card__info {
  flex: 1;
  min-width: 0;
}

.games-athlete-card__name {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--md-sys-color-on-surface);
}

.games-athlete-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.games-athlete-tag {
  padding: 2px 8px;
  background: var(--md-sys-color-primary-10);
  color: var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-full);
  font-size: 0.625rem;
  font-weight: 600;
}

.games-athlete-card__stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.games-athlete-mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.games-athlete-mini-stat__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  line-height: 1;
}

.games-athlete-mini-stat__label {
  font-size: 0.5625rem;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ─── PODIUM ─────────────────────────────────────────────────────── */
.games-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 20px 0 0;
  margin-bottom: 24px;
}

.games-podium__place {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 120px;
}

.games-podium__crown {
  margin-bottom: -4px;
}

.games-podium__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}

.games-podium__avatar--1st {
  width: 56px;
  height: 56px;
  font-size: 1rem;
  box-shadow: 0 0 0 3px #f59e0b, 0 4px 12px rgba(245, 158, 11, 0.3);
}

.games-podium__name {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-podium__points {
  font-size: 0.6875rem;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
}

.games-podium__bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  border-radius: var(--md-sys-shape-small) var(--md-sys-shape-small) 0 0;
}

.games-podium__bar--1st {
  height: 80px;
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.games-podium__bar--2nd {
  height: 60px;
  background: linear-gradient(180deg, #9ca3af, #6b7280);
}

.games-podium__bar--3rd {
  height: 44px;
  background: linear-gradient(180deg, #d97706, #92400e);
}

/* ─── RANKING LIST ───────────────────────────────────────────────── */
.games-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.games-ranking-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-small);
  transition: background var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
}

.games-ranking-row:hover {
  background: var(--md-sys-color-surface-container);
}

.games-ranking-row--top3 {
  background: var(--md-sys-color-surface-container-low);
}

.games-ranking-row__pos {
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.games-ranking-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.games-ranking-medal--gold   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.games-ranking-medal--silver { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.games-ranking-medal--bronze { background: linear-gradient(135deg, #d97706, #92400e); }

.games-ranking-pos {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
}

.games-ranking-row__athlete {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.games-ranking-row__name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-ranking-row__team {
  display: block;
  color: var(--md-sys-color-on-surface-variant);
}

.games-ranking-row__stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.games-ranking-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 24px;
}

.games-ranking-stat__value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  line-height: 1;
}

.games-ranking-stat__label {
  font-size: 0.5625rem;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
  text-transform: uppercase;
}

.games-ranking-row__points {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 40px;
}

.games-ranking-row__points > span:first-child {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  line-height: 1;
}

/* ─── MY BOOKINGS ────────────────────────────────────────────────── */
.games-my-bookings {
  margin-bottom: 16px;
  padding: 14px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-large);
}

.games-my-bookings__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.games-booking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-medium);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.games-booking-item--past {
  opacity: 0.55;
}

.games-booking-item__icon {
  flex-shrink: 0;
  color: var(--md-sys-color-primary);
}

.games-booking-item__icon .material-symbols-rounded {
  font-size: 22px;
}

.games-booking-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.games-booking-item__venue {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-booking-item__detail {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant);
}

.games-booking-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.games-booking-item__price {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
}

.games-booking-item__status {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: var(--md-sys-shape-full);
}

.games-booking-status--paid {
  background: rgba(45, 183, 145, 0.12);
  color: var(--md-sys-color-success);
}

.games-booking-status--pending {
  background: rgba(255, 198, 112, 0.15);
  color: var(--md-sys-color-warning);
}

/* ═══════════════════════════════════════════════════════════════════
 *  DARK MODE
 *  Handles hardcoded colors that don't adapt via MD3 tokens
 * ═══════════════════════════════════════════════════════════════════ */

/* ── Mixin: dark mode selectors (manual + system) ── */

/* --- Booking items in dark --- */
[data-bs-theme="dark"] .games-my-bookings {
  border: 1px solid var(--md-sys-color-outline-variant);
}

/* --- Cards: borders for visual separation in dark --- */
[data-bs-theme="dark"] .games-tournament-card,
[data-bs-theme="dark"] .games-field-card,
[data-bs-theme="dark"] .games-match-card,
[data-bs-theme="dark"] .games-training-card,
[data-bs-theme="dark"] .games-team-card,
[data-bs-theme="dark"] .games-athlete-card,
[data-bs-theme="dark"] .games-ranking-row {
  border: 1px solid var(--md-sys-color-outline-variant);
}

/* --- Status badges: dark-friendly colors --- */
[data-bs-theme="dark"] .games-status--ongoing {
  background: rgba(255, 198, 112, 0.15);
  color: #ffc670;
}

[data-bs-theme="dark"] .games-status--finished {
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
}

/* --- Urgency badge: dark variant --- */
[data-bs-theme="dark"] .games-urgency-badge {
  background: rgba(255, 198, 112, 0.15);
  color: #ffc670;
}

/* --- Prize card: dark variant --- */
[data-bs-theme="dark"] .games-prize-card {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}

/* --- Hero CTA button: contrast in dark --- */
[data-bs-theme="dark"] .games-hero__cta {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .games-hero__cta:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* --- Form inputs: better visibility --- */
[data-bs-theme="dark"] .games-input,
[data-bs-theme="dark"] .games-input::-webkit-calendar-picker-indicator {
  color-scheme: dark;
}

/* --- Date chip: text color when not active --- */
[data-bs-theme="dark"] .games-date-chip {
  color: var(--md-sys-color-on-surface);
}

/* --- Register banner: dark variant --- */
[data-bs-theme="dark"] .games-register-banner {
  background: rgba(2, 165, 134, 0.12);
}

/* --- Center cards: dark variant --- */
[data-bs-theme="dark"] .games-center-card {
  background: var(--md-sys-color-surface-container, #1e1e1e);
}
[data-bs-theme="dark"] .games-center-card__btn--outline {
  border-color: rgba(255,255,255,0.15);
}

/* --- Modal overlay: darker scrim --- */
[data-bs-theme="dark"] .games-modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}

/* --- Ranking row top3: subtle differentiation --- */
[data-bs-theme="dark"] .games-ranking-row--top3 {
  background: var(--md-sys-color-surface-container);
}

/* --- Section intro: adjust for dark container --- */
[data-bs-theme="dark"] .games-section-intro {
  border: 1px solid var(--md-sys-color-outline-variant);
}

/* --- Register athlete CTA: dark border --- */
[data-bs-theme="dark"] .games-register-athlete-btn {
  border-color: var(--md-sys-color-outline-variant);
}

/* --- Subtab active: dark surface with border --- */
[data-bs-theme="dark"] .games-subtab--active {
  background: var(--md-sys-color-surface-container-high);
}

/* --- Booking total: dark container --- */
[data-bs-theme="dark"] .games-booking-total {
  border: 1px solid var(--md-sys-color-outline-variant);
}

/* --- Fav button: dark adjustments --- */
[data-bs-theme="dark"] .games-sport-fav-btn {
  background: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .games-sport-fav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Plan cards & groups: dark --- */
[data-bs-theme="dark"] .games-plan-card {
  background: var(--md-sys-color-surface-container, #1e1e1e);
  border-color: var(--md-sys-color-outline-variant, #444);
}
[data-bs-theme="dark"] .games-plan-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
[data-bs-theme="dark"] .games-plan-card__header {
  border-bottom-color: var(--md-sys-color-outline-variant, #444);
}
[data-bs-theme="dark"] .games-plan-card__features li i {
  color: #2dd4a8 !important;
}
[data-bs-theme="dark"] .games-plan-group {
  background: var(--md-sys-color-surface-container, #1e1e1e);
  border-color: var(--md-sys-color-outline-variant, #444);
}
[data-bs-theme="dark"] .games-plan-group__header:active {
  background: rgba(255,255,255,0.05);
}
[data-bs-theme="dark"] .games-plan-group__count {
  background: var(--md-sys-color-surface-container-high, #333);
}
[data-bs-theme="dark"] .games-badge--outline {
  border-color: var(--md-sys-color-outline-variant, #555);
  color: var(--md-sys-color-on-surface-variant, #aaa);
}
[data-bs-theme="dark"] .games-filter-chip__count {
  background: rgba(255,255,255,0.1);
}

/* ── System preference (auto dark) ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-bs-theme="light"]) .games-my-bookings {
    border: 1px solid var(--md-sys-color-outline-variant);
  }

  :root:not([data-bs-theme="light"]) .games-tournament-card,
  :root:not([data-bs-theme="light"]) .games-field-card,
  :root:not([data-bs-theme="light"]) .games-match-card,
  :root:not([data-bs-theme="light"]) .games-training-card,
  :root:not([data-bs-theme="light"]) .games-team-card,
  :root:not([data-bs-theme="light"]) .games-athlete-card,
  :root:not([data-bs-theme="light"]) .games-ranking-row {
    border: 1px solid var(--md-sys-color-outline-variant);
  }

  :root:not([data-bs-theme="light"]) .games-status--ongoing {
    background: rgba(255, 198, 112, 0.15);
    color: #ffc670;
  }

  :root:not([data-bs-theme="light"]) .games-status--finished {
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface-variant);
  }

  :root:not([data-bs-theme="light"]) .games-urgency-badge {
    background: rgba(255, 198, 112, 0.15);
    color: #ffc670;
  }

  :root:not([data-bs-theme="light"]) .games-prize-card {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
  }

  :root:not([data-bs-theme="light"]) .games-hero__cta {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
  }

  :root:not([data-bs-theme="light"]) .games-hero__cta:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  :root:not([data-bs-theme="light"]) .games-input,
  :root:not([data-bs-theme="light"]) .games-input::-webkit-calendar-picker-indicator {
    color-scheme: dark;
  }

  :root:not([data-bs-theme="light"]) .games-date-chip {
    color: var(--md-sys-color-on-surface);
  }

  :root:not([data-bs-theme="light"]) .games-modal-overlay {
    background: rgba(0, 0, 0, 0.7);
  }

  :root:not([data-bs-theme="light"]) .games-ranking-row--top3 {
    background: var(--md-sys-color-surface-container);
  }

  :root:not([data-bs-theme="light"]) .games-section-intro {
    border: 1px solid var(--md-sys-color-outline-variant);
  }

  :root:not([data-bs-theme="light"]) .games-register-athlete-btn {
    border-color: var(--md-sys-color-outline-variant);
  }

  :root:not([data-bs-theme="light"]) .games-subtab--active {
    background: var(--md-sys-color-surface-container-high);
  }

  :root:not([data-bs-theme="light"]) .games-booking-total {
    border: 1px solid var(--md-sys-color-outline-variant);
  }

  :root:not([data-bs-theme="light"]) .games-sport-fav-btn {
    background: rgba(255, 255, 255, 0.15);
  }

  :root:not([data-bs-theme="light"]) .games-sport-fav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
  }

  :root:not([data-bs-theme="light"]) .games-plan-card {
    background: var(--md-sys-color-surface-container, #1e1e1e);
    border-color: var(--md-sys-color-outline-variant, #444);
  }
  :root:not([data-bs-theme="light"]) .games-plan-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }
  :root:not([data-bs-theme="light"]) .games-plan-card__header {
    border-bottom-color: var(--md-sys-color-outline-variant, #444);
  }
  :root:not([data-bs-theme="light"]) .games-plan-card__features li i {
    color: #2dd4a8 !important;
  }
  :root:not([data-bs-theme="light"]) .games-plan-group {
    background: var(--md-sys-color-surface-container, #1e1e1e);
    border-color: var(--md-sys-color-outline-variant, #444);
  }
  :root:not([data-bs-theme="light"]) .games-plan-group__header:active {
    background: rgba(255,255,255,0.05);
  }
  :root:not([data-bs-theme="light"]) .games-plan-group__count {
    background: var(--md-sys-color-surface-container-high, #333);
  }
  :root:not([data-bs-theme="light"]) .games-badge--outline {
    border-color: var(--md-sys-color-outline-variant, #555);
    color: var(--md-sys-color-on-surface-variant, #aaa);
  }
  :root:not([data-bs-theme="light"]) .games-filter-chip__count {
    background: rgba(255,255,255,0.1);
  }
}

/* ═══════════════════════════════════════════════════════════════════
 *  RESPONSIVE — Tablet (768px+), Desktop (1024px+), Wide (1280px+)
 * ═══════════════════════════════════════════════════════════════════ */

/* ─── TABLET (768px+) ────────────────────────────────────────────── */
@media (min-width: 768px) {

  /* Hero */
  .games-hero {
    padding: 40px 32px 36px;
  }

  .games-hero::before {
    width: 240px;
    height: 240px;
    top: -60px;
    right: -40px;
  }

  .games-hero::after {
    width: 160px;
    height: 160px;
    bottom: -40px;
    left: 20px;
  }

  .games-hero__content {
    max-width: 720px;
  }

  .games-hero__title {
    font-size: 2rem;
  }

  .games-hero__subtitle {
    font-size: 1rem;
    max-width: 480px;
  }

  .games-sports-scroll {
    padding: 12px 32px 8px;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 720px;
    margin: 0 auto;
    overflow: visible;
    justify-content: center;
    background: transparent;
  }

  .games-sports-scroll::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: -9999px; right: -9999px;
    background: var(--md-sys-color-primary);
    z-index: -1;
  }

  .games-sport-chip {
    padding: 10px 20px;
    font-size: 0.875rem;
  }

  /* Stats */
  .games-stats {
    max-width: 720px;
    margin: 0 auto;
  }

  .games-stat-item {
    padding: 18px 12px;
  }

  .games-stat-item__value {
    font-size: 1.5rem;
  }

  .games-stat-item__label {
    font-size: 0.75rem;
  }

  /* Tabs */
  .games-tabs {
    max-width: 720px;
    padding: 20px 32px 14px;
    gap: 4px;
    justify-content: center;
  }

  .games-tab {
    padding: 10px 18px;
    font-size: 0.75rem;
    min-width: 72px;
  }

  .games-tab .material-symbols-rounded {
    font-size: 24px;
  }

  /* Section */
  .games-section {
    max-width: 720px;
    padding: 20px 32px;
  }

  /* Cards — 2 columns */
  .games-card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .games-tournament-card__body { padding: 16px; }
  .games-tournament-card__title { font-size: 1.0625rem; }
  .games-field-card__visual { height: 140px; }
  .games-field-card__body { padding: 16px; }

  .games-match-team__avatar { width: 52px; height: 52px; font-size: 1rem; }
  .games-match-team__name { font-size: 0.8125rem; }
  .games-score-display__home,
  .games-score-display__away { font-size: 1.75rem; }
  .games-date-scroll { gap: 10px; justify-content: center; flex-wrap: nowrap; }
  .games-date-chip { padding: 10px 18px; min-width: 64px; flex: 1 1 0; }

  .games-create-training-btn { max-width: 400px; margin-left: auto; margin-right: auto; }
  .games-team-card__header { padding: 20px; }
  .games-team-card__emblem { width: 56px; height: 56px; font-size: 1.25rem; }

  /* Modal — centered dialog */
  .games-modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .games-modal {
    border-radius: var(--md-sys-shape-extra-large);
    max-width: 560px;
    max-height: 85vh;
  }

  .games-modal__header {
    border-radius: var(--md-sys-shape-extra-large) var(--md-sys-shape-extra-large) 0 0;
    padding: 20px 24px;
  }

  .games-modal__body { padding: 24px; }
  .games-modal__actions { padding: 16px 24px; }
  .games-detail-grid { grid-template-columns: repeat(3, 1fr); }
  .games-time-slots-grid { grid-template-columns: repeat(5, 1fr); }

  .games-filter-row { flex-wrap: wrap; gap: 10px; padding-bottom: 16px; }
  .games-filter-chip { padding: 8px 18px; font-size: 0.875rem; }
  .games-search-bar { max-width: 400px; padding: 12px 16px; }
  .games-avatar-sm { width: 36px; height: 36px; font-size: 0.75rem; }
  .games-avatar-xs { width: 30px; height: 30px; font-size: 0.625rem; }

  .games-registered-teams {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* ─── DESKTOP (1024px+) ──────────────────────────────────────────── */
@media (min-width: 1024px) {

  /* No bottom nav needed — hide it */
  .games-page ~ .md3-bottom-area {
    display: none;
  }

  .games-page {
    padding-bottom: 48px !important;
  }

  /* Hero — wider, centered */
  .games-hero {
    padding: 52px 48px 44px;
  }

  .games-hero::before { width: 320px; height: 320px; top: -80px; right: 40px; }
  .games-hero::after { width: 200px; height: 200px; bottom: -60px; left: 80px; }

  .games-hero__content {
    max-width: 960px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .games-hero__badge { padding: 6px 16px; font-size: 0.8125rem; }
  .games-hero__title { font-size: 2.5rem; margin-bottom: 8px; }
  .games-hero__subtitle { font-size: 1.0625rem; max-width: 540px; }

  .games-sports-scroll {
    padding: 14px 48px 8px;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 960px;
    margin: 0 auto;
    overflow: visible;
    background: transparent;
  }

  .games-sport-chip { padding: 10px 24px; font-size: 0.9375rem; }

  /* Stats */
  .games-stats {
    max-width: 960px;
    margin: 0 auto;
  }

  .games-stat-item { padding: 20px 16px; }
  .games-stat-item__value { font-size: 1.75rem; }
  .games-stat-item__label { font-size: 0.8125rem; margin-top: 6px; }

  /* Tabs — horizontal top bar, pill style */
  .games-tabs {
    max-width: 960px;
    padding: 24px 48px 16px;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .games-tab {
    flex-direction: row;
    gap: 8px;
    padding: 10px 24px;
    font-size: 0.875rem;
    border-radius: var(--md-sys-shape-full);
    min-width: auto;
    flex: none;
  }

  .games-tab .material-symbols-rounded { font-size: 20px; }

  /* Section — centered, wider */
  .games-section {
    max-width: 960px;
    padding: 24px 48px;
  }

  .games-section-intro { padding: 20px 24px; }

  /* Cards — 3 columns */
  .games-card-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  /* Match cards — 2 col for readability */
  .games-section:has(.games-match-card) .games-card-list,
  .games-section:has(.games-date-scroll) .games-card-list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Tournament cards */
  .games-tournament-card__body { padding: 18px; }
  .games-tournament-card__actions { padding: 10px 18px 16px; }

  /* Field cards */
  .games-field-card__visual { height: 160px; }
  .games-field-card__icon { font-size: 56px; }
  .games-field-card__body { padding: 18px; }
  .games-field-card__name { font-size: 1.0625rem; }
  .games-field-card__price-value { font-size: 1.25rem; }

  /* Match cards */
  .games-match-card { padding: 18px; }
  .games-match-team__avatar {
    width: 56px; height: 56px;
    border-radius: var(--md-sys-shape-large);
    font-size: 1.0625rem;
  }
  .games-match-team__name { font-size: 0.875rem; }
  .games-score-display__home,
  .games-score-display__away { font-size: 2rem; min-width: 32px; }
  .games-time-display__time { font-size: 1.125rem; }
  .games-date-scroll { justify-content: center; gap: 12px; flex-wrap: nowrap; }
  .games-date-chip { padding: 12px 20px; min-width: 72px; flex: 1 1 0; }
  .games-date-chip__day { font-size: 1.25rem; }

  /* Training */
  .games-create-training-btn {
    max-width: 320px;
    margin-left: 0;
    padding: 16px;
    font-size: 1rem;
  }
  .games-training-card__body { padding: 16px; }
  .games-training-card__title { font-size: 1.0625rem; }
  .games-training-card__actions { padding: 10px 16px 16px; }

  /* Team cards */
  .games-team-card__header { padding: 22px; }
  .games-team-card__emblem {
    width: 60px; height: 60px;
    font-size: 1.375rem;
    border-radius: var(--md-sys-shape-large);
  }
  .games-team-card__name { font-size: 1.0625rem; }
  .games-team-card__body { padding: 16px; }
  .games-team-stat { padding: 12px 8px; }
  .games-team-stat__value { font-size: 1.25rem; }

  /* Athletes list — 2 col */
  .games-athletes-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Podium bigger */
  .games-podium__place { max-width: 160px; }
  .games-podium__avatar { width: 56px; height: 56px; font-size: 1rem; }
  .games-podium__avatar--1st { width: 64px; height: 64px; font-size: 1.125rem; }
  .games-podium__name { font-size: 0.875rem; }
  .games-podium__bar--1st { height: 100px; }
  .games-podium__bar--2nd { height: 76px; }
  .games-podium__bar--3rd { height: 56px; }

  /* Modal */
  .games-modal { max-width: 640px; max-height: 80vh; }
  .games-modal__header { padding: 24px 28px; }
  .games-modal__title { font-size: 1.25rem; }
  .games-modal__body { padding: 28px; }
  .games-detail-item { padding: 14px; }
  .games-time-slots-grid { grid-template-columns: repeat(6, 1fr); }
  .games-filter-chip { padding: 8px 20px; }
  .games-search-bar { max-width: 360px; }
  .games-registered-teams { grid-template-columns: 1fr 1fr 1fr; }
}

/* ─── WIDE DESKTOP (1280px+) ─────────────────────────────────────── */
@media (min-width: 1280px) {

  /* Hero */
  .games-hero { padding: 60px 64px 52px; }
  .games-hero__content { max-width: 1100px; }
  .games-hero__title { font-size: 2.75rem; }
  .games-hero__subtitle { font-size: 1.125rem; max-width: 600px; }

  .games-sports-scroll {
    padding: 14px 64px 8px;
    max-width: 1100px;
  }

  /* Stats */
  .games-stats { max-width: 1100px; margin: 0 auto; }
  .games-stat-item__value { font-size: 2rem; }

  /* Tabs */
  .games-tabs {
    max-width: 1100px;
    padding: 28px 64px 18px;
  }

  .games-tab { padding: 12px 28px; font-size: 0.9375rem; }

  /* Section — wider */
  .games-section {
    max-width: 1100px;
    padding: 28px 64px;
  }

  /* Cards — 3 columns with more gap */
  .games-card-list { gap: 24px; }

  /* Tournament */
  .games-tournament-card__header { padding: 12px 18px; }
  .games-tournament-card__body { padding: 20px; }
  .games-tournament-card__title { font-size: 1.125rem; }

  /* Field cards */
  .games-field-card__visual { height: 180px; }
  .games-field-card__icon { font-size: 64px; }
  .games-field-card__body { padding: 20px; }
  .games-field-card__name { font-size: 1.125rem; }

  /* Match */
  .games-match-card { padding: 22px; }
  .games-match-team__avatar { width: 64px; height: 64px; font-size: 1.125rem; }
  .games-match-team__name { font-size: 0.9375rem; }
  .games-score-display__home,
  .games-score-display__away { font-size: 2.25rem; }

  /* Training */
  .games-training-card__body { padding: 18px; }
  .games-training-card__title { font-size: 1.125rem; }

  /* Team */
  .games-team-card__header { padding: 24px; }
  .games-team-card__emblem { width: 64px; height: 64px; font-size: 1.5rem; }
  .games-team-card__name { font-size: 1.125rem; }
  .games-team-card__body { padding: 18px; }
  .games-team-stat__value { font-size: 1.375rem; }

  /* Athletes — 3 col */
  .games-athletes-list { grid-template-columns: repeat(3, 1fr); }

  /* Modal */
  .games-modal { max-width: 720px; }
  .games-modal__body { padding: 32px; }
  .games-detail-grid { gap: 16px; }
  .games-detail-item { padding: 16px; }

  /* Avatars */
  .games-avatar-sm { width: 40px; height: 40px; font-size: 0.8125rem; }
  .games-avatar-xs { width: 32px; height: 32px; font-size: 0.6875rem; }
}

/* ─── ULTRA WIDE (1440px+) ───────────────────────────────────────── */
@media (min-width: 1440px) {

  .games-hero__content { max-width: 1200px; }

  .games-sports-scroll { padding: 14px 64px 8px; max-width: 1200px; }

  .games-stats { max-width: 1200px; }

  .games-tabs { max-width: 1200px; }
  .games-tab { padding: 12px 32px; font-size: 1rem; }

  .games-section {
    max-width: 1200px;
    padding: 32px 64px;
  }

  .games-card-list { gap: 28px; }

  .games-section:has(.games-match-card) .games-card-list,
  .games-section:has(.games-date-scroll) .games-card-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .games-plans-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* ══════════════════════════════════════════
   Subscription Plans
   ══════════════════════════════════════════ */
.games-plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.games-plan-card {
  background: var(--md-sys-color-surface-container-low, #fff);
  border-radius: 16px;
  border: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.games-plan-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.games-plan-card__header {
  padding: 20px 16px 16px;
  text-align: center;
  border-bottom: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
}
.games-plan-card__name {
  margin: 8px 0 4px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1a1a1a);
}
.games-plan-card__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin-top: 4px;
}
.games-plan-card__amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: #02A586;
}
.games-plan-card__currency {
  font-size: 1rem;
  font-weight: 600;
  color: #02A586;
}
.games-plan-card__cycle {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant, #666);
  margin-left: 2px;
}

.games-plan-card__body {
  padding: 16px;
  flex: 1;
}
.games-plan-card__desc {
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant, #666);
  margin: 0 0 12px;
  line-height: 1.5;
}
.games-plan-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.games-plan-card__features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface, #1a1a1a);
}

.games-plan-card__footer {
  padding: 12px 16px 16px;
}
.games-plan-card__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Plan group collapse */
.games-plan-group {
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--md-sys-color-outline-variant, #e0e0e0);
  background: var(--md-sys-color-surface-container-low, #fff);
}
.games-plan-group__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.games-plan-group__header:active { background: rgba(0,0,0,0.03); }
.games-plan-group__info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface, #1a1a1a);
}
.games-plan-group__info > i { font-size: 20px; color: #02A586; }
.games-plan-group__count {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant, #666);
  background: var(--md-sys-color-surface-container, #f0f0f0);
  padding: 2px 8px;
  border-radius: 10px;
}
.games-plan-group__chevron {
  font-size: 20px;
  color: var(--md-sys-color-on-surface-variant, #666);
  transition: transform 0.25s ease;
}
.games-plan-group__chevron--open { transform: rotate(180deg); }
.games-plan-group__body { padding: 0 12px 12px; }

.games-filter-chip__count {
  font-size: 0.625rem;
  font-weight: 700;
  background: rgba(0,0,0,0.08);
  color: var(--md-sys-color-on-surface-variant, #666);
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 2px;
}
.games-filter-chip--active .games-filter-chip__count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

/* ── Color picker (team creation) ── */
.games-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0;
}
.games-color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: var(--swatch-color);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  outline: none;
}
.games-color-swatch .material-symbols-rounded {
  font-size: 20px;
  font-variation-settings: 'FILL' 0, 'wght' 600;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.games-color-swatch:hover {
  transform: scale(1.12);
}
.games-color-swatch--on {
  transform: scale(1.15);
  border-color: var(--md-sys-color-on-surface, #fff);
  box-shadow: 0 0 0 2px var(--swatch-color), 0 2px 8px rgba(0,0,0,0.25);
}
.games-color-swatch--on:hover {
  transform: scale(1.18);
}
.games-color-swatch:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 3px;
}
/* Dark theme: use light border for contrast */
[data-bs-theme="dark"] .games-color-swatch--on {
  border-color: rgba(255,255,255,0.9);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-bs-theme="light"]) .games-color-swatch--on {
    border-color: rgba(255,255,255,0.9);
  }
}

.games-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--md-sys-color-on-surface, #1a1a1a);
}

.games-badge--outline {
  background: transparent;
  border: 1px solid var(--md-sys-color-outline, #ccc);
  color: var(--md-sys-color-on-surface-variant, #666);
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
