* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-page: #F8F9FA;
    --bg-card: #FFFFFF;
    --text-main: #111111;
    --text-muted: #6C757D;
    --border-subtle: #F0F2F5;
    --border-line: #E5E5E5;
    --header-bg: #FFFFFF;
    --shadow-card: rgba(0, 0, 0, 0.04);
    --badge-bg: #EEF2F6;
    --badge-text: #334155;
    --progress-track: #E9ECEF;
    --placeholder-box: #F8F9FA;

    --brand-primary: #0066FF;
    --brand-secondary: #0052CC;
    --brand-underline: #111111;
    --brand-active-glow: rgba(0, 102, 255, 0.1);
}

body[data-league="premier-league"] {
    --brand-primary: #38003C;
    --brand-secondary: #00FF85;
    --brand-underline: #38003C;
    --brand-active-glow: rgba(56, 0, 60, 0.12);
}

body[data-league="la-liga"] {
    --brand-primary: #FF4B44;
    --brand-secondary: #141414;
    --brand-underline: #FF4B44;
    --brand-active-glow: rgba(255, 75, 68, 0.12);
}

body[data-league="serie-a"] {
    --brand-primary: #024486;
    --brand-secondary: #008FD7;
    --brand-underline: #024486;
    --brand-active-glow: rgba(255, 75, 68, 0.12);
}

body[data-league="ccnn"] {
    --brand-primary: #0066FF;
    --brand-secondary: #0052CC;
    --brand-underline: #111111;
    --brand-active-glow: rgba(0, 102, 255, 0.1);
}

body.dark-theme {
    --bg-page: #121316;
    --bg-card: #1C1E22;
    --text-main: #F1F3F5;
    --text-muted: #909296;
    --border-subtle: #2C2E33;
    --border-line: #2C2E33;
    --header-bg: #1A1B1E;
    --shadow-card: rgba(0, 0, 0, 0.25);
    --badge-bg: #25262B;
    --badge-text: #C1C2C5;
    --progress-track: #2C2E33;
    --placeholder-box: #17181C;
    --brand-underline: #FFFFFF;
}

body.dark-theme[data-league="premier-league"] {
    --brand-primary: #00FF85;
    --brand-secondary: #38003C;
    --brand-underline: #00FF85;
    --brand-active-glow: rgba(0, 255, 133, 0.15);
}

body.dark-theme[data-league="la-liga"] {
    --brand-primary: #FF4B44;
    --brand-secondary: #FF6E67;
    --brand-underline: #FF4B44;
    --brand-active-glow: rgba(255, 75, 68, 0.15);
}

body.dark-theme[data-league="serie-a"] {
    --brand-primary: #00A3E0;
    --brand-secondary: #024486;
    --brand-underline: #00A3E0;
    --brand-active-glow: rgba(0, 163, 224, 0.15);
}

body.dark-theme[data-league="ccnn"] {
    --brand-primary: #3385FF;
    --brand-secondary: #0066FF;
    --brand-underline: #3385FF;
    --brand-active-glow: rgba(51, 133, 255, 0.15);
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    padding-top: 70px;
    padding-bottom: 85px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Header */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    padding: 14px 16px 10px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    padding: 0;
}

.menu-btn span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 2px;
}

.header-brand {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 28px;
}

.header-spacer {
    width: 22px;
}

/* Plain UCL Audio Button */
.ucl-audio-btn {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #00E5FF;
    padding: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.ucl-audio-btn:hover {
    opacity: 0.85;
}

.ucl-audio-btn:active {
    transform: scale(0.9);
}

.ucl-audio-btn svg {
    width: 18px;
    height: 18px;
}

.header-single-brand .brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-main);
    margin-bottom: 5px;
}

.header-single-brand .underline {
    width: 120px;
    height: 2px;
    background-color: var(--brand-underline);
    margin: 0 auto;
}

.header-collab-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 32px;
}

.collab-brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-main);
    line-height: 1;
}

.collab-separator {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1;
}

.collab-league-logo {
    height: 28px;
    max-width: 90px;
    object-fit: contain;
    vertical-align: middle;
}

/* Side Drawer */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.side-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    max-width: 80vw;
    height: 100%;
    background-color: var(--bg-card);
    z-index: 2600;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.side-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.close-drawer-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 14px 10px;
    gap: 4px;
}

.drawer-link {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.drawer-link:active,
.drawer-link.active {
    background-color: var(--brand-active-glow);
    color: var(--brand-primary);
    font-weight: 600;
}

.drawer-divider {
    height: 1px;
    background-color: var(--border-subtle);
    margin: 8px 6px;
}

.drawer-settings-btn {
    color: var(--brand-primary);
    font-weight: 600;
}

.drawer-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    margin-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.drawer-theme-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.drawer-icon {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

.content {
    padding: 12px 14px;
}

.view-section {
    display: none !important;
}

.view-section.active {
    display: block !important;
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Home Dashboard Grid */
.home-grid-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 14px;
    align-items: start;
    margin-top: 4px;
}

@media (max-width: 340px) {
    .home-grid-container {
        grid-template-columns: 1fr;
    }
}

.home-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    padding: 16px 14px;
    box-shadow: 0 3px 12px var(--shadow-card);
    border: 1px solid var(--border-subtle);
}

.home-right-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.home-card-header.link-header {
    cursor: pointer;
}

.home-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.home-card-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 500;
}

.chevron-icon,
.chevron-down-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.home-top4-list {
    display: flex;
    flex-direction: column;
}

.home-team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.home-team-row:last-child {
    border-bottom: none;
}

.home-team-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-rank {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    width: 14px;
    text-align: center;
}

/* Logos: No circle frame/border */
.home-team-logo,
.table-team-logo,
.team-badge-circle,
.prediction-logo {
    width: 22px;
    height: 22px;
    border-radius: 0 !important;
    object-fit: contain;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    color: var(--text-main);
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    overflow: visible;
}

img.home-team-logo,
img.table-team-logo,
img.team-badge-circle,
img.prediction-logo {
    border: none !important;
    outline: none !important;
    border-radius: 0 !important;
    object-fit: contain;
}

.team-badge-circle {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
}

.prediction-logo {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
}

.home-team-abbr {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.03em;
}

.home-pts {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.home-table-more {
    margin-top: 12px;
    padding-top: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
}

.home-table-more:hover {
    color: var(--brand-primary);
}

.home-predictions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prediction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prediction-team-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.prediction-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prediction-pct {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    margin-left: 8px;
    flex-shrink: 0;
}

.home-season-card {
    padding: 16px 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.home-season-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    margin: 0;
}

/* Home Page Last 2 Matches Section */
.home-last-matches-section {
    margin-top: 16px;
}

.home-section-subtitle {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    padding-left: 2px;
}

.home-last-matches-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-last-match-card {
    background-color: var(--bg-card);
    border-radius: 14px;
    box-shadow: 0 2px 8px var(--shadow-card);
    border: 1px solid var(--border-subtle);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-last-match-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.home-last-match-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.home-last-match-row.winner-row {
    color: var(--brand-primary);
}

.home-last-match-scores {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    min-width: 30px;
}

.home-last-match-tag {
    font-size: 0.7rem;
    font-weight: 700;
    background-color: var(--badge-bg);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
}

/* Standings Table */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-card);
}

.standings-table {
    width: 100%;
    min-width: 580px;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: center;
}

.standings-table th,
.standings-table td {
    padding: 10px 6px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.standings-table th {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-line);
    font-size: 0.70rem;
    letter-spacing: 0.02em;
}

.standings-table .col-pos {
    width: 26px;
    font-weight: 600;
    color: var(--text-muted);
    padding-left: 8px;
    position: relative;
}

.standings-table tr.top-qual .col-pos::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background-color: var(--brand-primary);
    border-radius: 2px;
}

.standings-table .col-team {
    text-align: left;
    padding-left: 8px;
    padding-right: 14px;
    font-weight: 600;
    color: var(--text-main);
    width: auto;
}

.table-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.standings-table .col-pts {
    font-weight: 700;
    color: var(--brand-primary);
    text-align: center;
    padding: 10px 10px;
}

.standings-table .col-form {
    padding-left: 10px;
    padding-right: 14px;
    text-align: center;
    min-width: 145px;
}

.form-circles-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.form-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-circle svg {
    width: 10px;
    height: 10px;
}

.form-win {
    background-color: #2e7d32;
    border: 2px solid #2e7d32;
}

.form-draw {
    background-color: #8c98a4;
    border: 2px solid #8c98a4;
}

.form-loss {
    background-color: #e03131;
    border: 2px solid #e03131;
}

.form-empty {
    background-color: transparent;
    border: 2px solid #8c98a4;
}

/* Legends & League Trophy */
.legends-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.legend-card {
    background-color: var(--bg-card);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px var(--shadow-card);
    border: 1px solid var(--border-subtle);
}

.legend-card-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-square {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.uefa-square {
    background-color: var(--brand-primary);
}

.legend-text {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
}

.legend-item-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.league-trophy-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
}

.trophy-card-image-box {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    flex-shrink: 0;
    padding: 0;
}

.league-trophy-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.14));
}

.trophy-card-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.trophy-active-placeholder .trophy-cup-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.trophy-winner-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trophy-champion-label {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-primary);
}

.trophy-winner-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
}

.league-progress-card,
.group-stage-progress-card {
    padding: 16px 18px;
    margin-top: 14px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-text {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main);
}

.progress-pct {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--brand-primary);
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background-color: var(--progress-track);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--brand-primary);
    border-radius: 6px;
    transition: width 0.4s ease;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Matches Page: Tab Switcher */
.matches-tab-switcher {
    display: flex;
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 6px var(--shadow-card);
}

.matches-tab-btn {
    flex: 1;
    padding: 10px 0;
    font-size: 0.88rem;
    font-weight: 600;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    font-family: inherit;
}

.matches-tab-btn.active {
    background-color: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 102, 255, 0.25);
}

/* UCL Page: Tab Switcher & Knockout */
.ucl-tab-switcher {
    display: flex;
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 6px var(--shadow-card);
}

.ucl-tab-btn {
    flex: 1;
    padding: 10px 0;
    font-size: 0.88rem;
    font-weight: 600;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    font-family: inherit;
}

.ucl-tab-btn.active {
    background-color: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 102, 255, 0.45);
}

.ucl-panel {
    display: none;
}

.ucl-panel.active {
    display: block;
}

/* Knockout Bracket & Two-Leg Card Design */
.bracket-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bracket-round-block {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 2px 10px var(--shadow-card);
    border: 1px solid var(--border-subtle);
}

.bracket-round-title {
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand-primary);
    margin-bottom: 12px;
}

.bracket-match-card {
    background-color: var(--bg-page);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.bracket-match-card:last-child {
    margin-bottom: 0;
}

.bracket-match-card:hover {
    border-color: var(--brand-primary);
}

.bracket-match-card:active {
    transform: scale(0.99);
}

.bracket-card-top-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.ucl-theme-active .bracket-card-top-info {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.bracket-leg-indicator {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.bracket-aggregate-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
}

.bracket-team-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
}

.bracket-team-line.winner {
    font-weight: 700;
    color: var(--text-main);
}

.bracket-team-line.winner .bracket-team-name {
    color: var(--brand-primary);
}

.bracket-team-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bracket-team-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.bracket-score-val {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    min-width: 24px;
    text-align: right;
    letter-spacing: 0.02em;
}

/* Penalty Shootout Entry Styling in Modal */
.bracket-penalties-box {
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    background-color: rgba(0, 102, 255, 0.06);
    border: 1px dashed var(--brand-primary);
}

body.ucl-theme-active .bracket-penalties-box {
    background-color: rgba(0, 229, 255, 0.1);
    border-color: #00E5FF;
}

.penalties-box-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-primary);
    margin-bottom: 10px;
}

body.ucl-theme-active .penalties-box-title {
    color: #00E5FF;
}

/* THEMED UCL STYLING: Direct relative path */
body.ucl-theme-active {
    background-image: 
        linear-gradient(rgba(4, 11, 36, 0.86), rgba(4, 11, 36, 0.86)),
        url('./images/Themes/ucl-background.webp');
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #FFFFFF;
}

/* Header bar on UCL */
body.ucl-theme-active .top-header {
    background-color: #030C28 !important;
    border-bottom: 1px solid rgba(0, 85, 255, 0.28);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

body.ucl-theme-active .top-header .brand-title,
body.ucl-theme-active .top-header .collab-brand-text,
body.ucl-theme-active .top-header .collab-separator {
    color: #FFFFFF !important;
}

body.ucl-theme-active .top-header .underline {
    background-color: #0055FF !important;
}

body.ucl-theme-active .menu-btn span {
    background-color: #FFFFFF !important;
}

/* Bottom Navigation Bar */
body.ucl-theme-active .bottom-nav {
    background-color: #030C28 !important;
    border-top: 1px solid rgba(0, 85, 255, 0.28) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
}

body.ucl-theme-active .bottom-nav .nav-item {
    color: #8EB3FF !important;
}

body.ucl-theme-active .bottom-nav .nav-item.active {
    color: #00E5FF !important;
}

body.ucl-theme-active #ucl-view .matches-title {
    color: #FFFFFF !important;
}

/* UCL Switcher */
body.ucl-theme-active .ucl-tab-switcher {
    background-color: rgba(3, 12, 40, 0.88);
    border: 1px solid rgba(0, 85, 255, 0.35);
    backdrop-filter: blur(8px);
}

body.ucl-theme-active .ucl-tab-btn {
    color: #8EB3FF;
}

body.ucl-theme-active .ucl-tab-btn.active {
    background: linear-gradient(135deg, #0044FF 0%, #002299 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 68, 255, 0.45);
}

/* UCL Point Table */
body.ucl-theme-active #ucl-view .table-container {
    background-color: #0033CC;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 20, 80, 0.4);
    border: 1px solid rgba(0, 85, 255, 0.35);
}

body.ucl-theme-active #ucl-view .standings-table {
    color: #FFFFFF;
}

body.ucl-theme-active #ucl-view .standings-table th {
    background-color: #002699;
    color: #D6E4FF;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

body.ucl-theme-active #ucl-view .standings-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
}

body.ucl-theme-active #ucl-view .standings-table .col-pos {
    color: #B8D4FF;
}

body.ucl-theme-active #ucl-view .standings-table tr.top-qual .col-pos::before {
    background-color: #00E5FF;
}

body.ucl-theme-active #ucl-view .standings-table .col-team {
    color: #FFFFFF;
}

body.ucl-theme-active #ucl-view .standings-table .col-pts {
    color: #00E5FF;
    font-weight: 800;
}

/* UCL Group Progress Card */
body.ucl-theme-active #ucl-view .group-stage-progress-card {
    background: linear-gradient(180deg, #02123B 0%, #010B24 100%);
    border: 1px solid rgba(0, 85, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 10, 40, 0.4);
}

body.ucl-theme-active #ucl-view .group-stage-progress-card .progress-text {
    color: #FFFFFF;
}

body.ucl-theme-active #ucl-view .group-stage-progress-card .progress-pct {
    color: #00E5FF;
}

body.ucl-theme-active #ucl-view .group-stage-progress-card .progress-bar-track {
    background-color: #051A4D;
}

body.ucl-theme-active #ucl-view .group-stage-progress-card .progress-bar-fill {
    background: linear-gradient(90deg, #0055FF, #00E5FF);
}

body.ucl-theme-active #ucl-view .group-stage-progress-card .progress-stats {
    color: #8EB3FF;
}

body.ucl-theme-active #ucl-view .group-stage-progress-card .progress-stats strong {
    color: #FFFFFF;
}

/* UCL Knockout Rounds */
body.ucl-theme-active #ucl-view .bracket-round-block {
    background: linear-gradient(180deg, #02123B 0%, #010B24 100%);
    border: 1px solid rgba(0, 85, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 10, 40, 0.4);
}

body.ucl-theme-active #ucl-view .bracket-round-title {
    color: #00E5FF;
}

body.ucl-theme-active #ucl-view .bracket-match-card {
    background-color: rgba(0, 40, 140, 0.45);
    border: 1px solid rgba(0, 85, 255, 0.3);
}

body.ucl-theme-active #ucl-view .bracket-leg-indicator,
body.ucl-theme-active #ucl-view .bracket-aggregate-label {
    color: #9EC0FF;
}

body.ucl-theme-active #ucl-view .bracket-team-name {
    color: #FFFFFF;
}

body.ucl-theme-active #ucl-view .bracket-team-line.winner .bracket-team-name {
    color: #00E5FF;
}

body.ucl-theme-active #ucl-view .bracket-score-val {
    color: #FFFFFF;
}

/* UCL Knockout Trophy Card */
.ucl-knockout-trophy-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    margin-top: 14px;
    background-color: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 10px var(--shadow-card);
}

body.ucl-theme-active #ucl-view .ucl-knockout-trophy-card {
    background: linear-gradient(180deg, #02123B 0%, #010B24 100%);
    border: 1px solid rgba(0, 85, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 10, 40, 0.4);
}

body.ucl-theme-active #ucl-view .ucl-knockout-trophy-card .trophy-cup-name {
    color: #FFFFFF;
}

body.ucl-theme-active #ucl-view .ucl-knockout-trophy-card .trophy-winner-name {
    color: #00E5FF;
}

/* Matches Cards */
.matches-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.match-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 2px 10px var(--shadow-card);
    display: flex;
    align-items: center;
    padding: 18px 16px;
    position: relative;
}

.match-type-badge {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--badge-bg);
    color: var(--brand-primary);
}

.match-teams {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-name {
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-main);
}

.team-score-slot {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    padding-right: 8px;
    min-width: 32px;
    justify-content: flex-end;
}

.winner-arrow {
    display: inline-block;
    font-size: 0.65rem;
    color: var(--text-main);
    transform: scaleY(1.2);
}

.match-divider {
    width: 1px;
    height: 52px;
    background-color: var(--border-subtle);
    margin: 0 16px;
}

.match-action-col {
    min-width: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    padding: 6px 0;
}

.match-vs-tag {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-transform: uppercase;
}

.match-ft-tag {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.click-hint {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.fab-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--brand-primary);
    color: #ffffff;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 300;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.fab-btn:active {
    transform: scale(0.95);
}

/* Managers List */
.managers-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.manager-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 2px 10px var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.manager-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.manager-team-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.manager-team-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.manager-person-name {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.manager-playstyle-name {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.trophy-placeholder-box {
    width: 100%;
    min-height: 80px;
    background-color: var(--placeholder-box);
    border-radius: 12px;
    border: 1px solid var(--border-line);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.trophy-showcase-empty {
    width: 100%;
    text-align: center;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-style: italic;
}

.trophy-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 48px;
}

.trophy-badge-image {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.12));
}

.trophy-badge-count {
    font-size: 0.70rem;
    font-weight: 800;
    color: var(--brand-primary);
    background-color: var(--badge-bg);
    padding: 1px 7px;
    border-radius: 8px;
}

.trophy-counter-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--bg-page);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid var(--border-line);
}

.trophy-counter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trophy-label-with-img {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trophy-modal-thumb {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.trophy-counter-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
}

.counter-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-step {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border-line);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-step:active {
    background-color: var(--border-subtle);
}

.counter-input-row .styled-input-num {
    width: 45px;
    height: 28px;
    padding: 2px;
    font-size: 0.85rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: 16px;
    width: 88%;
    max-width: 380px;
    padding: 22px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    color: var(--text-main);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group select,
.styled-text-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-line);
    border-radius: 8px;
    font-size: 0.88rem;
    background-color: var(--bg-page);
    color: var(--text-main);
    outline: none;
    font-family: inherit;
}

/* Logo Picker & Live Preview Styles */
.logo-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-select-field {
    flex: 1;
}

.logo-preview-box {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background-color: var(--bg-page);
    border: 1px solid var(--border-line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-picker-thumb {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.score-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.score-team-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
}

.score-input-row input {
    width: 65px;
    padding: 8px;
    font-size: 1.1rem;
    text-align: center;
    border: 1px solid var(--border-line);
    border-radius: 8px;
    font-weight: 600;
    background-color: var(--bg-page);
    color: var(--text-main);
    outline: none;
}

.score-input-row input:focus {
    border-color: var(--brand-primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
}

/* Commissioner Dashboard */
.dashboard-header {
    margin-bottom: 16px;
    padding-left: 2px;
}

.dashboard-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 10px var(--shadow-card);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.badge-pill {
    background-color: var(--badge-bg);
    color: var(--badge-text);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.form-inline-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.form-inline-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
}

.styled-select {
    padding: 8px 12px;
    border: 1px solid var(--border-line);
    border-radius: 8px;
    background-color: var(--bg-page);
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    outline: none;
}

.styled-input-num {
    width: 70px;
    padding: 8px 10px;
    border: 1px solid var(--border-line);
    border-radius: 8px;
    background-color: var(--bg-page);
    color: var(--text-main);
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    outline: none;
}

.styled-input-num:focus,
.styled-select:focus,
.styled-text-input:focus {
    border-color: var(--brand-primary);
}

.team-creation-form {
    margin-bottom: 16px;
    background-color: var(--bg-page);
    padding: 14px;
    border-radius: 12px;
}

.btn-accent {
    background-color: var(--brand-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.btn-accent:active {
    opacity: 0.85;
}

.team-list-section {
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
}

.team-list {
    list-style: none;
}

.team-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 6px;
    border-bottom: 1px solid var(--border-subtle);
}

.team-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
}

.team-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-item-action {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 6px;
}

.btn-edit {
    color: var(--brand-primary);
}

.btn-del {
    color: #ff3b30;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--brand-primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.progress-block {
    margin-top: 16px;
    background-color: var(--bg-page);
    border-radius: 12px;
    padding: 14px;
}

.danger-card {
    border: 1px solid #ffe3e3;
}

body.dark-theme .danger-card {
    border-color: #5c1d1d;
}

.danger-title {
    color: #d32f2f;
}

.danger-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-warning {
    background-color: #fff1f0;
    color: #e03131;
    border: 1px solid #ffc9c9;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}

body.dark-theme .btn-warning {
    background-color: #2b1d1e;
    border-color: #61282a;
    color: #ff8787;
}

.btn-warning:active {
    opacity: 0.85;
}

.btn-danger {
    background-color: #ff3b30;
    color: #ffffff;
    border: none;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}

.btn-danger:active {
    opacity: 0.85;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: var(--header-bg);
    border-top: 1px solid var(--border-line);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-item {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    flex: 1;
    padding: 8px 0;
}

.nav-icon {
    width: 22px;
    height: 22px;
}

.nav-label {
    font-size: 0.70rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--brand-primary);
}

.nav-item.active .nav-label {
    font-weight: 600;
}
