:root {
    --navy: #0e1e38;
    --blue: #1a3151;
    --green: #05ca86;
    --red: #e63946;
    --orange: #f59e0b;
    --background: #edf1f5;
    --border: #d1d5db;
    --text: #1f2937;
    --muted: #596577;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.45 Arial, "Segoe UI", sans-serif; }
h1, h2, h3, p { margin-top: 0; }
a { color: var(--blue); }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.table-card:focus-visible, .card:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

header { background: var(--navy); border-bottom: 3px solid var(--green); }
.header-inner, .nav-container, .container { max-width: 1200px; margin-inline: auto; padding-inline: 1.5rem; }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: .8rem; }
.logo { color: #fff; font-size: 1.6rem; font-weight: 900; letter-spacing: .03em; text-decoration: none; }
.logo span { color: var(--green); }
.header-meta { color: #cbd5e1; font-size: .8rem; font-weight: 600; text-transform: uppercase; }
nav { background: var(--blue); }
.nav-container { display: flex; gap: .25rem; }
.nav-btn { display: inline-block; padding: .75rem 1.25rem; border-bottom: 4px solid transparent; color: #fff; font-size: .88rem; font-weight: 700; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.nav-btn:hover { background: #244161; }
.nav-btn.active { background: #10243e; border-bottom-color: var(--green); }

.breaking-bar { display: flex; align-items: center; min-width: 0; background: #fff; border-bottom: 1px solid var(--border); font-size: .85rem; }
.breaking-tag { flex: none; padding: .45rem 1rem; background: var(--red); color: #fff; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.ticker-window { min-width: 0; flex: 1; overflow: hidden; }
.ticker-text { width: max-content; margin: 0; padding-left: 100%; color: var(--text); font-weight: 700; white-space: nowrap; animation: ticker 24s linear infinite; }
.ticker-window:hover .ticker-text { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }

.live-ticker-bar { overflow-x: auto; padding-block: .5rem; background: #fff; border-bottom: 1px solid var(--border); }
.ticker-inner { display: flex; gap: 1rem; width: max-content; max-width: 1200px; margin-inline: auto; padding-inline: 1.5rem; }
.mini-match { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 4px; background: #f8fafc; font-size: .8rem; white-space: nowrap; }
.match-score { padding: .1rem .4rem; border-radius: 3px; background: var(--navy); color: #fff; font-weight: 800; }
.live-tag { color: var(--red); font-size: .7rem; font-weight: 800; }
.ticker-term { color: var(--muted); font-size: .7rem; font-weight: 700; }

.container { margin-block: 1.5rem; }
.demo-notice { padding: .65rem .9rem; border-left: 4px solid var(--orange); background: #fff8e9; color: #4b3a12; font-size: .88rem; }
.main-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 1.5rem; }
.main-layout > * { min-width: 0; }
.section-header { margin: 0 0 1rem; padding: .55rem 1rem; border-left: 5px solid var(--green); background: var(--navy); color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.section-header-split { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.section-gap { margin-top: 1.5rem; }
.match-day { font-size: .8rem; font-weight: 400; white-space: nowrap; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.news-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: 0 1px 3px #0000000d; }
.news-card > img { display: block; width: 100%; height: 160px; object-fit: cover; border-bottom: 1px solid var(--border); }
.news-card > img.news-image-top { object-position: center top; }
.news-card-body { display: flex; flex: 1; flex-direction: column; padding: .9rem; }
.badge-row { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; }
.badge { padding: .2rem .5rem; border-radius: 2px; color: #fff; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.badge-champions { background: var(--blue); }
.badge-official { background: #008a5a; }
.badge-rumor { background: #9a6200; }
.time-ago { color: var(--muted); font-size: .73rem; }
.news-card h2 { margin-bottom: .5rem; color: var(--navy); font-size: 1rem; line-height: 1.3; }
.news-card p { margin-bottom: .8rem; color: var(--muted); font-size: .85rem; }
.card-link { margin-top: auto; font-size: .82rem; font-weight: 700; text-decoration: none; }
.card-link:hover, .quick-link:hover, .other-page-link:hover, .analysis-link:hover { text-decoration: underline; }

.sidebar-box, .quick-links, .other-page-box, .card, .table-card, .match-card, .analysis { border: 1px solid var(--border); background: #fff; }
.sidebar-box, .card { margin-bottom: 1.5rem; overflow-x: auto; }
.quick-links, .other-page-box { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; }
.quick-link, .other-page-link, .analysis-link { color: var(--navy); font-size: .9rem; font-weight: 700; text-decoration: none; }
.analysis-link { display: block; margin-bottom: .45rem; }
.table-transfers, .ranking-table, .data-table { width: 100%; border-collapse: collapse; }
.table-transfers { font-size: .82rem; }
.table-transfers th, .ranking-table th, .data-table th { padding: .6rem; border-bottom: 2px solid var(--border); background: #f1f5f9; color: var(--muted); font-weight: 700; }
.table-transfers th { text-align: left; }
.table-transfers td, .ranking-table td, .data-table td { padding: .6rem; border-bottom: 1px solid #e9eef4; }
.align-right, .transfer-val { text-align: right !important; }
.align-left, .club-col { text-align: left !important; }
.transfer-val, .value { color: #087450; font-weight: 800; white-space: nowrap; }

.table-card { overflow-x: auto; box-shadow: 0 1px 3px #0000000d; }
.ranking-table { min-width: 620px; font-size: .85rem; text-align: center; }
.ranking-table tr:hover, .data-table tr:hover { background: #f8fafc; }
.col-rank { width: 40px; }
.club-col { color: var(--navy); font-weight: 700; }
.pts-col { color: var(--navy); font-weight: 900; }
.zone-ucl td:first-child { border-left: 4px solid #0284c7; }
.zone-europe td:first-child { border-left: 4px solid #b45309; }
.zone-rel td:first-child { border-left: 4px solid var(--red); }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .6rem; color: var(--muted); font-size: .75rem; }
.legend-ucl { color: #0284c7; }
.legend-europe { color: #b45309; }
.legend-rel { color: var(--red); }
.schedule-note { margin: -.35rem 0 1rem; color: var(--muted); font-size: .8rem; }
.table-hint { display: none; margin: -.4rem 0 .65rem; color: var(--muted); font-size: .8rem; }
.match-card { margin-bottom: .75rem; padding: .8rem; }
.match-date { margin-bottom: .5rem; padding-bottom: .3rem; border-bottom: 1px dashed #e2e8f0; color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.match-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; }
.match-vs { color: var(--muted); }

.data-table { min-width: 590px; font-size: .86rem; }
.data-table th { text-align: left; white-space: nowrap; }
.data-table td { white-space: nowrap; }
.data-table .value { text-align: right; }
.club { color: var(--navy); font-weight: 700; }
.rank { width: 35px; color: var(--muted); font-weight: 900; }
.positive { color: #087450; font-weight: 700; }
.status-pending { color: #8b5800; font-weight: 700; }
.rumor-card { margin-bottom: 1.5rem; padding: .8rem 1rem; border: 1px solid var(--border); border-left: 4px solid var(--orange); background: #fff; }
.rumor-card p { margin: .5rem 0 0; color: var(--muted); font-size: .86rem; }
.player-cell { display: inline-flex; align-items: center; gap: .65rem; min-width: 155px; }
.player-cell img { width: 38px; height: 38px; border: 2px solid #e2e8f0; border-radius: 50%; background: #f8fafc; object-fit: cover; object-position: center 20%; }
.player-cell a { color: var(--navy); font-weight: 700; text-decoration: none; }
.player-cell a:hover { text-decoration: underline; }
.analysis { padding: 1rem; }
.analysis h3 { margin-bottom: .5rem; color: var(--navy); font-size: 1rem; }
.analysis p { margin-bottom: .8rem; color: var(--muted); font-size: .88rem; }
.meter { height: 9px; overflow: hidden; border-radius: 5px; background: #e5e7eb; }
.meter-fill { display: block; height: 100%; border-radius: 5px; }
.meter-78 { width: 78%; background: var(--green); }
.meter-62 { width: 62%; background: var(--orange); }
.analysis small { display: flex; justify-content: space-between; margin-top: .25rem; color: var(--muted); font-size: .75rem; }
.divider { margin: 1rem 0; border: 0; border-top: 1px solid #e5e7eb; }
.emphasis-navy { color: var(--navy); }
.source-note { margin: -.7rem 0 1.5rem; color: var(--muted); font-size: .8rem; }
.ucl-photo { margin: 0; border: 1px solid var(--border); background: #fff; }
.ucl-photo img { display: block; width: 100%; height: 200px; object-fit: cover; object-position: center top; }
.ucl-photo figcaption { padding: .65rem .8rem; color: var(--muted); font-size: .78rem; }
.photo-credits { padding: 1rem 1.5rem; border: 1px solid var(--border); background: #fff; color: var(--muted); font-size: .8rem; }
.photo-credits summary { color: var(--navy); font-weight: 700; cursor: pointer; }
.photo-credits ul { padding-left: 1.25rem; }
.photo-credits li { margin-bottom: .3rem; }
.photo-credits p { margin-bottom: 0; }

footer { margin-top: 2.5rem; padding: 1.5rem; border-top: 3px solid var(--blue); background: var(--navy); color: #cbd5e1; font-size: .85rem; text-align: center; }
footer p { margin: 0; }
footer a { color: #fff; }

@media (max-width: 850px) {
    .main-layout { grid-template-columns: 1fr; }
    .nav-btn { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: center; white-space: normal; text-align: center; }
    .table-hint { display: block; }
}
@media (max-width: 540px) {
    .header-inner { flex-direction: column; align-items: flex-start; }
    .header-meta { font-size: .72rem; }
    .nav-container, .container { padding-inline: 1rem; }
    .nav-btn { padding: .7rem .35rem; font-size: .78rem; }
    .section-header-split { flex-wrap: wrap; }
    .ticker-inner { padding-inline: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ticker-text { width: auto; padding: .3rem .8rem; white-space: normal; animation: none; }
}
