/* ==========================================================================
   Freekick Scoreboard — Live Scores
   ========================================================================== */

/* ── Base ── */
.fks-app {
    --fk-bg: #0b0f1a;
    --fk-bar: #0d1322;
    --fk-card: #101626;
    --fk-line: #232a3a;
    --fk-gold: linear-gradient(90deg,#caa24a,#7a6326);
    --fk-gold-ink: #e9c46a;
    --fk-red: #c0392b;
    --fk-text: #e6edf6;
    --fk-muted: #8a93a3;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--fk-text);
    background: var(--fk-bg);
    border-radius: 12px;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}
.fks-app *,
.fks-app *::before,
.fks-app *::after { box-sizing: border-box; }
.fks-app a { color: #e6f1ff; text-decoration: none; }
.fks-app a:hover { color: var(--fk-gold-ink); }
.fks-app img { max-width: 100%; }

/* ── Layout ── */
.fks-layout {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 0;
    min-height: 600px;
}

/* ── Loader / Empty ── */
.fks-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}
.fks-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #233554;
    border-top-color: var(--fk-gold-ink);
    border-radius: 50%;
    animation: fks-spin .7s linear infinite;
}
@keyframes fks-spin { to { transform: rotate(360deg); } }

.fks-empty { text-align: center; color: #8892b0; padding: 40px 16px; font-size: 14px; }
.fks-empty--sm { padding: 20px 12px; font-size: 13px; }
.fks-loader--sm { padding: 20px 0; }
.fks-loader--sm .fks-spinner { width: 20px; height: 20px; border-width: 2px; }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.fks-sidebar {
    background: var(--fk-card);
    border-right: 1px solid #1e2a3a;
    padding: 16px 12px;
    overflow-y: auto;
}
.fks-sidebar__title {
    color: var(--fk-gold-ink);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.fks-sidebar__search {
    width: 100%;
    background: #1a1a2e;
    border: 1px solid #233554;
    border-radius: 6px;
    padding: 8px 10px;
    color: #e6f1ff;
    font-size: 12px;
    outline: none;
    margin-bottom: 12px;
}
.fks-sidebar__search:focus { border-color: var(--fk-gold-ink); }

.fks-browse-section + .fks-browse-section { margin-top: 8px; padding-top: 8px; border-top: 1px solid #1e2a3a; }

.fks-browse-label {
    color: #8892b0;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin: 4px 0 6px;
}
.fks-browse-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    transition: background .15s;
}
.fks-browse-item:hover { background: rgba(202, 162, 74,.06); }
.fks-browse-icon { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; object-fit: contain; background: rgba(255,255,255,.92); padding: 2px; }

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.fks-main { padding: 16px 20px; min-width: 0; }

/* ── Right Ad Sidebar ── */
.fks-ads {
    padding: 16px 12px;
    border-left: 1px solid #1e2a3a;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Breadcrumb ── */
.fks-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.04);
    border-radius: 10px;
    font-size: 13px;
    overflow-x: auto;
    white-space: nowrap;
}
.fks-bc-sep { color: #4a5068; margin: 0 10px; font-size: 11px; }
.fks-bc-link { color: #8892b0; text-decoration: none; font-weight: 500; transition: color .15s; }
.fks-bc-link:hover { color: var(--fk-gold-ink); }
.fks-bc-current { color: #e6f1ff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

/* ── Date Navigator ── */
.fks-date-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(44px, 1fr);
    align-items: center;
    gap: 18px;
    min-height: 76px;
    padding: 16px 36px;
    margin: -16px -20px 18px;
    background: #07111f;
    border-top: 1px solid rgba(233,196,106,.18);
    border-bottom: 1px solid rgba(255,255,255,.04);
    position: relative;
}
.fks-date-nav__filters { justify-self: start; position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; }
.fks-date-nav .fks-live-btn { position: relative; z-index: 2; }
.fks-date-nav__center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    justify-self: center;
    z-index: 1;
}
.fks-date-nav__cal {
    justify-self: end;
    position: relative;
    display: flex;
    z-index: 2;
}
.fks-cal-btn {
    background: #2a2d32;
    border: 1px solid rgba(255,255,255,.1);
    color: #e6f1ff;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.fks-cal-btn:hover { background: #233554; border-color: var(--fk-gold-ink); color: var(--fk-gold-ink); }
.fks-cal-icon { display: block; font-size: 16px; line-height: 1; filter: grayscale(1) brightness(1.35); }
/* Native picker sits invisibly under the button so showPicker()/click anchors here. */
.fks-date-picker {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 36px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}
.fks-date-btn {
    background: #2a2d32;
    border: 1px solid rgba(255,255,255,.1);
    color: #e6f1ff;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.fks-date-btn:hover { background: #233554; border-color: var(--fk-gold-ink); color: var(--fk-gold-ink); }
.fks-date-label { font-size: 20px; font-weight: 800; min-width: 154px; text-align: center; color: #e8edf5; letter-spacing: 0; line-height: 1.15; }

.fks-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 13px;
    height: 32px;
    background: rgba(127,29,29,.45);
    border: 1px solid rgba(248,113,113,.18);
    border-radius: 9px;
    color: #f2d6d6;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    cursor: pointer;
    transition: all .15s;
}
.fks-live-btn:hover { background: rgba(153,27,27,.7); color: #fff; }
.fks-live-btn__count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}
.fks-live-btn--active {
    background: rgba(127,29,29,.68) !important;
    border-color: rgba(248,113,113,.28) !important;
    color: #fff !important;
}
.fks-fav-filter-btn {
    height: 32px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(233,196,106,.24);
    border-radius: 9px;
    background: rgba(255,255,255,.045);
    color: #e9c46a;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}
.fks-fav-filter-btn:hover,
.fks-fav-filter-btn.is-active {
    background: rgba(233,196,106,.14);
    border-color: rgba(233,196,106,.42);
    color: #ffe08a;
}
.fks-fav-filter-btn__count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(233,196,106,.16);
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Match List
   ========================================================================== */
.fks-league-group { margin-bottom: 4px; }
.fks-app.is-fav-filter .fks-match-row:not(.is-fav) { display: none; }
.fks-fav-empty { display: none; text-align: center; color: #8892b0; padding: 32px 16px; font-size: 14px; }
.fks-app.is-fav-filter .fks-fav-empty.is-visible { display: block; }

.fks-league-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #16213e;
    border-radius: 6px 6px 0 0;
}
.fks-league-logo { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; object-fit: contain; background: rgba(255,255,255,.94); padding: 2px; }
.fks-league-name { font-size: 13px; font-weight: 600; }

.fks-match-row {
    padding: 8px 12px;
    border-bottom: 1px solid #1a1a2e;
    background: #131320;
    transition: background .15s;
    cursor: pointer;
    text-decoration: none;
}
.fks-match-row:hover { background: #1a1a2e; }
.fks-match-row:last-child { border-radius: 0 0 6px 6px; }

.fks-match__status { text-align: center; font-size: 11px; flex: 0 0 42px; }
.fks-match__time { color: #8892b0; }
.fks-match__ft { color: #8892b0; font-weight: 600; }
.fks-match__live { color: #ff6b35; font-weight: 700; animation: fks-pulse 2s infinite; }
@keyframes fks-pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

.fks-match__teams { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.fks-match__team { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.fks-match__logo { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }
.fks-red-card-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 2px;
    margin-left: 4px;
    flex-shrink: 0;
}

.fks-match__score {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex: 0 0 44px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fks-match--live .fks-match__score { color: #ff6b35; }
.fks-match--ft .fks-match__score { color: #e6f1ff; }
.fks-match--ns .fks-match__score { color: #8892b0; }

/* ==========================================================================
   Match Detail
   ========================================================================== */
.fks-md__league { text-align: center; font-size: 13px; color: #8892b0; margin-bottom: 8px; }
.fks-md__round { color: var(--fk-gold-ink); }

.fks-md__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px 16px;
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border-radius: 12px;
    margin-bottom: 16px;
}
.fks-md__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 200px;
}
.fks-md__team-logo { width: 56px; height: 56px; }
.fks-md__team-name { font-size: 14px; font-weight: 600; text-align: center; }

.fks-md__score-block { text-align: center; min-width: 100px; }
.fks-md__score {
    font-size: 36px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}
.fks-md__status { font-size: 12px; margin-top: 4px; }
.fks-md__status--ft { color: #8892b0; }
.fks-md__status--live { color: #ff6b35; font-weight: 700; }
.fks-md__ht { font-size: 11px; color: #8892b0; margin-top: 2px; }
.fks-md__kickoff { font-size: 32px; font-weight: 700; }
.fks-md__kickoff-date { font-size: 13px; color: #8892b0; margin-top: 4px; }

/* ==========================================================================
   Teams Index
   ========================================================================== */
.fks-teams-index { display: flex; flex-direction: column; gap: 16px; }
.fks-teams-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--fk-line);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(202,162,74,.18), rgba(16,22,38,.96));
}
.fks-teams-hero h1 { margin: 0; font-size: 24px; line-height: 1.1; }
.fks-teams-hero p { margin: 0; color: #c7cfdd; font-size: 14px; }
.fks-teams-hero span {
    grid-row: 1 / span 2;
    grid-column: 2;
    color: var(--fk-gold-ink);
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
}
.fks-teams-tools { display: grid; grid-template-columns: minmax(0,1fr) 180px auto; gap: 10px; }
.fks-teams-tools input,
.fks-teams-tools select {
    min-width: 0;
    height: 42px;
    border: 1px solid var(--fk-line);
    border-radius: 8px;
    background: #080d16;
    color: var(--fk-text);
    padding: 0 12px;
    font-size: 14px;
}
.fks-teams-tools button {
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--fk-red);
    color: #fff;
    padding: 0 18px;
    font-weight: 800;
    cursor: pointer;
}
.fks-team-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.fks-team-card {
    min-width: 0;
    min-height: 174px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 16px 12px;
    border: 1px solid rgba(233,196,106,.24);
    border-radius: 10px;
    background: #0b0f18;
    text-align: center;
    transition: border-color .15s, transform .15s;
}
.fks-team-card:hover { border-color: rgba(233,196,106,.62); transform: translateY(-1px); color: #fff; }
.fks-team-card img { width: 70px; height: 70px; object-fit: contain; border-radius: 10px; background: #fff; padding: 6px; }
.fks-team-card strong { max-width: 100%; color: #fff; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fks-team-card__en,
.fks-team-card__meta,
.fks-team-card small { max-width: 100%; color: #8892b0; font-size: 12px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fks-team-card small { color: #b2bac8; }

/* ==========================================================================
   Tabs (shared)
   ========================================================================== */
.fks-tabs {
    display: flex;
    border-bottom: 1px solid #233554;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.fks-tabs::-webkit-scrollbar { display: none; }
.fks-tab {
    padding: 10px 16px;
    color: #8892b0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all .2s;
}
.fks-tab:hover { color: #e6f1ff; }
.fks-tab.active { color: var(--fk-gold-ink); border-bottom-color: var(--fk-gold-ink); }

/* ==========================================================================
   Events (match detail) — grid layout: [minute] [home] [score] [away]
   ========================================================================== */
.fks-events { display: flex; flex-direction: column; }

.fks-event-row {
    display: grid;
    grid-template-columns: 60px 1fr 70px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(35,53,84,.4);
    font-size: 13px;
}
.fks-event-row:last-child { border-bottom: none; }

.fks-event-row__minute {
    color: #8892b0;
    font-weight: 500;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.fks-event-row__home {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-align: right;
}
.fks-event-row__away {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
}

.fks-event-row__score {
    text-align: center;
    color: #e6f1ff;
    font-weight: 600;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fks-event-row--marker .fks-event-row__marker-score {
    grid-column: 2 / 5;
    text-align: center;
    font-weight: 700;
    color: #e6f1ff;
    font-variant-numeric: tabular-nums;
}
.fks-event-row--marker { background: rgba(255,255,255,.02); }
.fks-event-row--marker .fks-event-row__minute {
    color: #8892b0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Player-name stack: primary on top, assist (if any) below in smaller muted text */
.fks-event__stack {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}
.fks-event__player { font-weight: 500; color: #e6f1ff; }
.fks-event__assist { color: #8892b0; font-size: 11px; }

/* Badges — goal ball, cards, sub arrow, VAR, miss */
.fks-event-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    color: #e6f1ff;
    flex-shrink: 0;
}
.fks-event-icon svg { width: 14px; height: 14px; display: block; }
.fks-event-icon__sup {
    position: absolute;
    top: -4px;
    right: -6px;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 3px;
    border-radius: 4px;
    background: #1a1a2e;
    color: var(--fk-gold-ink);
}
.fks-event-icon--og .fks-event-icon__sup { color: #ef4444; }
.fks-event-icon--miss { color: #ef4444; font-weight: 700; }
.fks-event-icon--sub  { color: #3245ff; font-weight: 700; }
.fks-event-icon--var  {
    width: auto;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    background: #bc52ee;
    color: #fff;
}

.fks-event-card {
    display: inline-block;
    width: 11px;
    height: 15px;
    border-radius: 2px;
    flex-shrink: 0;
}
.fks-event-card--yellow { background: #ffc107; }
.fks-event-card--red    { background: #ef4444; }

/* ==========================================================================
   Lineups (match detail)
   ========================================================================== */
.fks-lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fks-lineup__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #16213e;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}
.fks-lineup__logo { width: 24px; height: 24px; border-radius: 50%; }
.fks-lineup__formation { color: var(--fk-gold-ink); margin-left: auto; font-size: 12px; }
.fks-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-bottom: 1px solid rgba(35,53,84,.3);
    font-size: 13px;
}
.fks-player__num {
    width: 24px;
    height: 24px;
    background: #1a1a2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #8892b0;
    flex-shrink: 0;
}
.fks-player__name { flex: 1 1 auto; }

/* Per-player event badges: goals, cards, subs, VAR, misses. */
.fks-player__events { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fks-pc {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}
.fks-pc--yellow { width: 9px; height: 12px; background: #ffc107; border-radius: 2px; }
.fks-pc--red    { width: 9px; height: 12px; background: #ef4444; border-radius: 2px; }
.fks-pc__time   { font-size: 10px; color: #8892b0; margin-left: -2px; }

.fks-lineup__subhead {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #8892b0;
    padding: 12px 12px 6px;
    border-top: 1px solid rgba(35,53,84,.4);
}

/* ==========================================================================
   Stats (match detail)
   ========================================================================== */
.fks-stats__header {
    display: flex;
    justify-content: space-between;
    padding: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
}
.fks-stat { margin-bottom: 12px; }
.fks-stat__values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 4px;
}
.fks-stat__label { color: #8892b0; font-size: 11px; text-align: center; }
.fks-stat__bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: #1a1a2e;
}
.fks-stat__fill--home { background: var(--fk-gold-ink); border-radius: 3px 0 0 3px; transition: width .5s; }
.fks-stat__fill--away { background: #ff6b35; border-radius: 0 3px 3px 0; transition: width .5s; }

/* ==========================================================================
   H2H (match detail)
   ========================================================================== */
.fks-h2h__tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.fks-h2h__tab {
    padding: 6px 12px;
    font-size: 12px;
    color: #8892b0;
    background: #1a1a2e;
    border: 1px solid #233554;
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
}
.fks-h2h__tab:hover { color: #e6f1ff; }
.fks-h2h__tab.active { color: var(--fk-gold-ink); border-color: var(--fk-gold-ink); background: rgba(202, 162, 74,.06); }
.fks-h2h__panel { display: none; }
.fks-h2h__panel.active { display: block; }
.fks-h2h-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(35,53,84,.3);
    font-size: 13px;
}
.fks-h2h-row__league { color: #8892b0; font-size: 10px; min-width: 50px; }
.fks-h2h-row__teams { flex: 1; }
.fks-h2h-row__teams strong { color: #e6f1ff; }
.fks-h2h-row__result {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ==========================================================================
   Team Detail
   ========================================================================== */
.fks-th {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 16px;
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border-radius: 12px;
    margin-bottom: 16px;
}
.fks-th__logo { width: 64px; height: 64px; flex-shrink: 0; }
.fks-th__name { font-size: 20px; font-weight: 700; margin: 0; }
.fks-th__facts { color: #8892b0; font-size: 12px; margin-top: 4px; }

.fks-tm-row {
    display: grid;
    grid-template-columns: auto 1fr 60px;
    gap: 12px;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(35,53,84,.3);
    transition: background .15s;
    cursor: pointer;
    text-decoration: none;
}
.fks-tm-row:hover { background: rgba(202, 162, 74,.03); }
.fks-tm-row__league {
    font-size: 10px;
    color: #8892b0;
    background: #1a1a2e;
    padding: 2px 6px;
    border-radius: 4px;
}
.fks-tm-row__teams { display: flex; flex-direction: column; gap: 4px; }
.fks-tm-row__team { display: flex; align-items: center; gap: 8px; font-size: 13px; }

.fks-section-title { font-size: 14px; font-weight: 600; color: var(--fk-gold-ink); margin: 16px 0 8px; }

/* Friendlier empty state for league Overview when there are no fixtures/results */
.fks-overview-empty {
    padding: 40px 20px;
    text-align: center;
    border: 1px dashed rgba(202, 162, 74, 0.25);
    border-radius: 10px;
    background: rgba(202, 162, 74, 0.03);
}
.fks-overview-empty__title {
    font-size: 15px;
    font-weight: 600;
    color: #e6f1ff;
    margin-bottom: 6px;
}
.fks-overview-empty__sub {
    font-size: 13px;
    color: #8892b0;
    line-height: 1.5;
}
.fks-overview-empty__link {
    color: var(--fk-gold-ink);
    text-decoration: none;
    border-bottom: 1px dotted rgba(202, 162, 74, 0.4);
}
.fks-overview-empty__link:hover { border-bottom-style: solid; }

/* Overview "Load more" — progressive disclosure for fixtures/results lists */
.fks-overview-section { display: block; }
.fks-overview-row { display: block; }
.fks-overview-row[data-hidden] { display: none; }
.fks-load-more {
    display: block;
    width: 100%;
    margin: 10px 0 2px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid rgba(202, 162, 74, 0.35);
    border-radius: 6px;
    color: var(--fk-gold-ink);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.fks-load-more:hover { background: rgba(202, 162, 74, 0.08); border-color: rgba(202, 162, 74, 0.6); }
.fks-load-more:active { background: rgba(202, 162, 74, 0.16); }

/* ==========================================================================
   Squad Table
   ========================================================================== */
.fks-squad { width: 100%; border-collapse: collapse; }
.fks-squad th {
    color: #8892b0;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid #233554;
    font-weight: 600;
}
.fks-squad td {
    padding: 8px 6px;
    font-size: 13px;
    border-bottom: 1px solid rgba(35,53,84,.3);
}
.fks-squad th:first-child,
.fks-squad td:first-child { text-align: center; width: 36px; }
.fks-squad tr:hover { background: rgba(202, 162, 74,.03); }

/* ==========================================================================
   League Detail
   ========================================================================== */
.fks-lh {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 16px;
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border-radius: 12px;
    margin-bottom: 16px;
}
.fks-lh__logo {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    object-fit: contain;
    object-position: center;
    background: rgba(255,255,255,.96);
    border-radius: 10px;
    padding: 6px;
}
.fks-lh__info { padding-top: 2px; }
.fks-lh__name { font-size: 20px; font-weight: 700; margin: 0; }
.fks-lh__meta { color: #8892b0; font-size: 12px; margin-top: 4px; }

/* ==========================================================================
   Standings Table (shared by league & team pages)
   ========================================================================== */
.fks-standings-group { margin: 0 0 24px; }
.fks-standings-group:last-child { margin-bottom: 0; }
.fks-standings-group__title {
    margin: 0 0 12px;
    color: #e6f1ff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}
.fks-standings-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fks-standings-table th {
    color: #8892b0;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 8px 4px;
    text-align: left;
    border-bottom: 1px solid #233554;
    font-weight: 600;
}
.fks-standings-table td {
    padding: 8px 4px;
    font-size: 13px;
    border-bottom: 1px solid rgba(35,53,84,.3);
}
.fks-standings-table th:first-child,
.fks-standings-table td:first-child { text-align: center; width: 32px; }
.fks-standings-table th:nth-child(2),
.fks-standings-table td:nth-child(2) { width: auto; }
.fks-standings-table th:nth-child(n+3),
.fks-standings-table td:nth-child(n+3) { width: 44px; text-align: center; }
.fks-standings-table th:last-child,
.fks-standings-table td:last-child { width: 56px; text-align: right; }
.fks-standings-table tr:hover { background: rgba(202, 162, 74,.03); }

.fks-rk {
    font-weight: 700;
    font-size: 11px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.fks-tc { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fks-tc__img { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }
.fks-tc a {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fks-pts { font-weight: 700; color: var(--fk-gold-ink); }

.fks-legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 0; }
.fks-legend__item { display: flex; align-items: center; gap: 4px; font-size: 10px; color: #8892b0; }
.fks-legend__dot { width: 8px; height: 8px; border-radius: 50%; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .fks-layout { grid-template-columns: 250px 1fr; }
    .fks-ads { display: none; }
}

@media (max-width: 768px) {
    .fks-layout { grid-template-columns: 1fr; }
    .fks-sidebar { display: none; }
    .fks-ads { display: none; }
    .fks-main { padding: 12px; }
    .fks-md__header { gap: 12px; padding: 16px 12px; }
    .fks-md__team-logo { width: 40px; height: 40px; }
    .fks-md__team-name { font-size: 12px; }
    .fks-md__score { font-size: 28px; }
    .fks-lineups { grid-template-columns: 1fr; }
    .fks-th { padding: 14px 12px; }
    .fks-th__logo { width: 48px; height: 48px; }
    .fks-th__name { font-size: 16px; }
    .fks-match-row { padding: 6px 8px; }
    .fks-match__team { font-size: 12px; gap: 6px; }
    .fks-match__logo { width: 16px; height: 16px; }
    .fks-match__score { flex: 0 0 38px; font-size: 13px; }
    .fks-match__status { flex: 0 0 34px; }
    .fks-tabs { gap: 0; }
    .fks-tab { padding: 8px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
    .fks-md__header { gap: 8px; padding: 12px 8px; }
    .fks-md__team-logo { width: 32px; height: 32px; }
    .fks-md__score { font-size: 24px; }
    .fks-md__team { max-width: 100px; }
    .fks-event-row { grid-template-columns: 40px 1fr 50px 1fr; gap: 8px; padding: 10px 8px; }
    .fks-event-row__minute { font-size: 11px; }
    .fks-h2h-row { font-size: 11px; padding: 6px 8px; }
    .fks-squad th, .fks-squad td { padding: 6px 3px; font-size: 11px; }
}

/* Match highlight video */
.fks-highlight { margin: 16px 0 20px; }
.fks-highlight__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.fks-highlight__frame iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
}
.fks-highlight__video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    background: #000;
    display: block;
}
.fks-highlight__link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    background: var(--fk-gold-ink);
    color: #0e0e1a;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
}
.fks-highlight__link:hover { background: #f0d68a; }

/* ===== Homepage redesign ===== */

/* Header */
.fks-header { background: var(--fk-bar); border-bottom: 2px solid #caa24a; }
.fks-header__bar { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; gap: 12px; }
.fks-header__brand { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.fks-header__title { color: var(--fk-text); font-size: 18px; }
.fks-header__nav { display: flex; gap: 6px; flex-wrap: wrap; }
.fks-header__link { color: var(--fk-muted); font-size: 13px; padding: 6px 10px; border-radius: 8px; border: 1px solid transparent; }
.fks-header__link:hover, .fks-header__link.is-active { color: var(--fk-gold-ink); border: 1px solid #caa24a; }
.fks-header__toggle { display: none; background: none; border: 1px solid var(--fk-line); color: var(--fk-gold-ink); border-radius: 8px; padding: 4px 10px; font-size: 16px; cursor: pointer; }

/* Hero */
.fks-hero { background: var(--fk-gold); color: #1a1407; margin: 12px; padding: 16px 18px; border-radius: 12px; }
.fks-hero__title { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.fks-hero__sub { margin: 0; font-size: 13px; opacity: .9; }

/* Section bars */
.fks-section { margin: 0 0 12px; }
.fks-section__bar { background: var(--fk-gold); color: #1a1407; border-radius: 10px; padding: 10px 14px; margin: 12px 0 8px; }
.fks-section__title { font-weight: 800; font-size: 15px; }

/* League group count + collapse */
.fks-league-header { display: flex; align-items: center; gap: 8px; }
.fks-league-count { margin-left: auto; color: var(--fk-muted); font-size: 12px; }
.fks-league-toggle { background: none; border: 0; color: var(--fk-gold-ink); cursor: pointer; font-size: 13px; transition: transform .15s; }
.fks-league-group.is-collapsed .fks-match-row { display: none; }
.fks-league-group.is-collapsed .fks-league-toggle { transform: rotate(-90deg); }

/* Sidebar cards */
.fks-card { background: var(--fk-card); border: 1px solid var(--fk-line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.fks-card__title { margin: 0 0 8px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--fk-gold-ink); }

/* Match row: star + link + analyze */
.fks-match-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--fk-line); position: relative; }
.fks-match-row.has-live-stream { padding-bottom: 34px; }
.fks-match__link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.fks-fav { background: none; border: 0; color: var(--fk-muted); font-size: 16px; cursor: pointer; line-height: 1; }
.fks-match-row.is-fav .fks-fav { color: var(--fk-gold-ink); }
.fks-analyze { background: var(--fk-red); color: #fff; border-radius: 6px; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.fks-analyze:hover { color: #fff; filter: brightness(1.08); }
.fks-watch-live {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 0 0 0 rgba(239,68,68,.48);
    animation: fks-watch-pulse 1.4s ease-in-out infinite;
}
.fks-watch-live:hover { color: #fff; background: #d62828; }
.fks-watch-live__dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: fks-watch-blink 1s ease-in-out infinite; }
.fks-watch-live--row {
    position: absolute;
    left: 50%;
    bottom: 7px;
    transform: translateX(-50%);
    padding: 4px 10px;
    font-size: 10px;
    letter-spacing: .02em;
    text-transform: uppercase;
    z-index: 2;
}
.fks-watch-live--detail {
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 13px;
}
@keyframes fks-watch-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.42); }
    50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
@keyframes fks-watch-blink {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.72); }
}

/* Ad slots: fixed-size, centered, never overflowing */
.fks-ad { display: flex; align-items: center; justify-content: center; margin: 12px auto; position: relative; }
.fks-ad__inner { width: var(--ad-w); height: var(--ad-h); max-width: 100%; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.fks-ad__close { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.5); color: #fff; border: 0; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; z-index: 2; }
.fks-ad--sticky { position: sticky; top: 12px; }
.fks-ad--mobile_footer_320x50 { display: none; }
.fks-ad__img--mobile { display: none; }

/* Hide theme header on the scores page (Option A).
   Covers GeneratePress default (#masthead/.site-header) plus the site's
   Elementor Header-Footer custom header (#fk-hdr / .elementor-location-header). */
body.fks-scores-page .site-header,
body.fks-scores-page #masthead,
body.fks-scores-page #fk-hdr,
body.fks-scores-page .ehf-header #fk-hdr,
body.fks-scores-page .elementor-location-header { display: none !important; }

/* Layout: drop the right gutter when no right-rail ads */
.fks-layout--no-ads { grid-template-columns: 250px 1fr; }

/* Responsive */
@media (max-width: 1024px) {
    .fks-layout--no-ads { grid-template-columns: 250px 1fr; }
    .fks-ad--right_300x250, .fks-ad--right_300x600, .fks-ads { display: none; }
}
@media (max-width: 768px) {
    .fks-layout,
    .fks-layout--no-ads {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .fks-main {
        width: 100%;
        min-width: 0;
    }

    .fks-header__toggle { display: inline-block; }
    .fks-header__nav { display: none; width: 100%; flex-direction: column; }
    .fks-header.is-open .fks-header__nav { display: flex; }
    .fks-ad--mobile_footer_320x50 { display: flex; position: fixed; left: 0; right: 0; bottom: 0; margin: 0; background: var(--fk-bar); border-top: 1px solid var(--fk-line); z-index: 50; }
    .fks-ad__img--mobile { display: block; }
    .fks-ad__img:not(.fks-ad__img--mobile) { display: none; }
}

/* CSS-only tabs (radio-driven, no JS) */
.fks-tabset { position: relative; }
.fks-tabset__radio { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.fks-tabset > .fks-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--fk-line); margin-bottom: 12px; flex-wrap: wrap; }
.fks-tabset > .fks-tabs .fks-tab { padding: 8px 14px; cursor: pointer; color: var(--fk-muted); border-bottom: 2px solid transparent; font-size: 13px; user-select: none; }
.fks-tabset > .fks-tabs .fks-tab:hover { color: var(--fk-text); }
.fks-tabset > section.fks-tab-panel { display: none; }
/* active label highlight (Nth radio checked → Nth label) */
.fks-tabset__radio:nth-of-type(1):checked ~ .fks-tabs .fks-tab:nth-of-type(1),
.fks-tabset__radio:nth-of-type(2):checked ~ .fks-tabs .fks-tab:nth-of-type(2),
.fks-tabset__radio:nth-of-type(3):checked ~ .fks-tabs .fks-tab:nth-of-type(3),
.fks-tabset__radio:nth-of-type(4):checked ~ .fks-tabs .fks-tab:nth-of-type(4),
.fks-tabset__radio:nth-of-type(5):checked ~ .fks-tabs .fks-tab:nth-of-type(5) { color: var(--fk-gold-ink); border-bottom-color: #caa24a; }
/* show matching panel (Nth radio checked → Nth section panel) */
.fks-tabset__radio:nth-of-type(1):checked ~ section.fks-tab-panel:nth-of-type(1),
.fks-tabset__radio:nth-of-type(2):checked ~ section.fks-tab-panel:nth-of-type(2),
.fks-tabset__radio:nth-of-type(3):checked ~ section.fks-tab-panel:nth-of-type(3),
.fks-tabset__radio:nth-of-type(4):checked ~ section.fks-tab-panel:nth-of-type(4),
.fks-tabset__radio:nth-of-type(5):checked ~ section.fks-tab-panel:nth-of-type(5) { display: block; }

/* Pagination */
.fks-pager { display: flex; justify-content: center; gap: 10px; margin: 16px 0; }
.fks-pager__btn { background: var(--fk-card); border: 1px solid var(--fk-line); border-radius: 8px; padding: 8px 14px; color: var(--fk-text); font-size: 13px; }
.fks-pager__btn:hover { color: var(--fk-gold-ink); border-color: #caa24a; }

/* Bilingual league names */
.fks-lname__th { font-weight: 700; color: var(--fk-gold-ink); }
.fks-lname__en { color: var(--fk-muted); font-size: .9em; font-weight: 400; }

/* Horizontal match row: home (left) · center status · away (right) */
.fks-match__side { display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0; font-size: 13px; }
.fks-match__side--home { justify-content: flex-start; }
.fks-match__side--away { justify-content: flex-end; }
.fks-match__side .fks-match__logo { width: 24px; height: 24px; flex-shrink: 0; }
.fks-match__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fks-match__side--away .fks-match__name { text-align: right; }
.fks-match__center { flex: 0 0 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-align: center; }
.fks-match__center .fks-match__co-label { color: var(--fk-muted); font-size: 11px; }
.fks-match__center .fks-match__time { color: var(--fk-text); font-weight: 600; font-size: 14px; }
.fks-match__center .fks-match__co-score { color: var(--fk-text); font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.fks-match__center .fks-match__co-sub { color: var(--fk-muted); font-size: 11px; font-weight: 600; }
.fks-match__center .fks-match__co-min { color: #ff6b35; font-size: 11px; font-weight: 700; }
@media (max-width: 768px) {
    .fks-date-nav { grid-template-columns: minmax(0, 1fr) 38px; gap: 10px 8px; min-height: 64px; padding: 12px 14px; margin: -16px -20px 14px; }
    .fks-date-nav__center { grid-column: 1 / -1; grid-row: 2; gap: 10px; width: 100%; }
    .fks-date-nav__filters { gap: 6px; min-width: 0; }
    .fks-date-nav__cal { grid-column: 2; grid-row: 1; }
    .fks-date-btn,
    .fks-cal-btn { width: 34px; height: 34px; }
    .fks-date-label { min-width: 128px; font-size: 17px; }
    .fks-live-btn { height: 30px; padding: 0 10px; font-size: 9px; }
    .fks-fav-filter-btn { width: 30px; height: 30px; padding: 0; justify-content: center; }
    .fks-fav-filter-btn__label,
    .fks-fav-filter-btn__count { display: none; }
    .fks-match__center { flex: 0 0 64px; }
    .fks-match__side { font-size: 12px; }
    .fks-match__side .fks-match__logo { width: 20px; height: 20px; }
    .fks-teams-hero { grid-template-columns: 1fr; }
    .fks-teams-hero span { grid-row: auto; grid-column: auto; }
    .fks-teams-tools { grid-template-columns: 1fr; }
    .fks-team-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
