/* ── Sports Page — variable bridge ───────────────── */
:root {
  --primary:      var(--bg);
  --secondary:    var(--bg-2);
  --surface:      var(--bg-3);
  --card-bg:      var(--bg-card);
  --glass-border: rgba(255,255,255,.07);
  --text-secondary: var(--text-2);
  --accent-glow:  rgba(229,9,20,.45);
  --radius-sm:    6px;
}

/* ── Sports Page ──────────────────────────────────── */

body { background: var(--bg); color: var(--text); }

/* ── News Ticker ──────────────────────────────────── */
.news-ticker {
    background: var(--accent);
    color: white;
    height: 36px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
}

.ticker-label {
    background: rgba(0,0,0,0.25);
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
}

.ticker-inner {
    display: inline-flex;
    align-items: center;
    gap: 60px;
    animation: tickerScroll 40s linear infinite;
    padding-left: 100%;
}

.ticker-inner:hover { animation-play-state: paused; }

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
    white-space: nowrap;
}

.ticker-sep {
    color: rgba(255,255,255,0.4);
    font-size: 10px;
}

/* ── Header offset for ticker ─────────────────────── */
header {
    top: 36px !important;
}

/* ── Hamburger ────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.hamburger:hover { background: var(--glass); }

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Nav ───────────────────────────────────── */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1050;
    backdrop-filter: blur(8px);
}

.mobile-nav-overlay.open { display: flex; }

.mobile-nav {
    background: var(--surface);
    border-right: 1px solid var(--border);
    width: 280px;
    padding: 80px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.mobile-nav-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mobile-nav-close:hover { background: var(--accent); border-color: var(--accent); }

.mobile-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.mobile-nav-link i { width: 20px; text-align: center; color: var(--text-muted); }
.mobile-nav-link:hover { background: var(--glass); color: var(--text); }
.mobile-nav-link.active { background: rgba(229,9,20,0.12); color: var(--accent); }
.mobile-nav-link.active i { color: var(--accent); }

/* ── Sports Hero ──────────────────────────────────── */
.sports-hero {
    background:
        linear-gradient(to bottom, transparent 0%, var(--primary) 100%),
        radial-gradient(ellipse at 70% 50%, rgba(229,9,20,0.18) 0%, transparent 65%),
        var(--primary);
    padding: 130px 0 40px;
    position: relative;
    overflow: hidden;
}

.sports-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><defs><pattern id="g" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="60" height="60" fill="url(%23g)"/></svg>');
    pointer-events: none;
}

.sports-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.sports-hero-text { flex: 1; }

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(229,9,20,0.15);
    border: 1px solid rgba(229,9,20,0.3);
    color: var(--accent);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.sports-hero-text h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.sports-hero-text h1 .accent { color: var(--accent); }

.sports-hero-text p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
}

.hero-stats { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: default;
}

.hero-stat i { color: var(--accent); }
.hero-stat:hover { background: rgba(229,9,20,0.08); border-color: rgba(229,9,20,0.2); }

.sports-hero-badge {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(229,9,20,0.15) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sports-hero-badge i {
    font-size: 80px;
    color: var(--accent);
    filter: drop-shadow(0 0 30px var(--accent-glow));
    animation: trophyFloat 3s ease-in-out infinite;
}

@keyframes trophyFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* ── Sport Category Tabs ──────────────────────────── */
.sports-tabs-wrapper {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 96px;
    z-index: 100;
}

.sports-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
}

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

.sports-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    font-family: inherit;
    min-width: 90px;
    position: relative;
}

.sports-tab i { font-size: 20px; margin-bottom: 2px; }
.sports-tab span { font-size: 13px; font-weight: 700; }
.sports-tab small { font-size: 10px; color: var(--text-muted); font-weight: 400; }

.sports-tab:hover {
    background: var(--glass);
    color: var(--text);
    border-color: var(--glass-border);
}

.sports-tab.active {
    background: rgba(229,9,20,0.12);
    color: var(--accent);
    border-color: rgba(229,9,20,0.25);
}

.sports-tab.active i { filter: drop-shadow(0 0 6px var(--accent-glow)); }

/* ── Sections ─────────────────────────────────────── */
.sports-section {
    margin: 36px 0;
}

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

.watch-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--accent);
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    white-space: nowrap;
}

.watch-all-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.news-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(229,9,20,0.08);
    border: 1px solid rgba(229,9,20,0.2);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Score Cards ──────────────────────────────────── */
.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.score-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    transition: all 0.25s;
    cursor: pointer;
    animation: fadeUp 0.4s ease both;
}

.score-card:hover {
    border-color: rgba(229,9,20,0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.score-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.score-league {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.score-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.score-status.live {
    background: rgba(229,9,20,0.15);
    color: var(--accent);
    border: 1px solid rgba(229,9,20,0.3);
}

.score-status.live::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: livePulse 1.4s infinite;
}

.score-status.scheduled {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.score-status.final {
    background: rgba(46,204,113,0.1);
    color: #2ecc71;
    border: 1px solid rgba(46,204,113,0.2);
}

.score-teams {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.score-team-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--glass);
    flex-shrink: 0;
}

.team-logo-placeholder {
    width: 32px;
    height: 32px;
    background: var(--glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

.team-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    min-width: 28px;
    text-align: right;
}

.score-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.score-time {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
}

.score-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.watch-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.watch-btn-sm:hover { background: var(--accent-hover); transform: scale(1.05); }

/* ── Skeleton Loaders ─────────────────────────────── */
.score-skeleton {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    height: 140px;
    overflow: hidden;
    position: relative;
}

.score-skeleton::after, .news-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}

.news-skeleton {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    height: 300px;
    overflow: hidden;
    position: relative;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ── News Grid ────────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    animation: fadeUp 0.4s ease both;
    text-decoration: none;
    display: block;
    color: var(--text);
}

.news-card:hover {
    border-color: rgba(229,9,20,0.3);
    transform: translateY(-5px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.5);
}

.news-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: var(--card-bg);
    transition: transform 0.4s;
}

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

.news-card-img-wrap {
    overflow: hidden;
    height: 180px;
    background: var(--card-bg);
    position: relative;
}

.news-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent);
}

.news-card-body { padding: 16px; }

.news-card-tag {
    display: inline-block;
    background: rgba(229,9,20,0.12);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.news-card-headline {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-card-meta i { color: var(--accent); font-size: 10px; }

/* ── Live Stream ──────────────────────────────────── */
.stream-sport-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.stream-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s;
    font-family: inherit;
}

.stream-tab:hover { color: var(--text); background: rgba(255,255,255,0.07); }

.stream-tab.active {
    background: rgba(229,9,20,0.12);
    color: var(--accent);
    border-color: rgba(229,9,20,0.25);
}

.embed-container {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.embed-wrapper {
    position: relative;
    height: 70vh;
    min-height: 500px;
    background: #000;
}

#aisports-frame { width: 100%; height: 100%; border: none; display: block; }

.embed-overlay {
    position: absolute;
    inset: 0;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.4s;
}

.embed-overlay.hidden { opacity: 0; pointer-events: none; }

.embed-loader { text-align: center; }

.loader-ring {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(229,9,20,0.15);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 16px;
}

.embed-loader p { color: var(--text-secondary); font-size: 15px; }

.stream-info-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    font-size: 13px;
    color: var(--text-secondary);
}

.stream-info-bar i { color: var(--accent); }

.stream-controls { display: flex; gap: 8px; }

.ctrl-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ctrl-btn:hover { background: var(--accent); border-color: var(--accent); }

/* ── Toast ────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    color: var(--text);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    animation: toastIn 0.3s ease;
    max-width: 320px;
}

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

/* ── Footer ───────────────────────────────────────── */
footer {
    background: var(--secondary);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
    margin-top: 40px;
}

/* ── Embed fullscreen ─────────────────────────────── */
.embed-wrapper.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
}

/* ── Fade-up ──────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .sports-hero { padding: 110px 0 30px; }
    .sports-hero-badge { display: none; }
    .sports-tabs-wrapper { top: 90px; }
    .scores-grid, .news-grid { grid-template-columns: 1fr; }
    .embed-wrapper { height: 55vh; min-height: 380px; }
    .hamburger { display: flex; }
    header .nav-links { display: none; }
    .sports-hero-text h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .sports-tab span { font-size: 12px; }
    .sports-tab { min-width: 75px; padding: 10px 12px; }
    .hero-stats { gap: 8px; }
    .hero-stat span { display: none; }
}
