/* SoccerLive – lightweight, transparent design */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg:        #f8f9fb;
    --color-surface:   rgba(255, 255, 255, 0.72);
    --color-border:    rgba(0, 0, 0, 0.06);
    --color-text:      #1a1a2e;
    --color-muted:     #6b7280;
    --color-accent:    #2563eb;
    --color-accent-hv: #1d4ed8;
    --radius:          12px;
    --shadow:          0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
    --font:            system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --max-width:       1100px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow: auto;
    height: auto;
}

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: auto;
    height: auto;
}

/* Embed iframe pages opt into locked viewport via html.embed-page */
html.embed-page,
html.embed-page body {
    overflow: hidden;
    height: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

main.container {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
    background: var(--color-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo:hover {
    text-decoration: none;
    color: var(--color-accent);
}

.site-header nav a {
    color: var(--color-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.site-nav,
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.lang-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-left: .5rem;
}

.lang-switcher__link {
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 4px;
    color: var(--color-muted);
    text-decoration: none;
    border: 1px solid var(--color-border);
}

.lang-switcher__link:hover {
    color: var(--color-accent);
    border-color: rgba(37, 99, 235, 0.3);
}

.lang-switcher__link.is-active {
    color: #fff;
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.footer-nav {
    justify-content: center;
    margin-bottom: 0.75rem;
}

.footer-nav a {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.footer-nav a:hover {
    color: var(--color-accent);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
    width: 100%;
    align-self: stretch;
    border-top: 1px solid var(--color-border);
    padding: 2rem 0 1.5rem;
    margin-top: auto;
}

.footer-orgs {
    width: 100%;
    margin-bottom: 2rem;
}

.footer-orgs__intro {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.footer-orgs__heading {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.footer-orgs-marquee {
    width: 100%;
    overflow: hidden;
    padding: 0.35rem 0;
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.footer-orgs-marquee__viewport {
    width: 100%;
    overflow: hidden;
}

.footer-orgs-marquee__track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    min-width: 100%;
    animation: footer-orgs-scroll 48s linear infinite;
    will-change: transform;
}

.footer-orgs-marquee__track:hover {
    animation-play-state: paused;
}

.footer-orgs-marquee__group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.85rem;
    padding-right: 0.85rem;
}

.footer-org-marquee__item {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 7.5rem;
    height: 3.5rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.footer-org-marquee__item:hover {
    transform: translateY(-2px) scale(1.02);
    background: #fff;
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    text-decoration: none;
}

.footer-org-marquee__item img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 2.25rem;
    height: auto;
    object-fit: contain;
    filter: saturate(0.92);
    transition: filter 0.2s ease;
}

.footer-org-marquee__item:hover img {
    filter: saturate(1.1);
}

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

@media (prefers-reduced-motion: reduce) {
    .footer-orgs-marquee {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        mask-image: none;
        -webkit-mask-image: none;
        scrollbar-width: thin;
    }

    .footer-orgs-marquee__track {
        animation: none;
        flex-wrap: nowrap;
        width: max-content;
        min-width: 0;
        transform: none;
    }

    .footer-orgs-marquee__group[aria-hidden="true"] {
        display: none;
    }
}

.footer-orgs__note {
    margin-top: 0.85rem;
    text-align: center;
    font-size: 0.72rem;
    color: var(--color-muted);
    line-height: 1.5;
}

.site-footer p {
    color: var(--color-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* ── Match links (interlinking) ───────────────────────────────────────────── */
.match-links {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.match-links__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .match-links__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.match-links__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.match-links__date {
    color: var(--color-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.match-links__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.match-links__list a {
    display: block;
    padding: 0.5rem 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 0.9rem;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.match-links__list a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.match-links__time {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.match-links__empty {
    color: var(--color-muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.hero__subtitle {
    color: var(--color-muted);
    font-size: 1rem;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section {
    margin-bottom: 2.5rem;
}

.section__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.section__date {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.empty-state {
    color: var(--color-muted);
    font-style: italic;
    padding: 2rem;
    text-align: center;
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

/* ── Match Grid (Home) ────────────────────────────────────────────────────── */
.match-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 540px) {
    .match-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .match-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.match-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--color-surface);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.match-card:hover {
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
}

.match-card__teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.match-card__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
}

.team-badge {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.team-badge--lg {
    width: 80px;
    height: 80px;
}

.team-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}

.match-card__vs {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-muted);
    flex-shrink: 0;
}

.match-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.8rem;
}

.match-time {
    font-weight: 600;
    color: var(--color-accent);
}

.match-league {
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
    text-align: right;
}

/* ── Match Detail Page ────────────────────────────────────────────────────── */
.match-detail__hero,
.match-detail__header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.match-detail__hero {
    margin-bottom: 2rem;
}

.match-detail__league {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    background: rgba(37, 99, 235, 0.08);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.match-detail__title {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.match-detail__date {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.match-detail__cta {
    margin-top: 1.25rem;
}

.match-detail__cta-hint {
    color: var(--color-muted);
    font-size: 0.85rem;
    margin-top: 0.65rem;
}

.match-detail__scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.match-detail__scoreboard--hero {
    gap: 1.25rem;
    padding: 1rem 0 0.25rem;
    margin: 0.75rem 0 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.match-detail__scoreboard--hero .team-badge--lg {
    width: 72px;
    height: 72px;
}

.match-detail__scoreboard--hero .scoreboard-team__name {
    font-size: 0.85rem;
    font-weight: 600;
}

.scoreboard-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    max-width: 200px;
}

.scoreboard-team__name {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

.scoreboard-vs {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-muted);
}

.match-detail__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
}

.info-value--status {
    color: var(--color-accent);
}

/* ── Live Widget ──────────────────────────────────────────────────────────── */
.live-widget {
    margin-bottom: 2rem;
}

.live-widget__inner {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.02));
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: var(--radius);
}

.live-widget__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.live-widget__hint {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.btn-watch-live {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    background: var(--color-accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-watch-live:hover {
    background: var(--color-accent-hv);
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}

.btn-watch-live--hero {
    display: inline-block;
    min-width: min(100%, 320px);
    padding: 1rem 2.75rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-watch-live--sticky {
    display: block;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
}

body:has(.sticky-cta) main.container {
    padding-bottom: 5.5rem;
}

body:has(.sticky-cta) .site-footer {
    margin-bottom: 4rem;
}

.live-widget--compact {
    margin: 0;
}

.live-widget--compact .qr-code-container {
    margin-top: 1rem;
}

.qr-code-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.qr-hint {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* ── Lineups ──────────────────────────────────────────────────────────────── */
.lineups {
    margin-bottom: 2rem;
}

.lineups h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.lineups__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .lineups__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.lineup-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.lineup-block h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-accent);
}

.lineup-text {
    font-family: var(--font);
    font-size: 0.85rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--color-text);
    background: transparent;
    border: none;
}

/* ── Match Preview (AI) ───────────────────────────────────────────────────── */
.match-preview {
    margin-bottom: 2rem;
}

.match-preview h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.match-preview__text {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text);
}

/* ── 404 ──────────────────────────────────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page h1 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.error-page p {
    color: var(--color-muted);
    margin-bottom: 2rem;
}

/* ── Static Pages ─────────────────────────────────────────────────────────── */
.static-page {
    max-width: 720px;
    margin: 0 auto;
}

.static-page h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.static-page h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.75rem 0 0.75rem;
    color: var(--color-text);
}

.static-page p {
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.static-page p:last-child {
    margin-bottom: 0;
}

/* ── GEO blocks (AI Overview optimization) ────────────────────────────────── */
.geo-block {
    margin-bottom: 2rem;
}

.geo-answer {
    font-size: 1rem;
    line-height: 1.7;
    padding: 1.25rem;
    background: rgba(37, 99, 235, 0.04);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 1.25rem;
}

.geo-facts {
    margin-bottom: 1rem;
}

.geo-facts h2,
.geo-faq h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: .85rem;
}

.facts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .65rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.facts-list dt {
    font-size: .7rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.facts-list dd {
    font-size: .95rem;
    font-weight: 600;
    margin: 0 0 .65rem;
}

.geo-updated {
    font-size: .8rem;
    color: var(--color-muted);
    margin-bottom: 1.5rem;
}

.geo-faq {
    margin-bottom: 2rem;
}

.faq-list {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.faq-q {
    font-size: .95rem;
    font-weight: 700;
    margin: 1rem 0 .35rem;
    color: var(--color-text);
}

.faq-q:first-child {
    margin-top: 0;
}

.faq-a {
    font-size: .9rem;
    line-height: 1.7;
    color: var(--color-text);
    margin: 0 0 .5rem;
    padding-left: 0;
}
