#lsToolbar .toolbar-date-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    flex: 0 0 auto;
}
#lsToolbar .toolbar-date-controls .date-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}
#lsToolbar .toolbar-date-controls .date-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
}
#lsToolbar .toolbar-date-controls .date-input-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#lsToolbar .toolbar-date-controls .date-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    min-width: 108px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    justify-content: center;
    white-space: nowrap;
}
#lsToolbar .toolbar-date-controls .date-label:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
}
#lsToolbar .toolbar-date-controls .date-label i { color: #ffd9bf; font-size: 11px; }
#lsToolbar {
    display: flex;
    align-items: center;
    margin: 0 0 10px;
    padding: 8px 8px 6px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(64, 45, 29, 0.98) 0%, rgba(42, 33, 25, 0.98) 100%);
    border: 1px solid rgba(229, 90, 0, 0.14);
    box-shadow: 0 10px 24px rgba(18, 12, 8, 0.18);
    position: sticky;
    top: calc(var(--bb-nav-height, 46px) + 8px);
    z-index: 12;
}
#lsToolbar .main-filters {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    border-radius: 10px;
    background: rgba(255, 248, 242, 0.05);
    border: 1px solid rgba(255, 170, 110, 0.10);
    overflow: hidden;
}
#lsToolbar .ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background: transparent;
    color: rgba(255, 236, 221, 0.84);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease;
}
#lsToolbar .ctrl-btn:last-child { border-right: 0; }
#lsToolbar .ctrl-btn i { font-size: 11px; }
#lsToolbar .ctrl-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
#lsToolbar .ctrl-btn.active,
#lsToolbar .ctrl-btn.active:hover { background: linear-gradient(180deg, #ff9347 0%, #e56b00 100%); color: #2f1a0c; }
#lsToolbar .ctrl-btn.live-btn .live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff8a3d;
    box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.65);
    animation: livePulse 1.2s infinite;
}
@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.70); }
    70% { box-shadow: 0 0 0 7px rgba(255, 138, 61, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0); }
}
[data-theme="light"] #lsToolbar {
    background: linear-gradient(135deg, #ffe6d2 0%, #fff4eb 100%);
    border-color: rgba(229, 90, 0, 0.14);
    box-shadow: 0 6px 14px rgba(180, 76, 0, 0.08);
}
[data-theme="light"] #lsToolbar .main-filters { background: transparent; border: 0; border-radius: 0; }
[data-theme="light"] #lsToolbar .ctrl-btn { color: #8a3c00; border-right-color: rgba(180, 76, 0, 0.12); }
[data-theme="light"] #lsToolbar .ctrl-btn:hover { background: rgba(229, 90, 0, 0.08); color: #6c2e00; }
[data-theme="light"] #lsToolbar .toolbar-date-controls { border-left-color: rgba(180, 76, 0, 0.12); }
[data-theme="light"] #lsToolbar .toolbar-date-controls .date-btn,
[data-theme="light"] #lsToolbar .toolbar-date-controls .date-label {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(229, 90, 0, 0.18);
    color: #8a3c00;
}
[data-theme="light"] #lsToolbar .toolbar-date-controls .date-btn:hover,
[data-theme="light"] #lsToolbar .toolbar-date-controls .date-label:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(229, 90, 0, 0.26);
}
[data-theme="light"] #lsToolbar .toolbar-date-controls .date-label i { color: #d45a00; }
.header-bottom-slot { display: none; }
.content-area { padding-top: var(--bb-content-pad, 84px); }
.livescore-layout { display: block; }
.livescore-board { width: min(var(--bb-shell-width), calc(100vw - 32px)); max-width: 100%; min-width: 0; }
#livescoreContainer { min-width: 0; }
.league-title-mini {
    background: rgba(0,0,0,0.5);
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: var(--font-xs);
    color: #999;
}
[data-theme="light"] .league-title-mini { background: rgba(229,90,0,0.1); color: #333; }
[data-theme="light"] .livescore-match-row .match-time,
[data-theme="light"] .scheduled-time { color: #111; }
.league-title-mini i { font-size: var(--font-xs); color: #888; }
.league-title-mini .fi { font-size: 14px; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.league-title-mini .league-name { flex: 1; }
.league-title-mini .fav-star { cursor: pointer; font-size: 10px; color: rgba(255,255,255,0.3); transition: all 0.2s; }
[data-theme="light"] .league-title-mini .fav-star { color: rgba(0,0,0,0.3); }
.league-title-mini .fav-star:hover { color: #f39c12; transform: scale(1.2); }
.league-title-mini .fav-star.active { color: #f39c12; }
.main-header-row {
    display: grid;
    grid-template-columns: 70px 1fr 90px 1fr 90px;
    padding: 8px 10px;
    background: rgba(255,107,0,0.2);
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-radius: 6px 6px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}
.main-header-row > div { text-align: center; }
.main-header-row > div:nth-child(2) { text-align: right; }
.main-header-row > div:nth-child(4) { text-align: left; }
.livescore-match-row {
    display: grid;
    grid-template-columns: 70px 1fr 90px 1fr 90px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: all 0.2s ease;
}
.livescore-match-row:nth-child(odd) { background: rgba(255,255,255,0.06); }
.livescore-match-row:nth-child(even) { background: rgba(255,255,255,0.04); }
[data-theme="light"] .livescore-match-row:nth-child(odd) { background: rgba(0,0,0,0.06); }
[data-theme="light"] .livescore-match-row:nth-child(even) { background: #fff; }
.livescore-match-row:hover { background: rgba(255,107,0,0.1); }
.livescore-match-row .match-fav { text-align: center; display: none; }
.livescore-match-row .match-fav .team-fav { cursor: pointer; font-size: 12px; color: rgba(255,255,255,0.2); transition: all 0.2s; }
[data-theme="light"] .livescore-match-row .match-fav .team-fav { color: rgba(0,0,0,0.2); }
.livescore-match-row .match-fav .team-fav:hover { color: #f39c12; }
.livescore-match-row .match-fav .team-fav.active { color: #f39c12; }
.livescore-match-row .match-time {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--primary-light);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.livescore-match-row .team-home { text-align: right; padding-right: 10px; font-size: var(--font-sm); }
.livescore-match-row .team-away { text-align: left; padding-left: 10px; font-size: var(--font-sm); }
.livescore-match-row .score-ft {
    text-align: center;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.livescore-match-row .score-ft .score-main { display: inline-flex; align-items: center; white-space: nowrap; }
.livescore-match-row .score-ft .score-main span,
.livescore-match-row .score-ft > span:not(.scheduled-time) {
    font-size: var(--font-md);
    display: inline-block;
    width: 32px;
    padding: 3px 4px;
    background: var(--gradient);
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    text-align: center;
}
.livescore-match-row .score-ft .score-ft-sub { font-size: 10px; line-height: 1.1; color: #9aa3ad; font-weight: 600; }
[data-theme="light"] .livescore-match-row .score-ft .score-ft-sub { color: #666; }
.livescore-match-row .score-ft.live .score-main span,
.livescore-match-row .score-ft.live > span:not(.scheduled-time) { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }
.livescore-match-row .score-ft.finished .score-main span,
.livescore-match-row .score-ft.finished > span:not(.scheduled-time) { background: rgba(255,255,255,0.15); color: #888; }
[data-theme="light"] .livescore-match-row .score-ft.finished .score-main span,
[data-theme="light"] .livescore-match-row .score-ft.finished > span:not(.scheduled-time) { background: rgba(0,0,0,0.1); color: #555; }
.livescore-match-row .score-info { text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
.score-total { padding: 2px 6px; background: linear-gradient(135deg, #ff6b00 0%, #cc5500 100%); border-radius: 4px; font-weight: 600; font-size: var(--font-xs); color: #fff; }
.score-ht-box {
    padding: 2px 5px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 10px;
    color: #aaa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
}
[data-theme="light"] .score-ht-box { background: rgba(0,0,0,0.08); color: #666; }
.live-badge {
    display: inline-block;
    background: linear-gradient(90deg, #28a745, #20c997, #28a745);
    background-size: 200% auto;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: var(--font-sm);
    font-weight: 600;
    animation: gradientMove 1.5s linear infinite, pulse 1.5s ease infinite;
    white-space: nowrap;
}
@keyframes gradientMove { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }
.ft-badge { display: inline-block; background: rgba(255,255,255,0.15); color: #888; padding: 2px 6px; border-radius: 4px; font-size: var(--font-sm); font-weight: 600; }
[data-theme="light"] .ft-badge { background: rgba(0,0,0,0.1); color: #555; }
.ht-badge { display: inline-block; background: #17a2b8; color: #fff; padding: 2px 6px; border-radius: 4px; font-size: var(--font-sm); font-weight: 600; }
.et-badge { display: inline-block; background: rgba(255, 193, 7, 0.2); color: #ffd166; padding: 2px 6px; border-radius: 4px; font-size: var(--font-sm); font-weight: 700; }
[data-theme="light"] .et-badge { color: #8a5a00; background: rgba(255, 193, 7, 0.25); }
.pp-badge { display: inline-block; background: rgba(255,255,255,0.15); color: #b9c0c8; padding: 2px 6px; border-radius: 4px; font-size: var(--font-sm); font-weight: 600; }
[data-theme="light"] .pp-badge { background: rgba(0,0,0,0.1); color: #666; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.scheduled-time { font-family: 'Orbitron', monospace; font-size: var(--font-sm); color: var(--primary-light); }
.score-ft .scheduled-time { width: auto; display: inline-block; padding: 3px 6px; background: var(--gradient); border-radius: 4px; color: #fff; line-height: 1; }
.main-header-row.time-mode { grid-template-columns: 70px 1fr 90px 1fr 90px; }
.main-header-row.time-mode > div:nth-child(2) { text-align: right; }
.main-header-row.time-mode > div:nth-child(4) { text-align: left; }
.livescore-match-row.time-mode { grid-template-columns: 70px 1fr 90px 1fr 90px; }
.livescore-match-row .match-flag { text-align: center; font-size: 12px; display: none; }
.livescore-match-row .match-flag .fi { border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,0.3); cursor: help; }
@media (max-width: 991px) {
    .main-header-row { display: grid !important; grid-template-columns: repeat(12, 1fr) !important; padding: 5px 4px !important; font-size: 9px !important; }
    .main-header-row > :nth-child(1) { grid-column: 1 / 2 !important; grid-row: 1 !important; }
    .main-header-row > :nth-child(2) { grid-column: 2 / 6 !important; grid-row: 1 !important; }
    .main-header-row > :nth-child(3) { grid-column: 6 / 8 !important; grid-row: 1 !important; }
    .main-header-row > :nth-child(4) { grid-column: 8 / 12 !important; grid-row: 1 !important; }
    .main-header-row > :nth-child(5) { display: none !important; }
    .livescore-match-row { display: grid !important; grid-template-columns: repeat(12, 1fr) !important; padding: 6px 4px 4px !important; align-items: stretch !important; }
    .livescore-match-row .match-fav, .livescore-match-row .match-flag { display: none !important; }
    .livescore-match-row .match-time { grid-column: 1 / 2 !important; grid-row: 1 / 3 !important; font-size: 9px !important; display: flex !important; align-items: center !important; justify-content: center !important; padding-left: 2px !important; }
    .livescore-match-row .team-home { grid-column: 2 / 6 !important; grid-row: 1 !important; font-size: 11px !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; min-width: 0 !important; padding-right: 3px !important; display: flex !important; align-items: center !important; justify-content: flex-end !important; }
    .livescore-match-row .score-ft { grid-column: 6 / 8 !important; grid-row: 1 !important; display: flex !important; flex-direction: column; align-items: center !important; justify-content: center !important; }
    .livescore-match-row .score-ft .score-main span,
    .livescore-match-row .score-ft > span:not(.scheduled-time) { min-width: 18px !important; padding: 2px 4px !important; font-size: 13px !important; width: auto !important; }
    .score-ft .scheduled-time { font-size: 11px !important; padding: 2px 5px !important; }
    .livescore-match-row .score-ft .score-ft-sub { font-size: 8px; }
    .livescore-match-row .team-away { grid-column: 8 / 12 !important; grid-row: 1 !important; font-size: 11px !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; min-width: 0 !important; padding-left: 6px !important; display: flex !important; align-items: center !important; }
    .livescore-match-row .score-info { display: flex !important; justify-content: center !important; gap: 6px !important; grid-column: 2 / 12 !important; grid-row: 2 !important; padding-top: 4px !important; }
    .score-total { display: none !important; }
    .score-ht-box { padding: 1px 4px !important; font-size: 9px !important; }
    .livescore-match-row.time-mode { grid-template-columns: repeat(12, 1fr) !important; }
    .live-badge, .ft-badge, .ht-badge { font-size: 8px !important; padding: 1px 3px !important; white-space: nowrap !important; }
    .scheduled-time { font-size: 9px !important; }
    #lsToolbar { top: calc(var(--bb-nav-height, 42px) + 6px); padding: 0; margin-bottom: 8px; }
    #lsToolbar .main-filters { padding: 0 4px; }
    #lsToolbar .ctrl-btn { height: 30px; min-width: 0; padding: 0 8px !important; font-size: 10px !important; }
    #lsToolbar .toolbar-date-controls { gap: 4px; padding-left: 6px; }
    #lsToolbar .toolbar-date-controls .date-btn { width: 26px; height: 26px; font-size: 9px; }
    #lsToolbar .toolbar-date-controls .date-label { min-width: 86px; height: 26px; padding: 0 8px; font-size: 9px; }
    .content-area { padding-top: var(--bb-content-pad, 84px); }
    .league-title-mini { padding: 5px 6px !important; font-size: 10px !important; }
}
@media (max-width: 480px) {
    .livescore-match-row .match-time { font-size: 8px !important; }
    .livescore-match-row .team-home, .livescore-match-row .team-away { font-size: 10px !important; }
    .livescore-match-row .score-ft .score-main span,
    .livescore-match-row .score-ft > span:not(.scheduled-time) { font-size: 10px !important; }
    .score-ft .scheduled-time { font-size: 9px !important; padding: 2px 4px !important; }
    .livescore-match-row .score-ft .score-ft-sub { font-size: 7px; }
    .league-title-mini { font-size: 9px !important; }
    #lsToolbar .ctrl-btn { padding: 0 6px !important; font-size: 10px !important; }
    #lsToolbar .toolbar-date-controls { gap: 3px; padding-left: 4px; }
    #lsToolbar .toolbar-date-controls .date-label { min-width: 74px; padding: 0 6px; font-size: 8px; }
}
@media (max-width: 1200px) {
    .livescore-layout { display: block; }
    .livescore-board { width: 100%; margin: 0; }
}

[data-theme="light"] .score-ft .score-main,
[data-theme="light"] .score-ft .score-main span { color: #111; }

[data-theme="light"] .score-ft .scheduled-time { color: #111 !important; }
