/* Esportes na TV Web — Theme faithful to Theme.kt (Dark & Light) */

:root,
[data-theme="dark"] {
  --bg: #09090b;
  --surface: #18181b;
  --surface-elevated: #27272a;
  --surface-hover: #2d2d32;
  --line: #2f2f35;
  --brand: #00c164;
  --brand-strong: #4ade80;
  --accent-lime: #a3e635;
  --on-brand: #052e16;
  --live-red: #ef4444;
  --youtube-red: #dc2626;
  --tv-aberta-blue: #38bdf8;
  --tv-fechada-amber: #fbbf24;
  --streaming-purple: #a855f7;
  --text-primary: #fafafa;
  --text-secondary: #e4e4e7;
  --text-muted: #a1a1aa;
  --badge-text: #f4f4f5;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-elevated: #ececef;
  --surface-hover: #e4e4e7;
  --line: #e4e4e7;
  --brand: #00a854;
  --brand-strong: #15803d;
  --accent-lime: #16a34a;
  --on-brand: #ffffff;
  --live-red: #dc2626;
  --youtube-red: #dc2626;
  --tv-aberta-blue: #0284c7;
  --tv-fechada-amber: #d97706;
  --streaming-purple: #7e22ce;
  --text-primary: #09090b;
  --text-secondary: #27272a;
  --text-muted: #71717a;
  --badge-text: #18181b;
  --shadow-sm: 0 2px 8px rgba(9, 9, 11, 0.06);
  --shadow-lg: 0 20px 50px rgba(9, 9, 11, 0.22);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Shell */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Header */
.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-accent {
  color: var(--brand);
}

.brand-subtitle {
  margin: 1px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.icon-btn:hover {
  background: var(--surface-elevated);
  border-color: var(--line);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn.is-active {
  color: var(--brand-strong);
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
}

.icon-btn.is-spinning svg {
  animation: spin 0.8s linear infinite;
}

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

/* Desktop Navigation (hidden on small screens) */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
}

.desktop-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.desktop-nav-btn:hover {
  color: var(--text-primary);
  background: var(--surface-elevated);
}

.desktop-nav-btn.active {
  color: var(--brand-strong);
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  font-weight: 700;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.nav-badge.live {
  background: var(--live-red);
  color: #fff;
}

.nav-badge.brand {
  background: var(--brand);
  color: var(--on-brand);
}

/* Search Drawer */
.search-drawer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.search-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 14px 10px;
  display: flex;
  align-items: center;
  position: relative;
}

.search-prefix-icon {
  position: absolute;
  left: 26px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 38px 10px 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.search-clear-btn {
  position: absolute;
  right: 22px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: var(--surface-elevated);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Main Content */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 12px 92px;
}

/* Mobile Bottom Nav */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}

.bottom-nav-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.bottom-nav-btn.active {
  color: var(--brand-strong);
  font-weight: 700;
}

.bottom-nav-btn.active .bottom-nav-icon-wrap {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
}

.bottom-nav-icon-wrap .nav-badge {
  position: absolute;
  top: -3px;
  right: 4px;
}

@media (min-width: 820px) {
  .desktop-nav {
    display: flex;
  }
  .bottom-nav {
    display: none;
  }
  .main-content {
    padding: 18px 20px 44px;
  }
}

/* Banners */
.offline-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 13px;
  margin-bottom: 10px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--tv-fechada-amber) 45%, transparent);
  background: color-mix(in srgb, var(--tv-fechada-amber) 14%, transparent);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

/* Control Panel (Dates + Sort) */
.control-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
}

.date-tabs-row {
  display: flex;
  gap: 6px;
  padding: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.date-tabs-row::-webkit-scrollbar {
  display: none;
}

.date-pill {
  flex: 0 0 auto;
  min-width: 74px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--surface-elevated) 70%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.date-pill:hover {
  background: var(--surface-hover);
}

.date-pill.active {
  background: color-mix(in srgb, var(--brand) 18%, transparent);
  border-color: var(--brand);
}

.date-pill-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.date-pill.active .date-pill-top {
  color: var(--brand-strong);
}

.date-pill-sub {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--live-red);
  display: inline-block;
  flex-shrink: 0;
  animation: pulseDot 1.6s ease-in-out infinite;
}

.live-dot.lg {
  width: 9px;
  height: 9px;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.panel-divider {
  height: 1px;
  background: var(--line);
}

.sort-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.segmented-control {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-elevated);
}

.segmented-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.segmented-btn.active {
  background: var(--surface);
  color: var(--brand-strong);
  font-weight: 700;
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
}

.collapse-all-btn {
  height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.collapse-all-btn:hover {
  color: var(--text-primary);
  border-color: var(--brand);
}

/* Active Channel Filter Pill */
.active-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.active-channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 50%, transparent);
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Sport Filter Chips */
.sport-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
}

.sport-chips-row::-webkit-scrollbar {
  display: none;
}

.sport-chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sport-chip:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.sport-chip.active {
  color: var(--text-primary);
  font-weight: 700;
  background: color-mix(in srgb, var(--chip-accent, var(--brand)) 22%, transparent);
  border-color: var(--chip-accent, var(--brand));
}

/* Event List / Grid */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

@media (min-width: 900px) {
  .events-list.chrono-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Event Card */
.event-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-card:hover {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-elevated));
}

.event-card.is-live {
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
  box-shadow: inset 3px 0 0 var(--brand);
}

.event-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  min-width: 0;
}

.event-sport-tag {
  font-weight: 700;
  white-space: nowrap;
}

.event-dot-sep {
  color: var(--text-muted);
}

.event-competition {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.event-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-time-col {
  width: 50px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1px;
}

.time-main {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.time-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.status-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 800;
  color: var(--live-red);
  text-transform: uppercase;
}

.status-fin-pill {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
}

.status-fin-pill.has-score {
  color: var(--brand-strong);
}

.event-teams-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.event-single-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-name.winner {
  color: var(--text-primary);
  font-weight: 800;
}

.team-badge-flag {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.team-badge-crest {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.94);
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.team-badge-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team-badge-athlete {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-elevated);
  overflow: hidden;
  flex-shrink: 0;
}

.team-badge-athlete img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.team-badge-mono {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 800;
  flex-shrink: 0;
}

.team-badge-lg.team-badge-flag,
.team-badge-lg.team-badge-crest,
.team-badge-lg.team-badge-mono {
  width: 28px;
  height: 28px;
  font-size: 16px;
}

.team-badge-lg.team-badge-athlete {
  width: 30px;
  height: 30px;
}

.score-box {
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.score-box.live {
  background: color-mix(in srgb, var(--live-red) 18%, transparent);
  color: var(--live-red);
}

.score-box.winner {
  background: color-mix(in srgb, var(--brand) 20%, transparent);
  color: var(--brand-strong);
}

.alert-bell-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.alert-bell-btn:hover {
  background: var(--surface-elevated);
  color: var(--text-primary);
}

.alert-bell-btn.active {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
}

/* Channel Badges */
.channel-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--badge-text);
  border: 1px solid color-mix(in srgb, var(--badge-accent) 38%, transparent);
  background: color-mix(in srgb, var(--badge-accent) 14%, transparent);
  max-width: 100%;
  transition: filter 0.15s ease;
}

a.channel-badge:hover {
  filter: brightness(1.15);
}

.channel-badge-icon {
  color: var(--badge-accent);
  display: inline-flex;
  align-items: center;
}

.channel-badge.type-TV_ABERTA { --badge-accent: var(--tv-aberta-blue); }
.channel-badge.type-TV_FECHADA { --badge-accent: var(--tv-fechada-amber); }
.channel-badge.type-YOUTUBE { --badge-accent: var(--youtube-red); }
.channel-badge.type-STREAMING { --badge-accent: var(--streaming-purple); }

/* Group Headers (Esporte / Liga mode) */
.group-block {
  margin-bottom: 14px;
}

.group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  cursor: pointer;
  border-radius: 10px;
  user-select: none;
}

.group-header:hover {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.group-emoji-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.group-title-col {
  flex: 1;
  min-width: 0;
}

.group-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
}

.group-live-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.group-pin-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.group-pin-btn.pinned {
  color: var(--brand);
}

/* Section Headers & Cards (Esportes, Ao Vivo, Alertas, Canais) */
.screen-header {
  margin-bottom: 14px;
}

.screen-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.screen-desc {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.card-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.card-panel.highlight-brand {
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
}

.master-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Custom Switch & Checkbox */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: 999px;
  background: var(--text-muted);
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch input:checked + .switch-slider {
  background: var(--brand);
  border-color: var(--brand);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
  background: var(--on-brand);
}

.custom-checkbox {
  width: 19px;
  height: 19px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}

/* Sports Grid */
.sports-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

@media (min-width: 640px) {
  .sports-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .sports-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.sport-dir-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.sport-dir-card:hover {
  transform: translateY(-1px);
}

.sport-dir-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sport-dir-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sport-dir-pill {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-elevated);
  color: var(--text-muted);
}

.sport-dir-pill.active {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--brand-strong);
}

/* Live & Social Screen */
.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 10px;
}

.section-heading-row:first-child {
  margin-top: 2px;
}

.section-heading-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-heading-title {
  margin: 0;
  font-size: 17.5px;
  font-weight: 800;
}

.section-heading-sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

.yt-badge-sq {
  width: 26px;
  height: 22px;
  border-radius: 6px;
  background: var(--youtube-red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.social-post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-post-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.social-post-text {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: pre-line;
}

.social-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.social-thumb {
  width: 210px;
  aspect-ratio: 0.78;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-elevated);
  cursor: zoom-in;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

/* Chips & Buttons */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chip {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.choice-chip.active {
  background: color-mix(in srgb, var(--brand) 20%, transparent);
  border-color: var(--brand);
  color: var(--brand-strong);
  font-weight: 700;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--surface-elevated);
}

.btn-danger-outline {
  border-color: color-mix(in srgb, var(--live-red) 55%, transparent);
  color: var(--live-red);
}

.btn-youtube {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 8px;
  border: none;
  background: var(--youtube-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Alerts List */
.alert-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.alert-item-emoji {
  font-size: 24px;
  flex-shrink: 0;
}

.alert-item-body {
  flex: 1;
  min-width: 0;
}

.alert-item-title {
  font-size: 13.5px;
  font-weight: 700;
}

.alert-item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.alert-item-channels {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-strong);
  margin-top: 3px;
}

/* Channels Directory */
.channel-cat-header {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 8px;
}

.channel-cat-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

@media (min-width: 700px) {
  .channel-cat-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.channel-row-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.channel-row-card:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}

.channel-row-info {
  flex: 1;
  min-width: 0;
}

.channel-row-name {
  font-size: 14px;
  font-weight: 700;
}

.channel-row-count {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Empty & Loading States */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-state-icon {
  font-size: 40px;
}

.empty-state-title {
  font-size: 15.5px;
  font-weight: 700;
}

.empty-state-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 380px;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2.5px solid var(--line);
  border-top-color: var(--brand);
  animation: spin 0.75s linear infinite;
}

/* Detail Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

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

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.modal-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 18px 20px 28px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 640px) {
  .modal-sheet {
    border-radius: 18px;
  }
}

.modal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-sport-pill {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  color: var(--text-primary);
  cursor: pointer;
}

.detail-score-card {
  background: var(--surface-elevated);
  border: 1px solid color-mix(in srgb, var(--brand) 42%, transparent);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.detail-score-card.is-live {
  border-color: color-mix(in srgb, var(--live-red) 50%, transparent);
}

.detail-score-status {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--brand-strong);
}

.detail-score-card.is-live .detail-score-status {
  color: var(--live-red);
}

.detail-side-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-side-name {
  flex: 1;
  font-size: 17px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-section-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
}

.detail-channel-row {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

/* Football Key Events & Standings */
.key-events-box {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
}

.key-event-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}

.key-event-row:first-child {
  border-top: none;
}

.key-event-min {
  width: 38px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
}

.red-card-icon {
  width: 10px;
  height: 14px;
  border-radius: 2px;
  background: var(--live-red);
  display: inline-block;
}

.standings-table-wrap {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.standings-table th {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  padding: 7px 8px;
  text-align: left;
}

.standings-table td {
  padding: 6px 8px;
  border-top: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}

.standings-table th.num,
.standings-table td.num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.standings-table tr.highlighted {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
}

.standings-table tr.highlighted td.pos,
.standings-table tr.highlighted td.team {
  color: var(--brand-strong);
  font-weight: 800;
}

/* Lightbox */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}

.lightbox-backdrop img {
  max-width: 100%;
  max-height: 92dvh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* Toasts */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 440px);
  pointer-events: none;
}

@media (min-width: 820px) {
  .toast-stack {
    bottom: 24px;
  }
}

.toast-item {
  pointer-events: auto;
  background: var(--surface-elevated);
  border: 1px solid color-mix(in srgb, var(--brand) 50%, var(--line));
  color: var(--text-primary);
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: toastIn 0.2s ease;
}

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