/*
 * Karina Sports visual refresh
 * This file intentionally contains presentation-only overrides so the
 * application behavior can remain untouched and the refresh can be reverted.
 */

:root {
    --ui-page: #090c10;
    --ui-surface: #11161c;
    --ui-surface-raised: #171d24;
    --ui-surface-soft: #0e1318;
    --ui-border: #27313b;
    --ui-border-strong: #3a4652;
    --ui-text: #f4f7f9;
    --ui-text-secondary: #a7b1bc;
    --ui-text-tertiary: #74808c;
    --ui-green: #39d98a;
    --ui-green-strong: #20b96e;
    --ui-cyan: #42bde8;
    --ui-coral: #ff6b73;
    --ui-amber: #f4bd50;
    --ui-control: #1b222a;
    --ui-control-hover: #242d36;
    --ui-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    --ui-shadow-hover: 0 16px 34px rgba(0, 0, 0, 0.3);
    --ui-radius: 6px;

    color-scheme: dark;
    --bg-color: var(--ui-page);
    --bg-gradient: none;
    --text-main: var(--ui-text);
    --text-muted: var(--ui-text-secondary);
    --text-soft: var(--ui-text-secondary);
    --text-strong: var(--ui-text);
    --accent-color: var(--ui-green);
    --accent-secondary: var(--ui-cyan);
    --accent-warm: var(--ui-amber);
    --glass-bg: var(--ui-surface);
    --glass-border: var(--ui-border);
    --card-hover: var(--ui-control-hover);
    --surface-bg: var(--ui-surface);
    --surface-bg-strong: var(--ui-surface-raised);
    --field-bg: var(--ui-surface-soft);
    --header-bg: rgba(9, 12, 16, 0.94);
    --footer-bg: var(--ui-surface-soft);
    --shadow-soft: var(--ui-shadow);
    --shadow-card: var(--ui-shadow);
    --radius-card: var(--ui-radius);
    --radius-control: var(--ui-radius);
}

:root[data-theme="light"] {
    --ui-page: #f4f6f7;
    --ui-surface: #ffffff;
    --ui-surface-raised: #ffffff;
    --ui-surface-soft: #eef2f4;
    --ui-border: #d8dee3;
    --ui-border-strong: #bdc7cf;
    --ui-text: #111820;
    --ui-text-secondary: #56636f;
    --ui-text-tertiary: #7d8994;
    --ui-green: #087f5b;
    --ui-green-strong: #056b4c;
    --ui-cyan: #0b789d;
    --ui-coral: #d94855;
    --ui-amber: #a96800;
    --ui-control: #f2f5f6;
    --ui-control-hover: #e8edef;
    --ui-shadow: 0 8px 24px rgba(26, 39, 51, 0.07);
    --ui-shadow-hover: 0 14px 30px rgba(26, 39, 51, 0.11);

    color-scheme: light;
    --bg-color: var(--ui-page);
    --bg-gradient: none;
    --text-main: var(--ui-text);
    --text-muted: var(--ui-text-secondary);
    --text-soft: var(--ui-text-secondary);
    --text-strong: var(--ui-text);
    --accent-color: var(--ui-green);
    --accent-secondary: var(--ui-cyan);
    --accent-warm: var(--ui-amber);
    --glass-bg: var(--ui-surface);
    --glass-border: var(--ui-border);
    --card-hover: var(--ui-control-hover);
    --surface-bg: var(--ui-surface);
    --surface-bg-strong: var(--ui-surface-raised);
    --field-bg: var(--ui-surface-soft);
    --header-bg: rgba(255, 255, 255, 0.94);
    --footer-bg: var(--ui-surface);
    --shadow-soft: var(--ui-shadow);
    --shadow-card: var(--ui-shadow);
    --button-text-on-accent: #ffffff;
}

html {
    background: var(--ui-page);
    scrollbar-color: var(--ui-border-strong) transparent;
}

body,
:root[data-theme="light"] body {
    min-height: 100vh;
    background: var(--ui-page);
    color: var(--ui-text);
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
}

.background-glow,
:root[data-theme="light"] .background-glow {
    display: none;
}

.container,
#sports-view > section .container {
    width: min(100%, 1800px);
    max-width: none;
    margin-inline: auto;
    padding-inline: clamp(18px, 2.4vw, 44px);
}

a,
button,
input,
select,
textarea {
    letter-spacing: 0;
}

button,
select,
summary {
    -webkit-tap-highlight-color: transparent;
}

/* Header */
.glass-header,
:root[data-theme="light"] .glass-header {
    padding: 10px 0 11px;
    border: 0;
    border-bottom: 1px solid var(--ui-border);
    background: var(--header-bg);
    box-shadow: none;
    backdrop-filter: blur(18px) saturate(130%);
}

.header-content {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px 16px;
}

.logo {
    min-height: 40px;
    gap: 9px;
    padding: 0;
    color: var(--ui-text);
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: 0;
}

.logo-icon {
    width: 34px;
    height: 34px;
    border: 1px solid color-mix(in srgb, var(--ui-green) 72%, var(--ui-border));
    border-radius: var(--ui-radius);
    background: var(--ui-green);
    color: #07130d;
    box-shadow: none;
}

.highlight,
.text-accent {
    color: var(--ui-green);
}

.desktop-nav,
:root[data-theme="light"] .desktop-nav {
    min-height: 40px;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    box-shadow: none;
}

.desktop-nav a,
:root[data-theme="light"] .desktop-nav a {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 4px;
    color: var(--ui-text-secondary);
    font-size: 0.8rem;
    font-weight: 750;
}

.desktop-nav a:hover,
:root[data-theme="light"] .desktop-nav a:hover {
    color: var(--ui-text);
    background: var(--ui-control-hover);
    box-shadow: none;
}

.desktop-nav a.active,
:root[data-theme="light"] .desktop-nav a.active {
    border-color: transparent;
    background: var(--ui-green);
    color: #07130d;
    box-shadow: none;
}

.global-search,
:root[data-theme="light"] .global-search {
    height: 40px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface-soft);
    box-shadow: none;
}

.global-search:focus-within {
    border-color: var(--ui-cyan);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-cyan) 18%, transparent);
}

.global-search input {
    height: 38px;
    color: var(--ui-text);
    font-size: 0.88rem;
}

.global-search input::placeholder,
.tving-search input::placeholder {
    color: var(--ui-text-tertiary);
}

.global-search button {
    width: 42px;
    height: 38px;
    color: var(--ui-text-secondary);
}

.global-search button:hover {
    color: var(--ui-cyan);
    background: transparent;
}

.header-actions {
    gap: 6px;
}

.theme-control,
.color-assist-control,
.status-pill,
.auth-button,
.icon-action,
.tving-back-button,
.load-more-button,
.segment-button,
.score-filter-chip,
.worldcup-today-button,
.netflix-rail-button {
    min-height: 36px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-control);
    color: var(--ui-text);
    box-shadow: none;
}

.theme-control:hover,
.color-assist-control:hover,
.auth-button.secondary:hover,
.icon-action:hover,
.tving-back-button:hover,
.load-more-button:hover,
.segment-button:hover,
.score-filter-chip:hover,
.worldcup-today-button:hover,
.netflix-rail-button:hover {
    border-color: var(--ui-border-strong);
    background: var(--ui-control-hover);
    color: var(--ui-text);
    transform: none;
}

.theme-control select {
    color: var(--ui-text);
    font-weight: 700;
}

.theme-control select option {
    background: var(--ui-surface);
    color: var(--ui-text);
}

.auth-button,
.spotv-login-form button,
.access-form button,
.btn-primary {
    min-height: 36px;
    border: 1px solid var(--ui-green);
    border-radius: var(--ui-radius);
    background: var(--ui-green);
    color: #07130d;
    box-shadow: none;
    font-weight: 800;
}

.auth-button:hover,
.spotv-login-form button:hover,
.access-form button:hover,
.btn-primary:hover {
    border-color: color-mix(in srgb, var(--ui-green) 75%, #ffffff);
    background: color-mix(in srgb, var(--ui-green) 88%, #ffffff);
    box-shadow: none;
    transform: none;
}

.auth-button.secondary,
.btn-secondary {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-control);
    color: var(--ui-text);
}

.status-pill,
:root[data-theme="light"] .status-pill {
    color: var(--ui-text-secondary);
}

.status-pill.connected {
    border-color: color-mix(in srgb, var(--ui-green) 45%, var(--ui-border));
    color: var(--ui-green);
}

.color-assist-control:has(input:checked) {
    border-color: var(--ui-cyan);
    background: color-mix(in srgb, var(--ui-cyan) 14%, var(--ui-control));
}

/* Page structure */
.section-padding {
    padding: 38px 0;
}

.compact-section {
    padding-top: 12px;
}

.section-header,
#sports-view .section-header,
:root[data-theme="light"] #sports-view .section-header {
    min-height: auto;
    margin-bottom: 18px;
    padding: 0 0 13px;
    border: 0;
    border-bottom: 1px solid var(--ui-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.section-header h2,
#sports-view .section-header h2 {
    color: var(--ui-text);
    font-size: clamp(1.2rem, 1.02rem + 0.54vw, 1.62rem);
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: 0;
}

.section-header h2 i {
    width: 1.3em;
    color: var(--ui-green);
    text-align: center;
}

.section-subtitle {
    margin-top: 4px;
    color: var(--ui-text-secondary);
    font-size: 0.84rem;
}

.section-actions {
    gap: 8px;
}

.icon-action {
    width: 36px;
    padding: 0;
}

.view-mode-toggle {
    color: var(--ui-text-secondary);
}

.switch {
    width: 42px;
    height: 22px;
}

.slider {
    border: 1px solid var(--ui-border);
    background: var(--ui-control);
}

.slider:before {
    width: 16px;
    height: 16px;
    bottom: 2px;
    left: 3px;
    background: var(--ui-text-secondary);
}

input:checked + .slider {
    border-color: var(--ui-green);
    background: var(--ui-green);
}

input:checked + .slider:before {
    background: #07130d;
    transform: translateX(18px);
}

/* Sports command view */
#sports-view.app-view.active {
    grid-template-columns: 184px minmax(0, 1fr);
    column-gap: 24px;
    width: min(100%, 1800px);
    margin-inline: auto;
    padding: 0 clamp(18px, 2.4vw, 44px) 44px;
}

#sports-view > section .container {
    width: 100%;
    padding: 0;
}

.sports-command-rail,
:root[data-theme="light"] .sports-command-rail {
    top: 112px;
    margin-top: 24px;
    padding: 10px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    box-shadow: none;
}

.sports-command-rail::before,
:root[data-theme="light"] .sports-command-rail::before {
    display: none;
}

.sports-rail-brand {
    min-height: 52px;
    margin-bottom: 9px;
    padding: 4px 4px 11px;
    border-bottom-color: var(--ui-border);
}

.sports-rail-icon,
:root[data-theme="light"] .sports-rail-icon {
    width: 36px;
    height: 36px;
    border: 1px solid color-mix(in srgb, var(--ui-green) 34%, var(--ui-border));
    border-radius: var(--ui-radius);
    background: color-mix(in srgb, var(--ui-green) 12%, var(--ui-surface));
    color: var(--ui-green);
    box-shadow: none;
}

.sports-rail-brand strong {
    color: var(--ui-text);
    font-size: 0.86rem;
}

.sports-rail-brand span:not(.sports-rail-icon) {
    color: var(--ui-text-secondary);
    font-size: 0.7rem;
}

.sports-rail-nav {
    gap: 3px;
}

.sports-rail-nav a {
    min-height: 38px;
    gap: 9px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--ui-text-secondary);
    font-size: 0.79rem;
}

.sports-rail-nav a i {
    color: var(--ui-text-tertiary);
}

.sports-rail-nav a:hover,
.sports-rail-nav a.active,
:root[data-theme="light"] .sports-rail-nav a:hover,
:root[data-theme="light"] .sports-rail-nav a.active {
    border-color: transparent;
    background: var(--ui-control);
    color: var(--ui-text);
    transform: none;
}

.sports-rail-nav a.active {
    box-shadow: inset 3px 0 0 var(--ui-green);
}

.sports-rail-nav a:hover i,
.sports-rail-nav a.active i {
    color: var(--ui-green);
}

.sports-rail-pulse,
:root[data-theme="light"] .sports-rail-pulse {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--ui-border);
    border-radius: 4px;
    background: var(--ui-surface-soft);
}

.sports-rail-pulse span {
    background: var(--ui-green);
    box-shadow: none;
}

.sports-rail-pulse strong {
    color: var(--ui-text);
}

.sports-rail-pulse small {
    color: var(--ui-text-secondary);
}

#sports-view .score-ticker-section {
    padding-top: 24px;
}

#sports-view .score-ticker,
:root[data-theme="light"] #sports-view .score-ticker {
    min-height: 88px;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    box-shadow: none;
}

#sports-view .score-ticker-window {
    padding: 18px 8px 8px;
}

#sports-view .score-ticker-track,
:root[data-theme="light"] #sports-view .score-ticker-track {
    gap: 7px;
    color: var(--ui-text);
    text-shadow: none;
}

#sports-view .score-ticker-item,
:root[data-theme="light"] #sports-view .score-ticker-item {
    width: 176px;
    min-height: 68px;
    padding: 8px 10px;
    border: 1px solid var(--ui-border);
    border-radius: 4px;
    background: var(--ui-surface-soft);
    box-shadow: none;
}

#sports-view .score-ticker-item:hover {
    border-color: var(--ui-border-strong);
    background: var(--ui-control);
}

#sports-view .score-ticker-updated,
:root[data-theme="light"] #sports-view .score-ticker-updated {
    top: 6px;
    right: 8px;
    border: 0;
    background: transparent;
    color: var(--ui-text-tertiary);
}

#sports-view .score-ticker-league,
:root[data-theme="light"] #sports-view .score-ticker-league {
    color: var(--ui-green);
}

#sports-view .score-ticker-status {
    color: var(--ui-amber);
}

#sports-view .score-ticker-item.live .score-ticker-status {
    color: var(--ui-coral);
}

.score-ticker-team-row,
:root[data-theme="light"] .score-ticker-team-row {
    color: var(--ui-text);
}

.score-ticker-team-row.winner,
:root[data-theme="light"] .score-ticker-team-row.winner {
    color: var(--ui-green);
}

#sports-view .score-ticker-time,
:root[data-theme="light"] #sports-view .score-ticker-time {
    color: var(--ui-text-tertiary);
}

/* Cards and grids */
.grid-layout {
    gap: 14px;
}

#sports-view .grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

#sports-view #channels .grid-layout,
#sports-view #highlights .grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(226px, 1fr));
}

.glass-card,
.score-card,
.standing-card,
.modal-content,
.access-card,
.loading-panel,
:root[data-theme="light"] .glass-card:not(.tving-menu),
:root[data-theme="light"] .score-card,
:root[data-theme="light"] .standing-card {
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    box-shadow: none;
}

.glass-card::after,
:root[data-theme="light"] .glass-card:not(.tving-menu)::after {
    display: none;
}

.glass-card {
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.glass-card:hover {
    border-color: var(--ui-border-strong);
    background: var(--ui-surface-raised);
    box-shadow: var(--ui-shadow-hover);
    transform: translateY(-2px);
}

.card-image,
.video-thumbnail {
    background: #05080b;
}

.card-image::before,
.video-thumbnail::before {
    background: linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.5));
}

.card-content,
:root[data-theme="light"] .card-content {
    padding: 12px 13px 13px;
    border-top: 1px solid var(--ui-border);
    background: var(--ui-surface);
    box-shadow: none;
}

.match-teams,
.video-card h3,
:root[data-theme="light"] .match-teams,
:root[data-theme="light"] .video-card h3 {
    color: var(--ui-text);
    font-size: 0.94rem;
    font-weight: 750;
}

.match-meta,
.video-card .date,
:root[data-theme="light"] .match-meta,
:root[data-theme="light"] .video-card .date {
    color: var(--ui-text-secondary);
    font-size: 0.78rem;
}

.category-badge,
.duration,
.score-status {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(7, 10, 14, 0.82);
    color: #ffffff;
    box-shadow: none;
}

.play-overlay {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: var(--ui-green);
    color: #07130d;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.card-action-button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    background: rgba(7, 10, 14, 0.84);
    color: #ffffff;
}

.card-action-button:hover {
    border-color: var(--ui-green);
    background: rgba(7, 10, 14, 0.94);
    color: var(--ui-green);
}

.top10-rank {
    color: rgba(0, 0, 0, 0.18);
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.78);
    text-shadow: 0 5px 16px rgba(0, 0, 0, 0.62);
}

#coupang-grid.grid-layout,
#tving-grid.grid-layout,
#wavve-grid.grid-layout,
#ott-grid.grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 13px;
}

#global-search-grid.grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 13px;
}

#coupang-grid.grid-layout.landscape-grid,
#global-search-grid.grid-layout.landscape-grid {
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

#tving-grid.grid-layout.landscape-grid,
#wavve-grid.grid-layout.landscape-grid,
#ott-grid.grid-layout.landscape-grid {
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}

.loading-panel,
.empty-state,
:root[data-theme="light"] .loading-panel,
:root[data-theme="light"] .empty-state {
    min-height: 122px;
    border: 1px dashed var(--ui-border-strong);
    background: var(--ui-surface);
    color: var(--ui-text-secondary);
    box-shadow: none;
}

.loading-panel i {
    color: var(--ui-green);
}

/* Service menus */
.tving-layout {
    grid-template-columns: 204px minmax(0, 1fr);
    gap: 24px;
}

.tving-menu,
:root[data-theme="light"] .tving-menu.glass-card {
    top: 110px;
    padding: 9px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    box-shadow: none;
}

.tving-menu-scroll {
    gap: 3px;
}

.tving-menu-scroll button,
:root[data-theme="light"] .tving-menu-scroll button {
    min-height: 38px;
    justify-content: flex-start;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--ui-text-secondary);
    box-shadow: none;
    font-size: 0.82rem;
    text-align: left;
}

.tving-menu-scroll button:hover,
:root[data-theme="light"] .tving-menu-scroll button:hover {
    border-color: transparent;
    background: var(--ui-control);
    color: var(--ui-text);
}

.tving-menu-scroll button.active,
.segment-button.active,
.score-filter-chip.active,
:root[data-theme="light"] .tving-menu-scroll button.active,
:root[data-theme="light"] .segment-button.active,
:root[data-theme="light"] .score-filter-chip.active {
    border-color: transparent;
    background: var(--ui-control);
    color: var(--ui-text);
    box-shadow: inset 3px 0 0 var(--ui-green);
}

.tving-search input,
.tving-select,
.tving-cookie-box input,
.tving-cookie-box textarea,
.spotv-login-form input,
.access-form input,
.track-controls select,
:root[data-theme="light"] .tving-search input,
:root[data-theme="light"] .tving-select,
:root[data-theme="light"] .tving-cookie-box input,
:root[data-theme="light"] .tving-cookie-box textarea,
:root[data-theme="light"] .spotv-login-form input,
:root[data-theme="light"] .access-form input,
:root[data-theme="light"] .track-controls select {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface-soft);
    color: var(--ui-text);
    box-shadow: none;
}

.tving-search {
    position: relative;
    display: block;
}

.tving-search input {
    padding-right: 40px;
}

.tving-search button {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 38px;
    height: calc(100% - 2px);
    border: 0;
    border-left: 1px solid var(--ui-border);
    border-radius: 0 var(--ui-radius) var(--ui-radius) 0;
    background: transparent;
    color: var(--ui-text-secondary);
    cursor: pointer;
}

.tving-search button:hover {
    background: var(--ui-control-hover);
    color: var(--ui-cyan);
}

.tving-search input:focus,
.tving-select:focus,
.tving-cookie-box input:focus,
.tving-cookie-box textarea:focus,
.spotv-login-form input:focus,
.access-form input:focus {
    border-color: var(--ui-cyan);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-cyan) 18%, transparent);
}

.tving-title,
:root[data-theme="light"] .tving-title {
    color: var(--ui-text);
    font-weight: 800;
}

.spotv-auth-strip {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    box-shadow: none;
}

.spotv-auth-icon {
    border: 1px solid color-mix(in srgb, var(--ui-green) 34%, var(--ui-border));
    border-radius: var(--ui-radius);
    background: color-mix(in srgb, var(--ui-green) 10%, var(--ui-surface));
    color: var(--ui-green);
}

.spotv-auth-state strong {
    color: var(--ui-text);
}

.spotv-auth-state span {
    color: var(--ui-text-secondary);
}

.spotv-cookie-box,
.spotv-cookie-box[open] {
    border-color: var(--ui-border);
    background: var(--ui-surface-soft);
}

/* Scores */
.score-filter {
    gap: 7px;
}

.score-filter-chip {
    min-height: 34px;
    padding: 0 11px;
    color: var(--ui-text-secondary);
    font-size: 0.8rem;
}

.score-filter-chip span {
    background: var(--ui-surface);
    color: var(--ui-text);
}

.score-filter-chip.active span {
    background: var(--ui-green);
    color: #07130d;
}

.score-mode-toggle,
:root[data-theme="light"] .score-mode-toggle {
    padding: 3px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
}

.score-mode-toggle button {
    min-height: 30px;
    border-radius: 4px;
    color: var(--ui-text-secondary);
}

.score-mode-toggle button.active,
:root[data-theme="light"] .score-mode-toggle button.active {
    background: var(--ui-green);
    color: #07130d;
    box-shadow: none;
}

.score-grid {
    gap: 12px;
}

.score-card,
:root[data-theme="light"] .score-card {
    min-height: 192px;
    padding: 14px;
}

.score-card:hover {
    border-color: var(--ui-border-strong);
}

.score-card.live,
:root[data-theme="light"] .score-card.live {
    border-color: color-mix(in srgb, var(--ui-coral) 55%, var(--ui-border));
    background: color-mix(in srgb, var(--ui-coral) 6%, var(--ui-surface));
}

.score-card h3,
.score-team,
.score-value,
.standing-card-header h3,
.standing-table td,
:root[data-theme="light"] .score-card h3,
:root[data-theme="light"] .score-team,
:root[data-theme="light"] .score-value,
:root[data-theme="light"] .standing-card-header h3,
:root[data-theme="light"] .standing-table td {
    color: var(--ui-text);
}

.score-league,
.score-time,
.score-venue,
.score-note,
.standing-card-header span,
.standing-rank,
:root[data-theme="light"] .score-league,
:root[data-theme="light"] .score-time,
:root[data-theme="light"] .score-venue,
:root[data-theme="light"] .score-note,
:root[data-theme="light"] .standing-card-header span,
:root[data-theme="light"] .standing-rank {
    color: var(--ui-text-secondary) !important;
}

.score-row.winner,
.standing-points,
:root[data-theme="light"] .score-row.winner,
:root[data-theme="light"] .standing-points {
    color: var(--ui-green) !important;
}

.score-status,
.score-status.final,
:root[data-theme="light"] .score-status,
:root[data-theme="light"] .score-status.final {
    background: var(--ui-control);
    color: var(--ui-text-secondary);
}

.score-status.live {
    background: color-mix(in srgb, var(--ui-coral) 15%, var(--ui-control));
    color: var(--ui-coral);
}

.standing-card-header,
.standing-table th,
.standing-table td {
    border-color: var(--ui-border);
}

.standing-table th {
    color: var(--ui-text-secondary);
}

/* Netflix-style rails and World Cup */
.netflix-rail {
    margin-bottom: 32px;
}

.netflix-rail-header {
    margin-bottom: 10px;
}

.netflix-rail-header h3,
:root[data-theme="light"] .netflix-rail-header h3 {
    color: var(--ui-text);
    font-size: 1.02rem;
    font-weight: 800;
}

.netflix-rail-track {
    gap: 10px;
}

.netflix-rail-card {
    border-radius: var(--ui-radius);
}

.worldcup-highlights-section {
    background: transparent;
}

.worldcup-date-nav {
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
}

.worldcup-date-nav .icon-action,
.worldcup-date-nav .worldcup-today-button {
    min-height: 32px;
    height: 32px;
    border-color: transparent;
    background: transparent;
}

.worldcup-current-date {
    color: var(--ui-text);
    font-size: 0.82rem;
}

.worldcup-day.today {
    border-color: color-mix(in srgb, var(--ui-green) 42%, var(--ui-border));
    background: color-mix(in srgb, var(--ui-green) 4%, transparent);
}

.worldcup-day-header {
    border-bottom-color: var(--ui-border);
}

.worldcup-day-header h3,
.worldcup-match-score,
.worldcup-team strong {
    color: var(--ui-text);
}

.worldcup-day-header span,
.worldcup-day-header small,
.worldcup-highlight-channel {
    color: var(--ui-text-secondary);
}

.worldcup-highlight-card {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    box-shadow: none;
}

.worldcup-primary-highlight,
.worldcup-highlight-links :is(a, button) {
    border-radius: 4px;
}

.worldcup-primary-highlight:hover,
.worldcup-highlight-links :is(a, button):hover {
    background: var(--ui-control);
}

.worldcup-highlight-title {
    color: var(--ui-text);
}

/* Dialogs and access screen */
.modal {
    background: rgba(2, 4, 7, 0.82);
    backdrop-filter: blur(10px);
}

.modal-content,
:root[data-theme="light"] .modal-content {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    color: var(--ui-text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.video-wrapper {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: #000000;
}

#video-modal .close-modal,
.close-score-detail-modal,
.close-login-modal {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(7, 10, 14, 0.82);
    color: #ffffff;
    box-shadow: none;
}

.score-detail-board,
.score-detail-stat,
.score-detail-leader,
.score-detail-event,
:root[data-theme="light"] .score-detail-board,
:root[data-theme="light"] .score-detail-stat,
:root[data-theme="light"] .score-detail-leader,
:root[data-theme="light"] .score-detail-event {
    background: var(--ui-surface-soft);
}

.access-gate,
:root[data-theme="light"] .access-gate {
    background: var(--ui-page);
}

.access-card,
:root[data-theme="light"] .access-card {
    max-width: 410px;
    border: 1px solid var(--ui-border);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
}

.access-mark {
    border: 1px solid color-mix(in srgb, var(--ui-green) 38%, var(--ui-border));
    border-radius: var(--ui-radius);
    background: color-mix(in srgb, var(--ui-green) 10%, var(--ui-surface));
    color: var(--ui-green);
}

.access-card h1 {
    color: var(--ui-text);
    letter-spacing: 0;
}

.access-card p,
.access-status {
    color: var(--ui-text-secondary);
}

.app-update-notice,
:root[data-theme="light"] .app-update-notice {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface-raised);
    color: var(--ui-text);
    box-shadow: var(--ui-shadow);
}

/* Footer */
.glass-footer {
    border-top: 1px solid var(--ui-border);
    background: var(--ui-surface-soft);
}

.footer-brand p,
.footer-links,
.copyright {
    color: var(--ui-text-secondary);
}

.social-icons a {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-control);
}

.social-icons a:hover {
    border-color: var(--ui-green);
    background: var(--ui-control-hover);
    color: var(--ui-green);
}

/* Accessible interaction feedback */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--ui-cyan);
    outline-offset: 2px;
}

@media (max-width: 1080px) {
    #sports-view.app-view.active {
        grid-template-columns: 172px minmax(0, 1fr);
        gap: 18px;
        padding-inline: 20px;
    }
}

@media (max-width: 980px) {
    .header-content {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
    }

    .desktop-nav {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .global-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .header-actions {
        grid-column: 2;
        grid-row: 1;
    }

    #sports-view.app-view.active {
        display: block;
        width: 100%;
        padding: 0 0 36px;
    }

    .sports-command-rail {
        display: none;
    }

    #sports-view > section .container {
        width: 100%;
        padding-inline: 20px;
    }

    .tving-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .tving-menu {
        position: static;
        padding: 8px;
    }

    .tving-menu-scroll {
        display: flex;
        gap: 5px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tving-menu-scroll::-webkit-scrollbar {
        display: none;
    }

    .tving-menu-scroll button,
    :root[data-theme="light"] .tving-menu-scroll button {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 0 11px;
        white-space: nowrap;
        text-align: center;
    }

    .tving-menu-scroll button.active,
    :root[data-theme="light"] .tving-menu-scroll button.active {
        box-shadow: inset 0 -3px 0 var(--ui-green);
    }
}

@media (max-width: 768px) {
    .container,
    #sports-view > section .container {
        padding-inline: 14px;
    }

    .glass-header {
        padding: 8px 0 9px;
    }

    .logo {
        font-size: 0.98rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .desktop-nav,
    :root[data-theme="light"] .desktop-nav {
        gap: 5px;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .desktop-nav a,
    :root[data-theme="light"] .desktop-nav a {
        min-height: 34px;
        padding: 6px 11px;
        border: 1px solid var(--ui-border);
        background: var(--ui-surface);
    }

    .desktop-nav a.active,
    :root[data-theme="light"] .desktop-nav a.active {
        border-color: var(--ui-green);
        background: var(--ui-green);
    }

    .global-search {
        height: 38px;
    }

    .global-search input,
    .global-search button {
        height: 36px;
    }

    .section-padding {
        padding: 28px 0;
    }

    .section-header,
    #sports-view .section-header {
        align-items: flex-start;
        margin-bottom: 14px;
        padding-bottom: 11px;
    }

    .section-header h2,
    #sports-view .section-header h2 {
        font-size: 1.16rem;
    }

    .section-subtitle {
        font-size: 0.78rem;
    }

    #sports-view .score-ticker {
        min-height: 76px;
    }

    #sports-view .score-ticker-item {
        width: 154px;
        min-height: 62px;
    }

    #sports-view .grid-layout {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }

    #sports-view #channels .grid-layout,
    #sports-view #highlights .grid-layout {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    }

    #coupang-grid.grid-layout,
    #tving-grid.grid-layout,
    #wavve-grid.grid-layout,
    #ott-grid.grid-layout {
        grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
    }

    #coupang-grid.grid-layout.landscape-grid,
    #global-search-grid.grid-layout.landscape-grid {
        grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
    }

    #tving-grid.grid-layout.landscape-grid,
    #wavve-grid.grid-layout.landscape-grid,
    #ott-grid.grid-layout.landscape-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .worldcup-date-nav {
        width: 100%;
    }

    .worldcup-current-date {
        flex: 1;
        text-align: left;
    }

    .spotv-auth-strip {
        padding: 11px;
    }

    #video-modal .modal-content {
        border-radius: 0;
    }
}

@media (max-width: 520px) {
    .logo .highlight {
        display: none;
    }

    .header-actions {
        gap: 5px;
    }

    .theme-control {
        min-width: 38px;
        padding-inline: 8px;
    }

    .theme-control select {
        max-width: 64px;
        font-size: 0.76rem;
    }

    .color-assist-control {
        width: 38px;
    }

    .status-pill {
        display: none;
    }

    .header-actions .auth-button {
        max-width: 100px;
        padding-inline: 9px;
        font-size: 0.72rem;
    }

    .section-actions {
        flex-wrap: nowrap;
    }

    .view-mode-toggle .toggle-label {
        font-size: 0.72rem;
    }

    .card-content {
        padding: 10px 11px 11px;
    }

    .match-teams,
    .video-card h3 {
        font-size: 0.86rem;
    }

    .glass-footer {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
