:root {
  --ink: #111111;
  --muted: #5a6270;
  --line: rgba(17, 17, 17, 0.1);
  --card: rgba(255, 255, 255, 0.96);
  --red: #d71920;
  --blue: #1534b6;
  --green: #0b8f55;
  --gold: #d8a12a;
  --shadow: 0 24px 50px rgba(18, 26, 39, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --theme-accent: #d71920;
  --theme-secondary: #1534b6;
  --theme-surface: #ffffff;
  --theme-text: #111111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(21, 52, 182, 0.08), transparent 24%),
    radial-gradient(circle at top left, rgba(215, 25, 32, 0.08), transparent 22%),
    linear-gradient(180deg, #f8f8f5 0%, #ecece7 100%);
}

body.overlay-open {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.auth-view,
.account-panel {
  min-height: 100vh;
}

.auth-view {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card,
.filters-bar,
.spotlight-panel,
.listings-panel,
.account-card,
.mode-card,
.listing-card,
.spotlight-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(100%, 620px);
  padding: 32px;
  border-radius: var(--radius-lg);
}

.broadcast-brand {
  display: inline-flex;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.broadcast-brand.compact {
  transform: scale(0.9);
  transform-origin: left center;
}

.brand-red,
.brand-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  color: #fff;
  text-transform: uppercase;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.04em;
}

.brand-red {
  background: var(--theme-accent);
}

.brand-blue {
  background: var(--theme-secondary);
}

.eyebrow {
  margin: 12px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--blue);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  letter-spacing: -0.07em;
  font-weight: 800;
}

h2 {
  font-size: 1.4rem;
  letter-spacing: -0.05em;
}

.auth-copy,
.topbar-copy,
.listing-subcopy,
.message-box.muted,
.summary-card span,
.subscription-card span,
.meta-copy,
.channel-region,
.watermark {
  color: var(--muted);
}

.auth-copy {
  max-width: 54ch;
  margin: 14px 0 18px;
}

.stack {
  display: grid;
  gap: 12px;
}

.tab-row,
.topbar-actions,
.hero-pills,
.filters-grid,
.channel-row,
.account-header,
.account-actions {
  display: flex;
}

.tab-row,
.topbar-actions,
.hero-pills,
.account-actions {
  gap: 10px;
}

.tab-row {
  margin-bottom: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.94rem;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

button {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
}

.primary-button {
  background: var(--theme-accent);
  color: #fff;
}

.secondary-button,
.tab-button {
  background: rgba(21, 52, 182, 0.08);
  color: var(--blue);
}

.tab-button.active {
  background: var(--blue);
  color: #fff;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  color: var(--ink);
}

.toggle input {
  width: 18px;
  height: 18px;
}

.message-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(21, 52, 182, 0.04);
}

.message-box.success {
  background: rgba(11, 143, 85, 0.08);
  border-color: rgba(11, 143, 85, 0.18);
}

.message-box.error {
  background: rgba(215, 25, 32, 0.08);
  border-color: rgba(215, 25, 32, 0.18);
}

.auth-actions {
  margin-top: 14px;
}

.app-view {
  padding: 22px 0 42px;
}

.page-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.mode-banner {
  margin-bottom: 14px;
}

.filters-bar,
.spotlight-panel,
.listings-panel {
  border-radius: var(--radius-lg);
  padding: 20px;
}

.filters-grid {
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}

.filters-grid > * {
  min-width: 160px;
}

.hero-status-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}

.hero-pills {
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(21, 52, 182, 0.08);
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 700;
}

.pill.green {
  background: rgba(11, 143, 85, 0.1);
  color: var(--green);
}

.pill.gold {
  background: rgba(216, 161, 42, 0.14);
  color: #8b5f00;
}

.content-grid {
  display: grid;
  gap: 18px;
}

body.free-tier .spotlight-panel {
  display: none;
}

body.free-tier .content-grid {
  gap: 14px;
}

body.free-tier .listings-panel {
  grid-column: 1 / -1;
}

.section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.compact-heading {
  margin-bottom: 8px;
}

.mode-card,
.summary-card,
.subscription-card {
  padding: 16px;
  border-radius: var(--radius-md);
}

.mode-card {
  display: grid;
  gap: 10px;
}

.mode-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(21, 52, 182, 0.08);
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 700;
}

.mode-card strong,
.summary-card strong,
.subscription-card strong {
  display: block;
  margin-bottom: 6px;
}

.spotlight-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: var(--theme-surface);
  color: var(--theme-text);
}

.watermark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

.spotlight-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--theme-accent) 0 64%, var(--theme-secondary) 64% 100%);
  color: #fff;
}

.spotlight-banner strong {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
}

.spotlight-inner {
  position: relative;
  padding: 24px;
}

.time-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 800;
}

.spotlight-match {
  margin: 0 0 16px;
  color: var(--theme-secondary);
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.spotlight-subtitle {
  margin: 0 0 18px;
  font-size: 0.98rem;
  font-weight: 700;
}

.channel-table {
  display: grid;
  gap: 10px;
}

.channel-row {
  justify-content: flex-start;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.channel-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.channel-region {
  min-width: 120px;
  font-weight: 700;
  color: var(--ink);
}

.channel-name {
  font-weight: 800;
}

.listings-stack {
  display: grid;
  gap: 14px;
}

body.free-tier .listings-stack {
  gap: 18px;
}

.free-tier-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(21, 52, 182, 0.06);
  color: var(--theme-secondary);
  font-weight: 700;
  line-height: 1.4;
}

.free-tier-list {
  display: grid;
  gap: 18px;
}

.free-sport-group {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.free-sport-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.free-sport-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.free-sport-header strong {
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.free-sport-header span {
  color: var(--muted);
  font-size: 0.9rem;
}

.free-event-list {
  display: grid;
  gap: 10px;
}

.free-event-row {
  padding: 14px 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.free-event-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.free-event-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.free-event-time {
  margin-bottom: 4px;
  color: var(--theme-secondary);
  font-size: 0.92rem;
  font-weight: 800;
}

.free-event-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.free-event-local {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.free-event-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.free-event-channels {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.free-empty-state {
  padding: 16px;
  border-radius: 16px;
  background: rgba(21, 52, 182, 0.06);
  color: var(--theme-secondary);
  font-weight: 700;
}

.sport-section {
  display: grid;
  gap: 12px;
}

.sport-section + .sport-section {
  padding-top: 10px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.sport-header {
  padding: 14px 16px;
  border-radius: 16px;
  background: #111827;
  color: #fff;
}

.sport-header strong {
  display: block;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.sport-header span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.74);
}

.sport-body {
  display: grid;
  gap: 12px;
}

.slot-section {
  display: grid;
  gap: 10px;
}

.slot-section + .slot-section {
  padding-top: 10px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.slot-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(21, 52, 182, 0.06);
  color: var(--theme-secondary);
}

.slot-header strong {
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slot-header span {
  color: var(--muted);
  font-size: 0.9rem;
}

.sport-featured {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--theme-surface) 92%, white 8%);
  border: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--theme-text);
}

.sport-featured h3 {
  margin: 0 0 10px;
  color: var(--theme-secondary);
  font-size: 1.7rem;
  text-transform: uppercase;
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-row {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--theme-surface) 94%, white 6%);
  border: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--theme-text);
}

.compact-row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.compact-row h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.compact-time {
  color: var(--theme-secondary);
  font-weight: 800;
  white-space: nowrap;
}

.compact-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.compact-channels {
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.listing-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 20px;
}

.listing-card h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 1.5rem;
  text-transform: uppercase;
}

.listing-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.listing-time {
  font-weight: 800;
  color: var(--theme-secondary);
}

.listing-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.account-panel {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.25);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
}

.account-card {
  width: min(100%, 720px);
  max-height: calc(100vh - 48px);
  padding: 24px;
  border-radius: var(--radius-lg);
  overflow-y: auto;
}

.account-header {
  justify-content: space-between;
  align-items: flex-start;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.branding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.locked-card {
  background: rgba(21, 52, 182, 0.05);
  border: 1px dashed rgba(21, 52, 182, 0.25);
}

.feature-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.download-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.top-gap {
  margin-top: 16px;
}

@media (max-width: 860px) {
  .topbar,
  .hero-status-row,
  .time-row,
  .listing-top,
  .channel-row,
  .account-header,
  .compact-row-top,
  .slot-header {
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .branding-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100% - 18px, 1180px);
  }

  .broadcast-brand.compact {
    transform: none;
  }

  .brand-red,
  .brand-blue {
    font-size: 1.45rem;
  }

  body.free-tier .free-event-top,
  body.free-tier .free-sport-header {
    flex-direction: column;
  }

  body.free-tier .free-event-local {
    white-space: normal;
  }
}
