:root {
    --fd-bg: #0b0f14;
    --fd-surface: #131a22;
    --fd-border: rgba(255, 255, 255, 0.09);
    --fd-accent: #0d6efd;
    --fd-accent-2: #20c997;
}

html {
    color-scheme: dark;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--fd-bg);
    background-image:
        radial-gradient(900px 420px at 15% -5%, rgba(13, 110, 253, 0.16), transparent 65%),
        radial-gradient(900px 420px at 85% -5%, rgba(32, 201, 151, 0.10), transparent 65%);
    background-repeat: no-repeat;
}

main {
    flex: 1 0 auto;
}

.navbar {
    background-color: rgba(11, 15, 20, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--fd-border);
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.65);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #fff;
}

.navbar .nav-link.active {
    color: var(--fd-accent-2);
}

.brand-dot {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-2));
    margin-right: 0.5rem;
    box-shadow: 0 0 8px rgba(32, 201, 151, 0.6);
}

.site-title {
    background: linear-gradient(90deg, #4d9fff, var(--fd-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-glow {
    background-color: var(--fd-surface);
    border: 1px solid var(--fd-border);
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.card-glow > .card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--fd-border);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.league-card {
    position: relative;
    display: block;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--fd-border);
    background: var(--fd-surface);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.league-card:hover,
.league-card:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(32, 201, 151, 0.55);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.5);
    outline: none;
}

.league-img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.league-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    background: linear-gradient(to top, rgba(5, 8, 12, 0.92) 0%, rgba(5, 8, 12, 0.35) 45%, transparent 70%);
}

.league-name {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.league-cta {
    color: var(--fd-accent-2);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.team-crest-xs {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.team-crest-sm {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.team-crest-lg {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.standings-table,
.matches-table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--fd-border);
    --bs-table-color: #dfe5ec;
    font-size: 0.875rem;
}

.standings-table thead th,
.matches-table thead th {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.standings-table td,
.matches-table td {
    vertical-align: middle;
}

.points {
    color: var(--fd-accent-2);
}

.team-cell {
    min-width: 150px;
}

.match-team {
    max-width: 150px;
}

.team-highlight td {
    background-color: rgba(13, 110, 253, 0.15) !important;
}

.pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.7rem;
    padding: 0 0.35rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.8);
}

.pos-badge.zone-cl {
    background: rgba(25, 135, 84, 0.85);
    color: #fff;
}

.pos-badge.zone-el {
    background: rgba(13, 110, 253, 0.85);
    color: #fff;
}

.pos-badge.zone-rel {
    background: rgba(220, 53, 69, 0.85);
    color: #fff;
}

.form-dots {
    display: inline-flex;
    gap: 3px;
}

.form-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
}

.form-dot.form-w,
.form-dot.zone-cl {
    background: #198754;
}

.form-dot.form-d {
    background: #ffc107;
}

.form-dot.form-l,
.form-dot.zone-rel {
    background: #dc3545;
}

.form-dot.zone-el {
    background: #0d6efd;
}

.standings-legend {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.result-badge {
    font-size: 0.7rem;
    padding: 0.25em 0.55em;
}

.result-badge.result-w {
    background: #198754;
}

.result-badge.result-d {
    background: #6c757d;
}

.result-badge.result-l {
    background: #dc3545;
}

.site-footer {
    border-top: 1px solid var(--fd-border);
    background: rgba(11, 15, 20, 0.6);
}

.site-footer a {
    color: var(--fd-accent-2);
    text-decoration: none;
}

.header-link {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
}

.header-link:hover,
.header-link:focus-visible {
    color: var(--fd-accent-2);
}

.squad-group .list-group-item {
    --bs-list-group-bg: transparent;
    --bs-list-group-color: #dfe5ec;
    --bs-list-group-border-color: var(--fd-border);
    padding: 0.65rem 1rem;
}

.player-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-row:hover {
    --bs-list-group-bg: rgba(255, 255, 255, 0.04);
}

.shirt-number {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}

.player-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.player-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.player-meta {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.select2-container--bootstrap-5 .select2-selection {
    background-color: var(--fd-surface);
    border: 1px solid var(--fd-border);
    color: #dfe5ec;
    min-height: calc(2.375rem + 2px);
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #dfe5ec;
    line-height: 2.375rem;
}

.select2-container--bootstrap-5 .select2-selection .select2-selection__placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.select2-container--bootstrap-5 .select2-dropdown {
    background-color: var(--fd-surface);
    border-color: var(--fd-border);
}

.select2-container--bootstrap-5 .select2-results__option {
    color: #dfe5ec;
}

.select2-container--bootstrap-5 .select2-results__option--selectable.select2-results__option--highlighted {
    background-color: rgba(13, 110, 253, 0.85);
    color: #fff;
}

@media (max-width: 575.98px) {
    .league-img {
        height: 140px;
    }

    .standings-table,
    .matches-table {
        font-size: 0.8rem;
    }
}
