:root {
    --bg: #0b0e14;
    --bg-elevated: #141925;
    --border: #242b3a;
    --text: #eef1f7;
    --text-muted: #8993a6;
    --brand: #2e6bff;
    --brand-hover: #1c56e6;
    --live: #ff4655;
    --radius: 10px;
}

:root[data-theme="light"] {
    --bg: #f4f6fb;
    --bg-elevated: #ffffff;
    --border: #e1e5ee;
    --text: #131722;
    --text-muted: #5b6376;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    transition: background-color 0.15s ease, color 0.15s ease;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 16px 20px;
}

@media (max-width: 640px) {
    .header-inner {
        gap: 10px 16px;
        padding: 12px 20px;
    }

    .logo {
        order: 1;
        font-size: 1.2rem;
    }

    .header-actions {
        order: 2;
    }

    .theme-toggle,
    .social-icon-btn {
        width: 32px;
        height: 32px;
    }

    .main-nav {
        order: 3;
        flex: 1 1 100%;
        gap: 16px;
    }

    .search-form {
        order: 4;
        flex: 1 1 100%;
        max-width: none;
    }
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--brand);
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.main-nav a:hover {
    color: var(--text);
}

.main-nav a.active {
    color: var(--brand);
}

.nav-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
}

.nav-link-btn:hover {
    color: var(--text);
}

.search-form {
    display: flex;
    flex: 1;
    min-width: 0;
    max-width: 420px;
}

.search-form input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border-radius: var(--radius) 0 0 var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

.search-form button {
    padding: 8px 16px;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
}

.search-form button:hover {
    background: var(--brand-hover);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle,
.social-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
}

.theme-toggle:hover,
.social-icon-btn:hover {
    color: var(--text);
    border-color: var(--brand);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

:root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

/* Language picker */
.lang-picker {
    position: relative;
}

.lang-picker-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.lang-picker-toggle:hover {
    color: var(--text);
    border-color: var(--brand);
}

.lang-picker-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 96px;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface, var(--bg));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 30;
}

.lang-picker.open .lang-picker-menu {
    display: block;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.lang-option:hover {
    background: var(--border);
    color: var(--text);
}

.lang-option.active {
    color: var(--brand);
}

/* Sections */
.section {
    padding: 24px 0;
}

.section-title {
    font-size: 1.3rem;
    margin: 0 0 16px;
}

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

.section-header .section-title {
    margin: 0;
}

/* Announcement banner */
.announcement-bar {
    background: var(--bg-elevated);
    background: color-mix(in srgb, var(--brand) 16%, var(--bg-elevated));
    border-bottom: 1px solid var(--border);
}

.announcement-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
}

.announcement-inner p {
    margin: 0;
    font-size: 0.85rem;
}

.announcement-link {
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
}

.announcement-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.announcement-close:hover {
    color: var(--text);
}

/* Carousels */
.carousel-arrows {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.carousel-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.carousel-btn:hover:not(:disabled) {
    border-color: var(--brand);
    color: var(--brand);
}

.carousel-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.carousel {
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -20px;
    padding: 0 20px;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 14px;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
    margin-top: 16px;
}

/* Sport tiles */
.sport-tile {
    flex: 0 0 130px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.sport-tile:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}

.sport-tile-icon {
    font-size: 1.8rem;
}

/* Match tiles */
.match-tile {
    flex: 0 0 230px;
    scroll-snap-align: start;
    display: block;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.match-tile:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .section {
        padding: 18px 0;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .announcement-inner {
        padding: 10px 14px;
        gap: 10px;
    }

    .announcement-inner p {
        font-size: 0.78rem;
    }

    .carousel-track {
        gap: 10px;
    }

    .sport-tile {
        flex-basis: 104px;
        padding: 16px 8px;
        gap: 6px;
        font-size: 0.8rem;
    }

    .sport-tile-icon {
        font-size: 1.5rem;
    }

    .match-tile {
        flex-basis: 172px;
    }

    .match-tile-title {
        font-size: 0.8rem;
    }

    .match-tile-body {
        padding: 8px 10px;
    }
}

.match-tile-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-tile-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 3px 9px;
    border-radius: 100px;
    color: #fff;
}

.badge-top-left {
    top: 8px;
    left: 8px;
}

.badge-live {
    background: var(--live);
}

.badge-time {
    background: rgba(0, 0, 0, 0.55);
}

.badge-viewers {
    top: 8px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.55);
}

.favorite-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.favorite-btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.favorite-btn.active svg {
    fill: #ffb703;
    stroke: #ffb703;
}

.match-tile-body {
    padding: 10px 12px;
}

.match-tile-title {
    margin: 0 0 4px;
    font-size: 0.85rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-tile-meta {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.match-tile-meta .sport-tag {
    font-size: 0.68rem;
}

.empty-state,
.empty-state-page {
    color: var(--text-muted);
    padding: 24px 0;
}

.empty-state-page {
    text-align: center;
    padding: 80px 0;
}

.empty-state-page h1 {
    font-size: 4rem;
    margin: 0;
    color: var(--brand);
}

/* Match grid */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.sport-tag {
    text-transform: capitalize;
    background: var(--border);
    padding: 2px 8px;
    border-radius: 100px;
}

/* Schedule page */
.schedule-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
}

.filter-pills {
    display: flex;
    gap: 8px;
}

.filter-pill {
    padding: 8px 18px;
    border-radius: 100px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
}

.filter-pill:hover {
    color: var(--text);
}

.filter-pill.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.filter-pill-live.active {
    background: var(--live);
    border-color: var(--live);
    color: #fff;
}

.filter-pill-popular.active {
    background: #ffb703;
    border-color: #ffb703;
    color: #1a1400;
}

.schedule-sport-filter select {
    padding: 8px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
}

.schedule-group {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

.schedule-group:first-of-type {
    border-top: none;
}

.schedule-date {
    flex: 0 0 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4px;
}

.schedule-date-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.schedule-date-day {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.schedule-date-month {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.schedule-date-live {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--live);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.schedule-date-matches {
    flex: 1;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
}

.schedule-date-matches .match-tile-body {
    padding: 8px 10px;
}

.schedule-date-matches .match-tile-title {
    font-size: 0.78rem;
}

.schedule-date-matches .match-tile-meta {
    font-size: 0.68rem;
}

.schedule-date-matches .badge {
    font-size: 0.62rem;
    padding: 2px 7px;
}

.schedule-date-matches .badge-viewers {
    right: 34px;
}

.schedule-date-matches .favorite-btn {
    width: 22px;
    height: 22px;
}

@media (max-width: 640px) {
    .schedule-group {
        flex-direction: column;
        gap: 10px;
    }

    .schedule-date {
        flex-direction: row;
        gap: 8px;
        align-items: baseline;
    }
}

/* Watch page */
.watch-header {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.watch-title {
    font-size: 1.6rem;
    margin: 0 0 8px;
}

.watch-subtitle {
    color: var(--text-muted);
    margin: 0 0 16px;
}

.watch-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.watch-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 900px) {
    .watch-layout {
        grid-template-columns: 1fr;
    }

    .watch-main {
        order: 1;
    }

    .watch-chat-placeholder {
        order: 2;
        min-height: 220px;
    }
}

.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--border);
    color: var(--text-muted);
}

.status-pill.status-live {
    background: var(--live);
    color: #fff;
}

.status-pill.status-upcoming {
    background: var(--brand);
    color: #fff;
}

.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.player-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.player-play-btn {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

.player-play-btn:hover {
    color: #fff;
}

.player-placeholder {
    padding: 60px 20px;
    text-align: center;
    background: var(--bg-elevated);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
}

.source-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-embed {
    display: block;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    cursor: pointer;
    margin-top: 4px;
}

.btn-embed:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.source-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 0.88rem;
}

.source-item.active,
.source-item:hover {
    border-color: var(--brand);
}

.source-item-name {
    font-weight: 600;
}

.source-item-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.source-item-official {
    border-color: #ffb703;
}

.source-item-official.active,
.source-item-official:hover {
    border-color: #ffb703;
    background: rgba(255, 183, 3, 0.1);
}

.watch-chat-placeholder {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.watch-chat-placeholder .btn-embed {
    margin: 10px 10px 0;
    width: auto;
}

.chat-frame {
    width: 100%;
    flex: 1;
    min-height: 400px;
    border: 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--brand);
    color: #fff;
    border-radius: var(--radius);
    margin-top: 12px;
}

.btn:hover {
    background: var(--brand-hover);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Modal */
body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.modal-dialog-wide {
    max-width: 600px;
}

.modal-dialog h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 16px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

.modal-dialog textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

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

.modal-actions .btn {
    width: 100%;
    border: none;
    cursor: pointer;
    margin-top: 0;
}

.modal-actions .btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.modal-status {
    min-height: 1.2em;
    margin: 10px 0 0;
    font-size: 0.85rem;
    text-align: center;
}

.modal-status-success {
    color: #4ade80;
}

.modal-status-error {
    color: var(--live);
}

/* SEO content — About + FAQ sections */
.seo-blurb h2,
.seo-faq h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}

.seo-blurb p,
.seo-faq p {
    margin: 0 0 10px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    max-width: 720px;
}

.seo-blurb p:last-child {
    margin-bottom: 0;
}

.faq-item {
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.faq-item:first-of-type {
    border-top: none;
}

.faq-item h3 {
    font-size: 0.94rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.faq-item p {
    margin: 0;
}

/* Results archive */
.results-intro {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 0 16px;
}

.results-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.results-controls select {
    padding: 8px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
}

.results-month-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.results-month-nav button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    cursor: pointer;
}

.results-month-nav button:hover {
    border-color: var(--brand, #2f7dff);
}

.row-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--bg-elevated);
    color: var(--text);
    padding: 12px 16px;
    transition: background-color 0.15s ease;
}

.result-row:hover {
    background: var(--bg);
}

.result-matchup {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.result-crest {
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.result-crest-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.6rem;
    color: #fff;
}

.result-team-name {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-vs {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.result-date {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.result-back {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
}

.result-back:hover {
    color: var(--text);
}

.result-detail-teams {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.result-detail-team {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.result-detail-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 20px 0;
}
