/* ============================================================
   WorldTV - Global Television Platform
   css/style.css - Main Stylesheet v1.0.0
   ============================================================ */

/* --- CSS Custom Properties (Dark Theme Default) --- */
:root {
  /* Brand Colors */
  --brand-primary: #0ea5e9;
  --brand-primary-hover: #0284c7;
  --brand-primary-light: rgba(14,165,233,0.12);
  --brand-accent: #f59e0b;
  --brand-accent-hover: #d97706;
  --brand-sport: #10b981;
  --brand-sport-light: rgba(16,185,129,0.12);
  --brand-premium: #a855f7;
  --brand-premium-light: rgba(168,85,247,0.12);
  --brand-danger: #ef4444;
  --brand-danger-light: rgba(239,68,68,0.12);

  /* Surfaces - Dark */
  --bg-base: #0b0f1a;
  --bg-surface: #111827;
  --bg-elevated: #1e293b;
  --bg-card: #162032;
  --bg-card-hover: #1e2d45;
  --bg-input: #1e293b;
  --bg-overlay: rgba(0,0,0,0.65);
  --bg-skeleton: #1e293b;
  --bg-skeleton-shine: #2d3a4f;

  /* Text - Dark */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;
  --text-on-brand: #ffffff;

  /* Borders - Dark */
  --border-default: rgba(148,163,184,0.12);
  --border-strong: rgba(148,163,184,0.22);
  --border-focus: var(--brand-primary);

  /* Shadows - Dark */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.3);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Typography */
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Consolas', monospace;

  /* Sizes */
  --nav-height: 60px;
  --sidebar-width: 260px;
  --max-width: 1320px;
  --card-min: 260px;

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

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Scrollbar */
  --scrollbar-width: 6px;
  --scrollbar-track: var(--bg-surface);
  --scrollbar-thumb: var(--border-strong);
}

/* --- Light Theme --- */
[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f1f5f9;
  --bg-overlay: rgba(0,0,0,0.35);
  --bg-skeleton: #e2e8f0;
  --bg-skeleton-shine: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #f8fafc;
  --border-default: rgba(15,23,42,0.08);
  --border-strong: rgba(15,23,42,0.15);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --shadow-card: 0 1px 4px rgba(0,0,0,0.06);
  --scrollbar-track: #f1f5f9;
  --scrollbar-thumb: #cbd5e1;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition-base), color var(--transition-base);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--brand-primary-hover); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

ul, ol { list-style: none; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: var(--scrollbar-width); height: var(--scrollbar-width); }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-full); }

/* --- Main Content --- */
main {
  padding-top: var(--nav-height);
}

/* --- Utility Classes --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-brand { color: var(--brand-primary); }
.text-sport { color: var(--brand-sport); }
.text-premium { color: var(--brand-premium); }
.text-accent { color: var(--brand-accent); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.hidden { display: none !important; }

/* --- Icons --- */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--nav-height);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
}
.nav__brand-logo {
  height: 40px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}
.nav__brand-icon {
  color: var(--brand-primary);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.nav__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.nav__link:hover,
.nav__link--active {
  color: var(--text-primary);
  background: var(--brand-primary-light);
}
.nav__link--active { color: var(--brand-primary); }
.nav__link .icon { width: 18px; height: 18px; }

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.nav__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.nav__btn:hover { background: var(--brand-primary-light); }
.nav__btn .icon { width: 20px; height: 20px; }

.nav__mobile-toggle { display: none; }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-overlay);
  background: var(--bg-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100%;
  background: var(--bg-surface);
  padding: var(--space-lg);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
}
.mobile-menu.is-open .mobile-menu__panel {
  transform: translateX(0);
}
.mobile-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}
.mobile-menu__close {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.mobile-menu__close:hover { background: var(--brand-primary-light); }
.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.mobile-menu__link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.mobile-menu__link:hover,
.mobile-menu__link--active {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--brand-primary);
  color: var(--text-on-brand);
}
.btn--primary:hover { background: var(--brand-primary-hover); }
.btn--sport {
  background: var(--brand-sport);
  color: var(--text-on-brand);
}
.btn--sport:hover { background: #059669; }
.btn--premium {
  background: var(--brand-premium);
  color: var(--text-on-brand);
}
.btn--premium:hover { background: #9333ea; }
.btn--outline {
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  background: transparent;
}
.btn--outline:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}
.btn--ghost {
  color: var(--text-secondary);
  background: transparent;
}
.btn--ghost:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}
.btn--sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn--lg { padding: 0.85rem 1.6rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
}
.btn--icon-lg { width: 48px; height: 48px; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge--sport {
  background: var(--brand-sport-light);
  color: var(--brand-sport);
}
.badge--premium {
  background: var(--brand-premium-light);
  color: var(--brand-premium);
}
.badge--live {
  background: var(--brand-danger-light);
  color: var(--brand-danger);
}
.badge--demo {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}
.badge--lowdata {
  background: var(--brand-sport-light);
  color: var(--brand-sport);
}
.badge--free {
  background: rgba(16,185,129,0.12);
  color: #10b981;
}

/* --- Stream Status Badges --- */
.badge--online {
  background: rgba(16,185,129,0.15);
  color: #10b981;
}
.badge--offline {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}
.badge--timeout {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}
.badge--geo-blocked {
  background: rgba(139,92,246,0.15);
  color: #8b5cf6;
}
.badge--forbidden {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}
.badge--unstable {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}
.badge--error {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card__thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-tertiary);
}
.card__thumb-placeholder .icon {
  width: 40px;
  height: 40px;
  opacity: 0.4;
}
.card__play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.card:hover .card__play-overlay { opacity: 1; }
.card__play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: transform var(--transition-fast);
}
.card:hover .card__play-btn { transform: scale(1.08); }
.card__badges {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.card__fav {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all var(--transition-fast);
  z-index: 2;
}
.card__fav:hover { background: rgba(0,0,0,0.7); }
.card__fav--active { color: var(--brand-danger); }
.card__fav .icon { width: 16px; height: 16px; }
.card__body {
  padding: var(--space-md);
}
.card__title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}
.card__meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
}
.card__meta-item .icon { width: 13px; height: 13px; }

/* --- Channel Grid --- */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr));
  gap: var(--space-md);
}

/* --- Section --- */
.section {
  padding: var(--space-xl) 0;
}
.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  gap: var(--space-md);
}
.section__title {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.section__title .icon {
  color: var(--brand-primary);
}
.section__more {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* --- Hero Section --- */
.hero {
  padding: var(--space-3xl) 0 var(--space-xl);
  text-align: center;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 1rem;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}
.hero__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}
.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}
.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* --- Horizontal Scroll Row --- */
.scroll-row {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-sm);
  scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row > .card {
  min-width: var(--card-min);
  max-width: 320px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* --- Filter Bar --- */
.filter-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}
.filter-bar__row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar__search {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.filter-bar__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}
.filter-bar__search-icon .icon { width: 16px; height: 16px; }
.filter-bar__search input {
  width: 100%;
  padding-left: 38px;
  border-radius: var(--radius-sm);
}
.filter-bar__select {
  min-width: 140px;
}
.filter-bar__select select {
  width: 100%;
  padding: 0.6rem 2rem 0.6rem 0.85rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='2 4 6 8 10 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.filter-bar__tags {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}
.filter-tag:hover,
.filter-tag--active {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.filter-tag .icon { width: 12px; height: 12px; }

/* --- Player Page --- */
.player-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-md);
}
.player-wrapper {
  position: relative;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  margin-bottom: var(--space-lg);
}
.player-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: opacity var(--transition-base);
}
.player-controls .btn--icon {
  color: white;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
}
.player-controls .btn--icon:hover {
  background: rgba(255,255,255,0.2);
}
.player-volume {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  outline: none;
}
.player-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}
.player-quality-select {
  margin-left: auto;
  padding: 0.3rem 0.6rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}
.player-quality-select option { color: #000; background: #fff; }
.player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  color: white;
  gap: var(--space-md);
}
.player-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.player-external-notice {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-primary);
  gap: var(--space-md);
  text-align: center;
  padding: var(--space-xl);
}
.player-external-notice__icon {
  font-size: 3rem;
  line-height: 1;
}
.player-external-notice__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}
.player-external-notice__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 400px;
}

.player-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}
.player-info__left { flex: 1; min-width: 200px; }
.player-info__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.player-info__meta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.player-info__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.player-related {
  margin-top: var(--space-xl);
}

/* --- Network Status Bar --- */
.network-bar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: 0.45rem var(--space-md);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: transform var(--transition-base);
  transform: translateY(-100%);
}
.network-bar.is-visible { transform: translateY(0); }
.network-bar--offline {
  background: var(--brand-danger);
  color: white;
}
.network-bar--slow {
  background: var(--brand-accent);
  color: #000;
}
.network-bar--datasaver {
  background: var(--brand-sport);
  color: white;
}
.network-bar .icon { width: 16px; height: 16px; }

/* --- Premium Page --- */
.premium-hero {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-xl);
}
.premium-hero__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  background: var(--brand-premium-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-premium);
}
.premium-hero__icon .icon { width: 32px; height: 32px; }
.premium-hero__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}
.premium-hero__sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  max-width: 900px;
  margin: var(--space-xl) auto;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  position: relative;
  transition: all var(--transition-fast);
}
.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.pricing-card--featured {
  border-color: var(--brand-premium);
  box-shadow: 0 0 0 1px var(--brand-premium);
}
.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.9rem;
  background: var(--brand-premium);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pricing-card__name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.pricing-card__price {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: var(--space-xs);
}
.pricing-card__price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
}
.pricing-card__desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--space-lg);
}
.pricing-card__features {
  text-align: left;
  margin-bottom: var(--space-xl);
}
.pricing-card__feature {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.45rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.pricing-card__feature .icon {
  width: 16px;
  height: 16px;
  color: var(--brand-sport);
  flex-shrink: 0;
}

/* --- Settings Page --- */
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.settings-section__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.settings-section__title .icon {
  color: var(--brand-primary);
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-default);
  gap: var(--space-md);
}
.settings-row:last-child { border-bottom: none; }
.settings-row__label {
  font-weight: 500;
  font-size: 0.9rem;
}
.settings-row__desc {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__track {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: all var(--transition-fast);
}
.toggle input:checked + .toggle__track {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}
.toggle input:checked + .toggle__track::after {
  transform: translateX(22px);
  background: white;
}

/* --- Admin Panel --- */
.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin-top: var(--space-xl);
}
.admin-panel__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.admin-form__group {
  margin-bottom: var(--space-md);
}
.admin-form__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-secondary);
}
.admin-form__input {
  width: 100%;
}
.admin-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* --- Favorites & History --- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
}
.empty-state__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  color: var(--text-tertiary);
  opacity: 0.4;
}
.empty-state__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.empty-state__text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto var(--space-lg);
}

/* --- Skeleton Loading --- */
.skeleton {
  background: var(--bg-skeleton);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--bg-skeleton-shine), transparent);
  animation: skeleton-shimmer 1.5s infinite;
}
@keyframes skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skeleton--card { aspect-ratio: 16/9; border-radius: var(--radius-md); }
.skeleton--text { height: 14px; width: 70%; margin-top: 8px; }
.skeleton--text-short { height: 12px; width: 40%; margin-top: 6px; }

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
  animation: toast-in 0.3s ease;
  max-width: 360px;
}
.toast--success .icon { color: var(--brand-sport); }
.toast--error .icon { color: var(--brand-danger); }
.toast--info .icon { color: var(--brand-primary); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-default);
  padding: var(--space-xl) 0;
  margin-top: var(--space-3xl);
  text-align: center;
}
.footer__text {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}
.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}
.footer__link {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Stats Strip --- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
}
.stat-card__value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-primary);
}
.stat-card__label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 2px;
  font-weight: 500;
}

/* --- Country Cards --- */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}
.country-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.country-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
}
.country-card__flag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
}
.country-card__name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.country-card__count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* --- Sport Discipline Tags --- */
.sport-disciplines {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}
.sport-disc-tag {
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition-fast);
}
.sport-disc-tag:hover,
.sport-disc-tag--active {
  border-color: var(--brand-sport);
  color: var(--brand-sport);
  background: var(--brand-sport-light);
}

/* --- Page Header --- */
.page-header {
  padding: var(--space-xl) 0 var(--space-lg);
}
.page-header__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: var(--space-xs);
}
.page-header__desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-xl);
}
.pagination__btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all var(--transition-fast);
}
.pagination__btn:hover,
.pagination__btn--active {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

/* --- No Results --- */
.no-results {
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
  color: var(--text-tertiary);
}
.no-results .icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}
