/*
Theme Name: Sports Stream
Theme URI: https://example.com/sports-stream
Author: Sports Stream
Description: A fast, lightweight WordPress theme for live sports streaming. Optimized for speed with minimal dependencies.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sports-stream
Tags: sports, streaming, video, live, dark, one-column, two-columns
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --color-bg:         #0d0d0d;
  --color-surface:    #161616;
  --color-surface2:   #1e1e1e;
  --color-border:     #2a2a2a;
  --color-accent:     #e63946;
  --color-accent2:    #ff6b35;
  --color-text:       #f0f0f0;
  --color-muted:      #888;
  --color-live:       #22c55e;
  --color-live-glow:  rgba(34,197,94,.35);
  --radius:           6px;
  --radius-lg:        10px;
  --font-sans:        system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:        ui-monospace, "Cascadia Code", monospace;
  --transition:       .18s ease;
  --header-h:         64px;
  --max-w:            1280px;
  --sidebar-w:        320px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

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

img, video, iframe { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent2); }
button { cursor: pointer; font-family: inherit; border: none; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { line-height: 1.25; font-weight: 700; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: 1.25rem; }
.text-muted { color: var(--color-muted); }
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .6rem; border-radius: 4px;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.badge-live {
  background: var(--color-live); color: #000;
  box-shadow: 0 0 8px var(--color-live-glow);
  animation: pulse-live 2s infinite;
}
.badge-upcoming { background: #2563eb; color: #fff; }
.badge-replay    { background: var(--color-surface2); color: var(--color-muted); border: 1px solid var(--color-border); }

@keyframes pulse-live {
  0%,100% { box-shadow: 0 0 6px var(--color-live-glow); }
  50%      { box-shadow: 0 0 18px var(--color-live-glow); }
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(13,13,13,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}

.site-logo {
  display: flex; align-items: center; gap: .6rem;
  color: var(--color-text) !important;
  font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em;
  white-space: nowrap;
}

.site-logo svg { flex-shrink: 0; }
.site-logo span { color: var(--color-accent); }

.primary-nav { display: flex; align-items: center; gap: .25rem; }
.primary-nav a {
  color: var(--color-muted);
  padding: .45rem .75rem;
  border-radius: var(--radius);
  font-size: .875rem; font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: var(--color-text); background: var(--color-surface2); }

.header-actions { display: flex; align-items: center; gap: .75rem; }

.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem; font-weight: 600;
  transition: opacity var(--transition), transform var(--transition);
}
.btn:hover { opacity: .85; transform: translateY(-1px); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-muted); border: 1px solid var(--color-border); }
.btn-ghost:hover { color: var(--color-text); border-color: var(--color-text); }

.nav-toggle {
  display: none;
  background: none; color: var(--color-text);
  padding: .4rem; border-radius: var(--radius);
}

/* ============================================================
   HERO / FEATURED STREAM
   ============================================================ */
.hero-stream {
  position: relative;
  background: #000;
  border-bottom: 1px solid var(--color-border);
}

.hero-stream .container {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 0;
  align-items: stretch;
  min-height: 520px;
}

.stream-player-wrap {
  position: relative;
  background: #000;
  overflow: hidden;
}

.stream-player-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: #000;
}

.stream-player-ratio iframe,
.stream-player-ratio video,
.stream-player-ratio .player-placeholder {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}

.player-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #000 70%);
  color: var(--color-muted);
  font-size: .9rem;
}

.player-placeholder svg { opacity: .3; }
.player-placeholder .play-btn {
  width: 72px; height: 72px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.player-placeholder .play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(230,57,70,.5);
}

.stream-info-bar {
  padding: .75rem 1.25rem;
  background: var(--color-surface);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
}

.stream-title { font-size: 1.05rem; font-weight: 700; flex: 1; min-width: 0; }
.stream-title a { color: var(--color-text); }

.stream-meta { display: flex; align-items: center; gap: .75rem; color: var(--color-muted); font-size: .8rem; }
.stream-meta svg { width: 14px; height: 14px; }
.viewer-count { display: flex; align-items: center; gap: .3rem; }

/* Chat Sidebar */
.chat-sidebar {
  border-left: 1px solid var(--color-border);
  display: flex; flex-direction: column;
  background: var(--color-surface);
  max-height: 580px;
}

.chat-header {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-weight: 700; font-size: .875rem;
  display: flex; align-items: center; justify-content: space-between;
}

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: .75rem;
  display: flex; flex-direction: column; gap: .5rem;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }

.chat-msg { font-size: .82rem; line-height: 1.45; }
.chat-msg .username { font-weight: 700; margin-right: .3rem; }
.chat-msg.is-system { color: var(--color-muted); font-style: italic; }

.chat-input-wrap {
  padding: .75rem;
  border-top: 1px solid var(--color-border);
  display: flex; gap: .5rem;
}

.chat-input {
  flex: 1;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  padding: .45rem .75rem;
  font-size: .85rem;
  font-family: inherit;
  transition: border-color var(--transition);
}
.chat-input::placeholder { color: var(--color-muted); }
.chat-input:focus { outline: none; border-color: var(--color-accent); }

.chat-send-btn {
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius);
  padding: .45rem .75rem;
  font-size: .85rem; font-weight: 600;
  transition: opacity var(--transition);
}
.chat-send-btn:hover { opacity: .85; }

/* ============================================================
   STREAM GRID
   ============================================================ */
.section-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.15rem; font-weight: 800;
  display: flex; align-items: center; gap: .6rem;
}

.section-title::before {
  content: '';
  display: block; width: 4px; height: 1.1em;
  background: var(--color-accent);
  border-radius: 2px;
}

.streams-section { padding: 2.5rem 0; }
.streams-section + .streams-section { padding-top: 0; }

.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.stream-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.stream-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
  box-shadow: 0 8px 32px rgba(230,57,70,.15);
}

.card-thumb {
  position: relative;
  padding-bottom: 56.25%;
  background: var(--color-surface2);
  overflow: hidden;
}

.card-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.stream-card:hover .card-thumb img { transform: scale(1.04); }

.card-thumb .thumb-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: var(--color-muted);
  font-size: 2.5rem;
}

.card-badge {
  position: absolute; top: .6rem; left: .6rem;
  z-index: 2;
}

.card-duration {
  position: absolute; bottom: .5rem; right: .6rem;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: .15rem .4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
}

.card-body { padding: .9rem; }

.card-sport {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: .3rem;
}

.card-title {
  font-size: .95rem; font-weight: 700; line-height: 1.35;
  margin-bottom: .5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-title a { color: var(--color-text); }
.card-title a:hover { color: var(--color-accent); }

.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--color-muted); font-size: .78rem;
}

.card-viewers { display: flex; align-items: center; gap: .25rem; }

/* ============================================================
   SCHEDULE TABLE
   ============================================================ */
.schedule-section { padding: 2.5rem 0; border-top: 1px solid var(--color-border); }

.schedule-tabs {
  display: flex; gap: .35rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.schedule-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  background: var(--color-surface2);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: .4rem .9rem;
  font-size: .82rem; font-weight: 600;
  transition: all var(--transition);
}
.tab-btn:hover,
.tab-btn.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.schedule-table thead th {
  text-align: left;
  padding: .6rem 1rem;
  background: var(--color-surface2);
  color: var(--color-muted);
  font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  border-bottom: 1px solid var(--color-border);
}

.schedule-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.schedule-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }

.schedule-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}
.schedule-table tbody tr:hover { background: var(--color-surface2); }
.schedule-table tbody tr.is-live { background: rgba(34,197,94,.06); }

.schedule-table tbody td { padding: .75rem 1rem; vertical-align: middle; }

.match-teams { font-weight: 700; }
.match-teams .vs { color: var(--color-muted); font-weight: 400; font-size: .8rem; margin: 0 .4rem; }

.schedule-time { font-family: var(--font-mono); font-size: .82rem; color: var(--color-muted); white-space: nowrap; }

.schedule-action .btn { padding: .3rem .8rem; font-size: .78rem; }

/* ============================================================
   SIDEBAR LAYOUT (single stream page)
   ============================================================ */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 1.5rem;
  padding: 2rem 0;
  align-items: start;
}

.main-content {}

.side-panel {
  display: flex; flex-direction: column; gap: 1.25rem;
  position: sticky; top: calc(var(--header-h) + 1rem);
}

.widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.widget-header {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: .85rem; font-weight: 700;
  display: flex; align-items: center; gap: .5rem;
}

.widget-body { padding: 1rem; }

.team-score {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem;
  background: var(--color-surface2);
  border-radius: var(--radius);
  margin-bottom: .75rem;
}

.team-block { text-align: center; flex: 1; }
.team-logo {
  width: 56px; height: 56px;
  background: var(--color-border);
  border-radius: 50%;
  margin: 0 auto .5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.team-name { font-size: .78rem; font-weight: 700; }

.score-display {
  font-size: 2rem; font-weight: 900; letter-spacing: -.03em;
  color: var(--color-text);
  padding: 0 1.5rem;
  text-align: center;
}
.score-sep { color: var(--color-muted); margin: 0 .25rem; }
.score-period { font-size: .7rem; color: var(--color-muted); text-align: center; margin-top: .25rem; }

/* Stats bar */
.stat-row {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: .5rem; align-items: center;
  margin-bottom: .6rem; font-size: .8rem;
}
.stat-bar-wrap { grid-column: 1 / -1; height: 4px; background: var(--color-border); border-radius: 2px; margin-bottom: .75rem; overflow: hidden; }
.stat-bar { height: 100%; background: var(--color-accent); border-radius: 2px; }
.stat-label { text-align: center; color: var(--color-muted); font-size: .72rem; }
.stat-val-left  { text-align: right; font-weight: 700; }
.stat-val-right { text-align: left;  font-weight: 700; }

/* ============================================================
   CATEGORY / SPORT FILTER
   ============================================================ */
.sport-filter {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.sport-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-muted);
  padding: .35rem .85rem;
  font-size: .8rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.sport-chip:hover,
.sport-chip.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-form {
  display: flex; gap: .5rem;
}

.search-input {
  flex: 1;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  padding: .6rem 1rem;
  font-size: .875rem; font-family: inherit;
  transition: border-color var(--transition);
}
.search-input::placeholder { color: var(--color-muted); }
.search-input:focus { outline: none; border-color: var(--color-accent); }

/* ============================================================
   TICKER / SCORES BAR
   ============================================================ */
.scores-ticker {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  height: 36px;
  display: flex; align-items: center;
}

.ticker-label {
  flex-shrink: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 0 .85rem;
  font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  height: 100%; display: flex; align-items: center;
}

.ticker-track {
  display: flex; align-items: center;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  gap: 0;
}

.ticker-item {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 0 2rem;
  font-size: .78rem; color: var(--color-muted);
  border-right: 1px solid var(--color-border);
}

.ticker-item strong { color: var(--color-text); }

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: 4rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

.footer-brand p { color: var(--color-muted); font-size: .875rem; margin-top: .75rem; line-height: 1.7; }

.footer-col-title {
  font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-muted); margin-bottom: .9rem;
}

.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { color: var(--color-muted); font-size: .875rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--color-text); }

.footer-bottom {
  padding-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  color: var(--color-muted); font-size: .8rem;
}

.social-links { display: flex; gap: .5rem; }
.social-link {
  width: 34px; height: 34px;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-muted);
  transition: all var(--transition);
}
.social-link:hover { color: var(--color-text); border-color: var(--color-text); background: var(--color-border); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: .35rem;
  padding: 2rem 0;
}
.page-btn {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-muted);
  font-size: .875rem; font-weight: 600;
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

/* ============================================================
   LOADING / SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface2) 25%, var(--color-border) 50%, var(--color-surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============================================================
   ALERTS / NOTICES
   ============================================================ */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1rem;
}
.alert-info    { background: rgba(37,99,235,.15); border: 1px solid rgba(37,99,235,.3); color: #93c5fd; }
.alert-success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); color: #86efac; }
.alert-warn    { background: rgba(234,179,8,.12);  border: 1px solid rgba(234,179,8,.3);  color: #fde047; }

/* ============================================================
   SINGLE STREAM POST
   ============================================================ */
.stream-embed-full {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.stream-embed-ratio {
  position: relative;
  padding-bottom: 56.25%;
}

.stream-embed-ratio iframe,
.stream-embed-ratio video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}

.stream-post-meta {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  font-size: .85rem; color: var(--color-muted);
}

.entry-content {
  font-size: .95rem; line-height: 1.8; color: var(--color-text);
}
.entry-content p  { margin-bottom: 1rem; }
.entry-content h2 { font-size: 1.25rem; margin-bottom: .75rem; margin-top: 1.5rem; }
.entry-content h3 { font-size: 1.05rem; margin-bottom: .6rem; margin-top: 1.25rem; }

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu {
  display: none;
  position: fixed; inset: 0; top: var(--header-h); z-index: 99;
  background: rgba(13,13,13,.97);
  backdrop-filter: blur(20px);
  padding: 1.5rem;
  flex-direction: column; gap: .35rem;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--color-text);
  padding: .8rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem; font-weight: 600;
  display: block;
  transition: background var(--transition);
}
.mobile-menu a:hover { background: var(--color-surface2); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  :root { --sidebar-w: 280px; }
}

@media (max-width: 900px) {
  .hero-stream .container { grid-template-columns: 1fr; min-height: auto; }
  .chat-sidebar { max-height: 340px; border-left: none; border-top: 1px solid var(--color-border); }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .side-panel { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* 5-col table (Time|Competition|Match|Status|Watch): hide Status on tablet */
  .schedule-table thead tr th:nth-child(4),
  .schedule-table tbody tr td:nth-child(4) { display: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .primary-nav, .header-actions .btn-ghost { display: none; }
  .nav-toggle  { display: flex; order: 1; }          /* hamburger → far right */
  .site-logo   { order: -1; }                        /* logo → far left */
  .header-search { order: 0; flex: 1; }              /* search → middle */
  .site-header .container { justify-content: space-between; gap: .75rem; }
  .hero-stream { display: none; } /* Hide hero on very small, show card grid */
  .stream-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .schedule-table { font-size: .8rem; }
  /* Mobile: hide Time + Competition → Match | Watch only */
  .schedule-table thead tr th:nth-child(1),
  .schedule-table tbody tr td:nth-child(1),
  .schedule-table thead tr th:nth-child(2),
  .schedule-table tbody tr td:nth-child(2) { display: none; }
}

/* ============================================================
   PARTNER LINKS BAR
   ============================================================ */
.partner-links {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: .75rem 1rem;
  margin: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem .1rem;
  line-height: 1;
}

.partner-links .nav-link2 {
  display: inline-flex;
  align-items: center;
  padding: .3rem .55rem;
  border-radius: var(--radius);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--color-muted);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.partner-links .nav-link2:hover {
  color: var(--color-text);
  background: var(--color-surface2);
}

.partner-links .text-active {
  color: var(--color-accent);
  transition: color var(--transition);
}

.partner-links .nav-link2:hover .text-active {
  color: var(--color-accent2);
}

.partner-links .sep {
  color: var(--color-border);
  font-size: .75rem;
  user-select: none;
  padding: 0 .05rem;
}

/* Header search */
.header-search form {
  display: flex;
  align-items: center;
  background: var(--color-surface2);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 0 0 transparent;
}
.header-search form:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(230,57,70,.15);
}
.header-search input[type="search"] {
  background: none;
  border: none;
  color: var(--color-text);
  padding: .4rem .75rem;
  font-size: .85rem;
  font-family: inherit;
  width: 160px;
  outline: none;
  transition: width var(--transition);
}
.header-search input[type="search"]::placeholder {
  color: var(--color-muted);
  text-shadow: 0 0 8px rgba(230,57,70,.45);
  animation: placeholder-glow 3s ease-in-out infinite;
}
@keyframes placeholder-glow {
  0%, 100% { text-shadow: 0 0 6px rgba(230,57,70,.35); }
  50%       { text-shadow: 0 0 14px rgba(230,57,70,.65); }
}
.header-search input[type="search"]:focus { width: 220px; }
.header-search button {
  background: none;
  color: var(--color-muted);
  padding: .4rem .75rem .4rem .5rem;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.header-search button:hover { color: var(--color-accent); }

@media (max-width: 640px) {
  .partner-links { gap: .25rem .05rem; padding: .6rem .75rem; }
  .partner-links .nav-link2 { font-size: .68rem; padding: .25rem .4rem; }
  .header-search input[type="search"] { width: 110px; }
  .header-search input[type="search"]:focus { width: 140px; }
}

/* ============================================================
   STREAM NAVIGATION BAR  (Stream 1 / Stream 2 / HD / Full HD)
   ============================================================ */
.stream-nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
}

.stream-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .9rem;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-muted);
  font-size: .82rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.stream-nav-btn:hover {
  background: var(--color-surface);
  border-color: var(--color-accent);
  color: var(--color-text);
}

/* Active / current stream tab */
.stream-nav-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* HD button — gold tint */
.stream-nav-btn.stream-nav-hd {
  border-color: rgba(234,179,8,.4);
  color: #eab308;
}
.stream-nav-btn.stream-nav-hd:hover {
  background: rgba(234,179,8,.12);
  border-color: #eab308;
}

/* Full HD button — cyan tint */
.stream-nav-btn.stream-nav-fullhd {
  border-color: rgba(6,182,212,.4);
  color: #06b6d4;
}
.stream-nav-btn.stream-nav-fullhd:hover {
  background: rgba(6,182,212,.1);
  border-color: #06b6d4;
}

/* ============================================================
   SCHEDULE PAGE — SPORT-GROUPED REDESIGN
   ============================================================ */

.sched-page-wrap {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

/* Page header row */
.sched-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* LIVESTREAM pill badge */
.livestream-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(230,57,70,.12);
  border: 1px solid rgba(230,57,70,.35);
  color: var(--color-accent);
  padding: .45rem 1.1rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* Pulsing green dot (reusable) */
.live-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--color-live);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-live 1.5s infinite;
}

/* ── Live Scores Widget block ─────────────────────────────── */
.lwb-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.lwb-header {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem 1.1rem;
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
}

.lwb-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--color-text);
}

.lwb-powered {
  margin-left: auto;
  font-size: .7rem;
  color: var(--color-muted);
  font-style: italic;
}

.lwb-embed iframe {
  display: block;
  width: 100%;
  border: none;
  min-height: 460px;
}

/* ── Sport-grouped schedule grid ──────────────────────────── */
.sport-sched-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Each sport section card */
.sport-sched-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--sport-color, var(--color-accent));
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Sport header bar */
.sport-sched-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1.25rem;
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
}

.sport-sched-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.sport-sched-name {
  font-size: .95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--sport-color, var(--color-text));
}

.sport-sched-count {
  margin-left: auto;
  font-size: .7rem;
  font-weight: 600;
  color: var(--color-muted);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--color-border);
  padding: .15rem .55rem;
  border-radius: 10px;
}

/* Time cell with stacked day label */
.sched-time-inner {
  display: flex;
  flex-direction: column;
  gap: .12rem;
}

.sched-time-val {
  font-family: var(--font-mono);
  font-size: .83rem;
  font-weight: 700;
  color: var(--color-text);
}

.sched-time-day {
  font-size: .65rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Match team names & live score */
.match-team-name { font-weight: 700; }

.match-live-score {
  color: var(--color-live);
  font-size: 1rem;
  padding: 0 .5rem;
  font-weight: 800;
}

/* Watch button inside schedule */
.sched-watch-btn { padding: .3rem .8rem !important; font-size: .78rem !important; }

/* Scrollable table wrapper — prevents overflow on small screens */
.sport-sched-section .schedule-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tablet: hide competition column, keep Watch button always visible */
@media (max-width: 900px) {
  .schedule-table .sched-comp-cell { display: none; }
  .schedule-table .schedule-action { display: table-cell !important; }
}

@media (max-width: 640px) {
  .sched-page-header { flex-direction: column; align-items: flex-start; }
  .sport-sched-bar   { padding: .6rem 1rem; }
  .sport-sched-name  { font-size: .82rem; }
  .lwb-embed iframe  { min-height: 340px; }
  /* Hide Time col to give match names more room — use class, not nth-child */
  .schedule-table .schedule-time { display: none; }
  /* Hide Competition col (only present on All-sports tab) — use class, not nth-child */
  .schedule-table .sched-comp-cell { display: none; }
  /* Always keep Watch button visible */
  .schedule-table .schedule-action { display: table-cell !important; }
  /* Shrink Watch button */
  .sched-watch-btn { padding: .25rem .55rem !important; font-size: .72rem !important; }
  /* Shrink team name font */
  .match-team-name { font-size: .82rem; }
  .vs { font-size: .75rem; padding: 0 .25rem; }
}

/* ── Schedule: sport tab navigation ───────────────────────── */
.sched-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--color-border);
}

.sched-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.sched-tab-btn:hover {
  background: var(--color-surface2);
  color: var(--color-text);
}
.sched-tab-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.sched-tab-icon  { font-size: .95em; }
.sched-tab-label { }
.sched-tab-count {
  background: rgba(255,255,255,.18);
  border-radius: 10px;
  padding: .05rem .45rem;
  font-size: .72rem;
  font-weight: 700;
  min-width: 1.4rem;
  text-align: center;
}
.sched-tab-btn:not(.active) .sched-tab-count {
  background: var(--color-surface2);
  color: var(--color-muted);
}

/* ── Schedule: tab panels ───────────────────────────────── */
.sched-tab-panel { display: none; }
.sched-tab-panel.active { display: block; }

/* ── Schedule: competition section ─────────────────────── */
.sched-comp-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.sched-comp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem 1.1rem;
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
}

.sched-comp-name {
  font-weight: 700;
  font-size: .875rem;
  color: var(--color-text);
}

.sched-comp-count {
  font-size: .75rem;
  color: var(--color-muted);
  flex-shrink: 0;
}

/* Competition label column in the All tab */
.sched-comp-cell { white-space: nowrap; }
.sched-inline-comp {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--color-muted);
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: .15rem .45rem;
  white-space: nowrap;
}

/* Date label above time */
.sched-date-label {
  display: block;
  font-size: .7rem;
  color: var(--color-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.2;
}
.sched-time-val {
  display: block;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--color-text);
}

/* Scrollable table inside comp section */
.sched-comp-section .schedule-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tablet: hide Status (col 4) → Time | Competition | Match | Watch */
@media (max-width: 900px) {
  .sched-comp-section .schedule-table thead tr th:nth-child(4),
  .sched-comp-section .schedule-table tbody tr td:nth-child(4) { display: none; }
}
/* Mobile: hide Time (col 1) + Competition (col 2) → Match | Watch only */
@media (max-width: 640px) {
  .sched-comp-section .schedule-table thead tr th:nth-child(1),
  .sched-comp-section .schedule-table tbody tr td:nth-child(1),
  .sched-comp-section .schedule-table thead tr th:nth-child(2),
  .sched-comp-section .schedule-table tbody tr td:nth-child(2) { display: none; }
  .sched-tab-label { display: none; }
  .sched-tab-btn   { padding: .4rem .65rem; }
}

/* ============================================================
   WORDPRESS CORE CLASSES
   ============================================================ */
.alignwide  { margin-inline: -1.25rem; }
.alignfull  { margin-inline: calc(50% - 50vw); width: 100vw; }
.wp-caption { max-width: 100%; }
.wp-caption-text { text-align: center; color: var(--color-muted); font-size: .8rem; margin-top: .35rem; }
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Related stream sidebar links */
.related-stream-link {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: .6rem .5rem;
  border-radius: 6px;
  color: var(--color-text);
  transition: background .18s ease;
  text-decoration: none;
}
.related-stream-link:hover { background: var(--color-surface2); }

/* ══════════════════════════════════════════════════════════════
   NEWS / BLOG PAGE
   ══════════════════════════════════════════════════════════════ */

.news-page { padding: 2rem 0 4rem; }

/* ── Featured hero slider ─────────────────────────────────── */
.news-featured {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 440px;
  margin-bottom: 2.5rem;
  background: var(--color-surface);
}

.news-slider-track { position: relative; height: 100%; }

.news-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .55s ease;
  pointer-events: none;
}
.news-slide.is-active { opacity: 1; pointer-events: auto; }

.news-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 8s ease;
}
.news-slide.is-active .news-slide-bg { transform: scale(1.04); }
.news-slide-bg--fallback {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.news-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.25) 55%, transparent 100%);
}

.news-slide-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.8rem 2rem;
  z-index: 2;
}

.news-sport-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 3px;
  margin-bottom: .65rem;
}

.news-slide-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 .5rem;
}
.news-slide-title a { color: #fff; text-decoration: none; }
.news-slide-title a:hover { text-decoration: underline; }

.news-slide-desc {
  font-size: .88rem;
  color: rgba(255,255,255,.78);
  margin-bottom: .65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-slide-meta {
  display: flex;
  gap: 1.2rem;
  font-size: .75rem;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.news-slider-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  z-index: 10;
}
.news-slider-btn:hover { background: rgba(0,0,0,.8); }
.news-slider-prev { left: 1rem; }
.news-slider-next { right: 1rem; }

.news-slider-dots {
  position: absolute;
  bottom: 1rem; right: 1.5rem;
  display: flex; gap: .4rem;
  z-index: 10;
}
.news-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.38);
  border: none; padding: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.news-dot.is-active {
  background: var(--color-accent);
  transform: scale(1.35);
}

/* ── Sport filter tabs ────────────────────────────────────── */
.news-tabs {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: .8rem;
  border-bottom: 2px solid var(--color-border);
}

.news-tab {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  padding: .38rem 1rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.news-tab:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.news-tab.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ── Content panels ────────────────────────────────────────── */
.news-panel { display: none; }
.news-panel.is-active { display: block; }

.news-sport-section { margin-bottom: 3rem; }

.news-sport-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: .55rem;
  border-bottom: 2px solid var(--color-accent);
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* ── Article grid ─────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

/* ── Article card ─────────────────────────────────────────── */
.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}

.news-card-img-wrap {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-border);
  text-decoration: none;
}
.news-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .news-card-img { transform: scale(1.05); }

.news-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  background: rgba(255,255,255,.04);
}

.news-card-body {
  padding: .9rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.news-card-title {
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-title a { color: var(--color-text); text-decoration: none; }
.news-card-title a:hover { color: var(--color-accent); }

.news-card-excerpt {
  font-size: .775rem;
  color: var(--color-muted);
  line-height: 1.55;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .7rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: auto;
  padding-top: .55rem;
  border-top: 1px solid var(--color-border);
}
.news-card-source { font-weight: 700; color: var(--color-accent); }

/* ── No news notice ───────────────────────────────────────── */
.news-no-api {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--color-muted);
}
.news-no-api h2 { font-size: 1.4rem; margin-bottom: .75rem; }
.news-no-api a { color: var(--color-accent); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-featured { height: 360px; }
  .news-slide-title { font-size: 1.2rem; }
}
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-featured { height: 290px; }
  .news-slide-content { padding: 1rem; }
  .news-slide-title { font-size: 1rem; }
  .news-slide-desc { display: none; }
  .news-tabs { gap: .3rem; }
  .news-tab { padding: .3rem .7rem; font-size: .75rem; }
  .news-slider-btn { width: 34px; height: 34px; font-size: 1.1rem; }
}
