/* =========================================================
   WC26 — ESPN-inspired Stylesheet
   ========================================================= */

:root {
    --espn-red: #D50032;
    --espn-red-dark: #A8001F;
    --espn-black: #2F2F2F;
    --espn-text: #222;
    --espn-text-dim: #666;
    --espn-border: #E1E1E1;
    --espn-bg: #F5F5F5;
    --espn-card: #FFFFFF;
    --espn-accent: #B2B2B2;
    --espn-gold: #FFB400;
    --espn-live: #D50032;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --container: 1200px;
}

[data-theme="dark"] {
    --espn-text: #E6E6E6;
    --espn-text-dim: #9A9A9A;
    --espn-border: #2A2A2A;
    --espn-bg: #0E0E0E;
    --espn-card: #1A1A1A;
    --espn-accent: #555;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--espn-bg);
    color: var(--espn-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--espn-red);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 56px;
}

.brand {
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-mark {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 26px;
    letter-spacing: -0.02em;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
}

.header-center {
    flex: 1;
    max-width: 440px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 0 10px;
    height: 34px;
    transition: background 0.15s;
}

.search-bar:focus-within {
    background: rgba(255, 255, 255, 0.25);
}

.search-icon {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.85);
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font-size: 13px;
    margin-left: 8px;
    height: 100%;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.header-nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 6px 10px;
    border-radius: 3px;
    transition: background 0.15s;
}

.nav-link:hover { background: rgba(255, 255, 255, 0.12); }
.nav-link.active { background: rgba(0, 0, 0, 0.2); }

/* ---------- Now playing bar ---------- */
.now-playing-bar {
    background: var(--espn-black);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 8px 0;
    display: flex;
    gap: 12px;
    align-items: center;
    padding-left: 16px;
    padding-right: 16px;
}

[data-theme="dark"] .now-playing-bar { background: #000; }

.np-label {
    color: var(--espn-red);
    font-weight: 800;
}

.np-match {
    color: #fff;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    overflow: hidden;
    text-overflow: clip;
    flex: 1;
    min-width: 0;
    position: relative;
}

.np-match__inner {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: np-marquee 20s linear infinite;
    will-change: transform;
}

.np-match__inner:hover {
    animation-play-state: paused;
}

@keyframes np-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ---------- Section titles ---------- */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--espn-text);
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--espn-red);
}

/* ---------- Player section ---------- */
.player-section {
    padding: 16px 0 8px;
}

.player-wrapper {
    position: relative;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--espn-border);
}

#playerEl {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.player-poster.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.55) 0%, rgba(45, 10, 15, 0.60) 100%);
    text-align: center;
    padding: 24px;
    transition: opacity 0.35s ease;
}

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

/* Splash / loading state */
.splash {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: opacity 0.4s ease;
}

.splash.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--espn-red);
    border-radius: 50%;
    animation: splash-spin 0.9s linear infinite;
}

@keyframes splash-spin {
    to { transform: rotate(360deg); }
}

/* Hide overlay-content while splash is showing */
.player-overlay.is-splash .overlay-content {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.player-overlay.is-splash .overlay-content.is-revealed {
    opacity: 1;
}

.overlay-content { max-width: 720px; }

.overlay-eyebrow {
    color: var(--espn-red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3em;
    margin: 0 0 12px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.overlay-eyebrow::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--espn-red);
    border-radius: 50%;
    animation: eyebrow-pulse 1s infinite;
}

@keyframes eyebrow-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.overlay-title {
    font-size: clamp(15px, 2.4vw, 22px);
    margin: 0 0 8px;
    line-height: 1.25;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.overlay-subtitle {
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 20px;
    font-size: 14px;
}

.overlay-continue {
    display: block;
    margin: 0 auto;
    background: var(--espn-red);
    color: #fff;
    border: 0;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
}

.overlay-continue:hover {
    background: var(--espn-red-dark);
    transform: translateY(-1px);
}

.overlay-continue:active {
    transform: translateY(0);
}

.overlay-continue.is-hidden {
    display: none;
}

.stream-connecting {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ---------- Ad slot (centered 320x50) ---------- */
.ad-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 16px auto 8px;
    width: 320px;
    max-width: 100%;
}

.ad-slot__inner {
    width: 320px;
    height: 50px;
    background: var(--espn-card);
    border: 1px dashed var(--espn-border);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--espn-text-dim);
    letter-spacing: 0.1em;
}

/* Desktop variant: 468x60 shown, mobile hidden */
.ad-slot--mobile { display: none; }
@media (min-width: 1024px) {
    .ad-slot--mobile { display: none; }
    .ad-slot--desktop { display: flex; }
}
@media (max-width: 1023.98px) {
    .ad-slot--desktop { display: none; }
    .ad-slot--mobile { display: flex; }
}

/* ---------- Schedule list (grouped) ---------- */
.schedule-row {
    display: grid;
    grid-template-columns: 80px 1fr 1.4fr 70px;
    gap: 14px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--espn-border);
    align-items: center;
    font-size: 13px;
    transition: background 0.12s;
}

.schedule-row:last-child { border-bottom: none; }
.schedule-row:hover { background: rgba(213, 0, 50, 0.03); }

.schedule-date {
    color: var(--espn-text-dim);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.schedule-fixture {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.schedule-fixture .flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    background: #f0f0f0;
    flex-shrink: 0;
}

[data-theme="dark"] .schedule-fixture .flag {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.schedule-venue {
    color: var(--espn-text-dim);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-kickoff {
    color: var(--espn-red);
    font-weight: 800;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: auto;
    padding: 28px 0 18px;
    background: var(--espn-black);
    color: #fff;
    font-size: 12px;
}

[data-theme="dark"] .site-footer {
    background: #000;
    border-top: 1px solid var(--espn-border);
}

/* Social icons — top, centered */
.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 14px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.footer-social a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Bottom row: list left, copyright right */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Inline legal list (DMCA · Privacy · Contact) */
.footer-list {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-list a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.15s;
}

.footer-list a:hover {
    color: #fff;
}

/* Copyright */
.footer-copyright {
    margin: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .footer-list {
        justify-content: center;
    }
}

/* ---------- Legal / static pages ---------- */
.legal-page {
    max-width: 760px;
    padding-top: 16px;
    padding-bottom: 48px;
    background: var(--espn-card);
    margin-top: 16px;
    border: 1px solid var(--espn-border);
    border-radius: 4px;
    padding: 32px 36px;
    box-shadow: var(--shadow-sm);
}

.legal-title {
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 4px;
    border-top: 3px solid var(--espn-red);
    padding-top: 12px;
    color: var(--espn-text);
}

.legal-updated {
    font-size: 11px;
    color: var(--espn-text-dim);
    margin: 0 0 20px;
    font-weight: 600;
}

.legal-page h2 {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 24px 0 8px;
    color: var(--espn-text);
}

.legal-page p,
.legal-page li {
    font-size: 14px;
    line-height: 1.6;
    color: var(--espn-text);
}

.legal-page ul {
    margin: 8px 0 16px;
    padding-left: 22px;
}

.legal-page li { margin-bottom: 4px; }

.legal-page a {
    color: var(--espn-red);
    text-decoration: none;
    font-weight: 600;
}

.legal-page a:hover { text-decoration: underline; }

.legal-foot {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--espn-border);
    font-size: 12px;
    color: var(--espn-text-dim);
}

/* ---------- Contact form ---------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.contact-form textarea {
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--espn-text);
    padding: 10px 12px;
    border: 1px solid var(--espn-border);
    border-radius: 4px;
    background: var(--espn-bg);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.contact-form textarea:focus {
    border-color: var(--espn-red);
    box-shadow: 0 0 0 3px rgba(213, 0, 50, 0.12);
}

.contact-status {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
}

.contact-status.is-success { color: #1B7F3A; }
.contact-status.is-error   { color: var(--espn-red); }

.contact-list {
    list-style: none;
    padding-left: 0;
}

.contact-list li { margin-bottom: 4px; }

/* ---------- Empty state ---------- */
.empty-state {
    padding: 32px 16px;
    text-align: center;
    color: var(--espn-text-dim);
    font-size: 13px;
    background: var(--espn-card);
    border: 1px solid var(--espn-border);
    border-radius: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .schedule-row {
        grid-template-columns: 70px 1fr 60px;
        gap: 10px;
    }
    .schedule-venue { display: none; }
    .overlay-title { font-size: 18px; line-height: 1.2; }
    .overlay-eyebrow { font-size: 11px; letter-spacing: 0.25em; }
    .overlay-subtitle { font-size: 12px; }
    .overlay-continue { padding: 10px 22px; font-size: 12px; }
}

@media (max-width: 640px) {
    .header-center { display: none; }
    .header-nav { gap: 0; }
    .nav-link { padding: 6px 8px; font-size: 10px; }
    .brand-mark { font-size: 22px; }
    .now-playing-bar { font-size: 11px; padding: 6px 12px; }
    .np-match { font-size: 11px; }
    .section-title { font-size: 11px; }
    .schedule-row {
        grid-template-columns: 1fr 60px;
        gap: 6px;
    }
    .schedule-date { display: none; }
    .schedule-fixture { font-size: 12px; }
    .schedule-fixture .flag { width: 18px; height: 13px; }
    .overlay-title { font-size: 14px; line-height: 1.2; letter-spacing: 0; }
    .overlay-eyebrow { font-size: 9px; letter-spacing: 0.2em; margin-bottom: 8px; }
    .overlay-eyebrow::before { width: 6px; height: 6px; }
    .overlay-subtitle { font-size: 11px; margin-bottom: 14px; }
    .overlay-continue { padding: 8px 18px; font-size: 11px; letter-spacing: 0.1em; }
    .player-overlay { padding: 16px; }
}

/* ---------- Login button (header) ---------- */
.login-btn {
    background: rgba(0, 0, 0, 0.25);
    margin-left: 6px;
}

.login-btn:hover { background: rgba(0, 0, 0, 0.4); }

/* ---------- Login popup ---------- */
.login-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: inherit;
}

.login-popup[hidden] { display: none; }

.login-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 12, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: lpFadeIn 0.2s ease;
}

.login-popup__dialog {
    position: relative;
    background: var(--espn-card);
    color: var(--espn-text);
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    padding: 32px 28px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--espn-border);
    animation: lpPopIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.login-popup__dialog::-webkit-scrollbar { width: 6px; }
.login-popup__dialog::-webkit-scrollbar-thumb { background: var(--espn-border); border-radius: 3px; }

@keyframes lpFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lpPopIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: 0;
    color: var(--espn-text-dim);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.login-popup__close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--espn-text);
    transform: rotate(90deg);
}

.login-popup__brand {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.login-popup__brand-mark {
    font-weight: 900;
    font-style: italic;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--espn-red);
    text-transform: uppercase;
    line-height: 1;
    padding: 4px 10px;
    border-top: 2px solid var(--espn-red);
    border-bottom: 2px solid var(--espn-red);
}

.login-popup__title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: var(--espn-text);
    text-align: center;
    letter-spacing: -0.01em;
}

.login-popup__subtitle {
    margin: 0 0 22px;
    font-size: 13px;
    color: var(--espn-text-dim);
    text-align: center;
    line-height: 1.5;
}

/* Social login */
.login-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.login-social__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 12px 16px;
    background: #ffffff;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.login-social__btn:hover {
    background: #f7f8f8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.login-social__btn:active { transform: scale(0.98); }

.login-social__btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 18px;
    color: var(--espn-text-dim);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--espn-border);
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--espn-text-dim);
}

.login-field__wrap {
    position: relative;
    display: flex;
}

.login-field input {
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    color: var(--espn-text);
    padding: 11px 14px;
    border: 1px solid var(--espn-border);
    border-radius: 6px;
    background: var(--espn-bg);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    font-family: inherit;
}

.login-field__wrap input { padding-right: 40px; }

.login-field input:hover { border-color: var(--espn-text-dim); }

.login-field input:focus {
    border-color: var(--espn-red);
    background: var(--espn-card);
    box-shadow: 0 0 0 3px rgba(213, 0, 50, 0.12);
}

.login-field input::placeholder { color: var(--espn-text-dim); opacity: 0.7; }

.login-field__toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--espn-text-dim);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.login-field__toggle:hover {
    color: var(--espn-text);
    background: rgba(0, 0, 0, 0.05);
}

.login-field__eye { width: 18px; height: 18px; }

.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -4px;
    flex-wrap: wrap;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--espn-text-dim);
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.login-remember input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--espn-red);
    cursor: pointer;
    margin: 0;
}

.login-remember:hover { color: var(--espn-text); }

.login-link {
    color: var(--espn-red);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: opacity 0.15s;
}

.login-link:hover { opacity: 0.75; text-decoration: underline; }

.login-submit {
    margin-top: 6px;
    background: var(--espn-red);
    color: #fff;
    border: 0;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(213, 0, 50, 0.2);
}

.login-submit:hover {
    background: var(--espn-red-dark);
    box-shadow: 0 4px 12px rgba(213, 0, 50, 0.3);
}

.login-submit:active { transform: translateY(1px); }
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.login-error {
    margin: -4px 0 0;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--espn-red);
    font-weight: 500;
    background: rgba(213, 0, 50, 0.08);
    border: 1px solid rgba(213, 0, 50, 0.2);
    border-radius: 4px;
    animation: lpShake 0.3s ease;
}

@keyframes lpShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.login-popup__footer {
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--espn-border);
    text-align: center;
    font-size: 12px;
    color: var(--espn-text-dim);
}

.login-popup__footer a {
    color: var(--espn-red);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.15s;
}

.login-popup__footer a:hover { opacity: 0.75; text-decoration: underline; }

/* Focus styles for accessibility */
.login-popup *:focus-visible {
    outline: 2px solid var(--espn-red);
    outline-offset: 2px;
}

.login-popup input:focus-visible { outline: none; }

/* Mobile */
@media (max-width: 480px) {
    .login-popup { padding: 12px; }
    .login-popup__dialog {
        padding: 26px 20px 20px;
        max-width: 100%;
        border-radius: 12px;
    }
    .login-popup__title { font-size: 20px; }
    .login-social__btn { max-width: 100%; }
}

@media (max-width: 360px) {
    .login-popup__title { font-size: 18px; }
    .login-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- Player + chat row ---------- */
.player-chat-row {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
    padding: 16px 0 8px;
}

.player-chat-row .player-section {
    padding: 0;
}

/* ---------- Player actions (like / dislike / share) ---------- */
.player-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0 0;
    position: relative;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--espn-card);
    color: var(--espn-text);
    border: 1px solid var(--espn-border);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
    user-select: none;
}

.action-btn:hover {
    background: var(--espn-bg);
    border-color: var(--espn-text-dim);
}

.action-btn:active {
    transform: scale(0.96);
}

.action-btn:focus-visible {
    outline: 2px solid var(--espn-red);
    outline-offset: 2px;
}

.action-btn svg {
    display: block;
    flex-shrink: 0;
    transition: transform 0.15s, color 0.15s;
}

.action-btn__label {
    line-height: 1;
}

.action-btn__count {
    background: var(--espn-bg);
    color: var(--espn-text-dim);
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    transition: background 0.15s, color 0.15s;
}

/* Like — active state */
.action-btn--like[aria-pressed="true"] {
    background: rgba(213, 0, 50, 0.08);
    border-color: var(--espn-red);
    color: var(--espn-red);
}
.action-btn--like[aria-pressed="true"] .action-btn__count {
    background: var(--espn-red);
    color: #fff;
}
.action-btn--like[aria-pressed="true"] svg {
    color: var(--espn-red);
    transform: scale(1.1);
}

/* Dislike — active state */
.action-btn--dislike[aria-pressed="true"] {
    background: rgba(80, 80, 80, 0.08);
    border-color: var(--espn-text);
    color: var(--espn-text);
}
.action-btn--dislike[aria-pressed="true"] .action-btn__count {
    background: var(--espn-text);
    color: var(--espn-card);
}
.action-btn--dislike[aria-pressed="true"] svg {
    transform: scale(1.1);
}

/* Like animation when pressed */
.action-btn--like.is-bumping svg {
    animation: likePop 0.35s ease;
}
@keyframes likePop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3) rotate(-8deg); }
    100% { transform: scale(1.1); }
}

/* Share — success state */
.action-btn--share.is-copied {
    background: #1B7F3A;
    border-color: #1B7F3A;
    color: #fff;
}

/* Toast feedback */
.action-toast {
    margin-left: 4px;
    background: var(--espn-black);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 3px;
    animation: toastIn 0.2s ease;
}
.action-toast[hidden] { display: none; }

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

@media (max-width: 640px) {
    .action-btn { padding: 4px 8px; font-size: 10px; gap: 5px; }
    .action-btn__label { display: none; }
    .action-btn__count { min-width: 20px; }
}

/* ---------- Match info (below action buttons) ---------- */
.match-info {
    background: var(--espn-card);
    border: 1px solid var(--espn-border);
    border-top: 3px solid var(--espn-red);
    border-radius: 4px;
    padding: 18px 20px 16px;
    margin-top: 14px;
    box-shadow: var(--shadow-sm);
}

.match-info__header {
    margin-bottom: 6px;
}

.match-info__title {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
    color: var(--espn-text);
    letter-spacing: -0.01em;
}

.match-info__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--espn-text-dim);
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.match-info__starts { color: var(--espn-text-dim); }
.match-info__sport   { color: var(--espn-text-dim); }

.match-info__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--espn-text);
}

@media (max-width: 640px) {
    .match-info { padding: 14px 14px 12px; }
    .match-info__title { font-size: 15px; }
    .match-info__desc { font-size: 12px; }
}

/* ---------- Live chat ---------- */
.live-chat {
    background: var(--espn-card);
    border: 1px solid var(--espn-border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    height: 540px;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 72px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .live-chat {
    background: #161616;
    border-color: #2A2A2A;
}

.live-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--espn-red);
    color: #fff;
    flex-shrink: 0;
}

.live-chat__title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-chat__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 1.2s infinite;
    display: inline-block;
}

.live-chat__viewers {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.25);
    padding: 3px 8px;
    border-radius: 10px;
}

.live-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-behavior: smooth;
    background: var(--espn-card);
}

[data-theme="dark"] .live-chat__messages {
    background: #161616;
}

.live-chat__messages::-webkit-scrollbar { width: 6px; }
.live-chat__messages::-webkit-scrollbar-thumb {
    background: var(--espn-border);
    border-radius: 3px;
}
.live-chat__messages::-webkit-scrollbar-track { background: transparent; }

.live-chat__msg {
    font-size: 12px;
    line-height: 1.4;
    color: var(--espn-text);
    animation: chatFadeIn 0.25s ease-out;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

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

.live-chat__author {
    font-weight: 800;
    margin-right: 4px;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.live-chat__author--mod { color: var(--espn-red); }

.live-chat__text {
    color: var(--espn-text);
}

.live-chat__time {
    color: var(--espn-text-dim);
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
}

.live-chat__msg--self .live-chat__author { color: var(--espn-red); }
.live-chat__form {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid var(--espn-border);
    background: var(--espn-bg);
    flex-shrink: 0;
}

[data-theme="dark"] .live-chat__form {
    background: #1A1A1A;
    border-top-color: #2A2A2A;
}

.live-chat__input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--espn-border);
    background: var(--espn-card);
    color: var(--espn-text);
    font-size: 13px;
    padding: 7px 10px;
    border-radius: 4px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

[data-theme="dark"] .live-chat__input {
    background: #0E0E0E;
    border-color: #2A2A2A;
    color: var(--espn-text);
}

.live-chat__input:focus {
    border-color: var(--espn-red);
    box-shadow: 0 0 0 2px rgba(213, 0, 50, 0.15);
}

.live-chat__send {
    background: var(--espn-red);
    color: #fff;
    border: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
    padding: 0;
}

.live-chat__send:hover { background: var(--espn-red-dark); }
.live-chat__send:active { transform: scale(0.94); }
.live-chat__send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Responsive: stack chat below player on narrow screens */
@media (max-width: 980px) {
    .player-chat-row {
        grid-template-columns: 1fr;
    }
    .live-chat {
        height: 400px;
        position: static;
        max-height: none;
    }
}

@media (max-width: 640px) {
    .live-chat { height: 360px; }
    .live-chat__messages { padding: 8px 10px; }
    .live-chat__msg { font-size: 11px; }
}

/* ---------- Search loading overlay ---------- */
.search-loading {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-loading[hidden] { display: none; }

.search-loading__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: searchFadeIn 0.2s ease;
}

@keyframes searchFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-loading__dialog {
    position: relative;
    background: var(--espn-card);
    border: 1px solid var(--espn-border);
    border-top: 3px solid var(--espn-red);
    border-radius: 8px;
    padding: 24px 28px 22px;
    width: 320px;
    max-width: calc(100vw - 32px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
    animation: searchPopIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes searchPopIn {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-loading__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.search-loading__brand {
    font-weight: 900;
    font-style: italic;
    font-size: 16px;
    color: var(--espn-red);
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

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

/* Skeleton rows: simulate the result list being prepared */
.search-loading__skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-row {
    height: 44px;
    border-radius: 4px;
    background: linear-gradient(
        90deg,
        var(--espn-border) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        var(--espn-border) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    opacity: 0.5;
}

.skeleton-row:nth-child(1) { animation-delay: 0s; }
.skeleton-row:nth-child(2) { animation-delay: 0.15s; }
.skeleton-row:nth-child(3) { animation-delay: 0.3s; }

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

.search-loading__dots {
    display: flex;
    gap: 5px;
    justify-content: center;
    padding-top: 4px;
}

.search-loading__dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--espn-text-dim);
    opacity: 0.4;
    animation: dotPulse 1.2s ease-in-out infinite;
}

.search-loading__dots span:nth-child(1) { animation-delay: 0s; }
.search-loading__dots span:nth-child(2) { animation-delay: 0.15s; }
.search-loading__dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
    40% { opacity: 1; transform: scale(1.1); }
}

@media (max-width: 480px) {
    .search-loading__dialog { padding: 20px 22px 18px; width: 280px; }
}
