body {
    min-height: 100vh;
    color: #f2f3f5;
    background:
        radial-gradient(circle at top left, rgba(215, 88, 42, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(230, 184, 66, 0.18), transparent 22%),
        linear-gradient(180deg, #0c161d 0%, #081015 100%);
}

a {
    color: #f7d35b;
}

.site-shell {
    min-height: 100vh;
}

.navbar {
    background: rgba(8, 14, 18, 0.78);
    backdrop-filter: blur(16px);
}

.brand-mark {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-link,
.navbar-brand {
    color: #f8f9fa;
}

.nav-link:hover,
.navbar-brand:hover {
    color: #f7d35b;
}

.card-panel {
    padding: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1.35rem;
    background: rgba(11, 18, 24, 0.88);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.hero-panel {
    padding: 2rem;
}

.auth-shell {
    padding-top: 1.25rem;
}

.auth-shell-single {
    min-height: calc(100vh - 11rem);
    align-items: center;
}

.auth-card {
    padding: 1.9rem;
}

.eyebrow {
    margin: 0;
    color: #f7d35b;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rules-list {
    padding-left: 1.25rem;
}

.rules-list li + li {
    margin-top: 0.55rem;
}

.team-flag {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: cover;
    margin-right: 0.35rem;
    vertical-align: text-bottom;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.team-flag-large {
    width: 42px;
    height: 42px;
    margin-right: 0;
    margin-bottom: 0.5rem;
}

.status-pill,
.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.08);
}

.status-scheduled {
    background: rgba(247, 211, 91, 0.18);
    color: #f7d35b;
}

.status-live {
    background: rgba(52, 152, 219, 0.18);
    color: #76c8ff;
}

.status-finished {
    background: rgba(46, 204, 113, 0.18);
    color: #7ef2ab;
}

.match-meta,
.prediction-summary,
.countdown {
    color: #c8d0d6;
}

.match-card-compact {
    padding: 1.15rem 1.2rem;
    position: relative;
    overflow: visible;
}

.dashboard-feed {
    width: min(100%, 960px);
    margin-inline: auto;
}

.dashboard-feed > .row > [id^="match-"] {
    scroll-margin-top: 1rem;
}

.match-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.match-card-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.55rem;
}

.team-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.team-side-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.team-side-rail-wrap {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.match-divider {
    color: #90a0aa;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.match-result-divider {
    color: #f7d35b;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.match-date-line {
    margin-bottom: 1rem;
    text-align: center;
    color: #9fb0b9;
}

.match-card-bottom {
    margin-top: 0.15rem;
}

.match-card-prediction {
    min-width: 0;
}

.group-rank-rail {
    width: 5.5rem;
    height: 7rem;
    margin-left: 0.8rem;
    display: grid;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 0.22rem;
    padding: 0.24rem;
    border-radius: 1rem;
    background: rgba(8, 14, 18, 0.96);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.group-rank-item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.45rem;
    min-height: 0;
    padding: 0.08rem 0.42rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.group-rank-item.is-match-team {
    border-color: rgba(247, 211, 91, 0.28);
    background: rgba(247, 211, 91, 0.08);
}

.group-rank-points {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.group-rank-points {
    font-size: 0.95rem;
    text-align: right;
}

.group-rank-flag,
.group-rank-fallback {
    width: 20px;
    height: 20px;
    border-radius: 999px;
}

.group-rank-flag {
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.group-rank-emoji,
.group-rank-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.group-rank-emoji {
    width: 20px;
    font-size: 0.95rem;
}

.group-rank-fallback {
    background: rgba(255, 255, 255, 0.08);
    color: #f2f3f5;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.match-inline-score {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

.match-inline-score strong {
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    line-height: 1;
}

.match-inline-form {
    margin-top: 1rem;
}

.match-inline-closed {
    margin-top: 1rem;
}

.match-card-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meta-box {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.04);
}

.meta-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #8fa0ab;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-stack {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 1.5rem;
}

.compact-panel {
    background: rgba(15, 23, 29, 0.92);
}

.winner-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.winner-chip {
    padding: 0.7rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #e8edf1;
    font-weight: 600;
}

.winner-chip.active {
    border-color: rgba(247, 211, 91, 0.6);
    background: rgba(247, 211, 91, 0.16);
    color: #f7d35b;
}

.score-submit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.score-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
}

.compact-score-input {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
}

.score-separator {
    color: #95a5ae;
    font-size: 1.2rem;
    font-weight: 700;
}

.compact-submit-button {
    min-width: 110px;
}

.locked-prediction-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem 0.7rem;
    padding: 0.15rem 0;
    border-radius: 0;
    background: transparent;
    text-align: center;
}

.locked-prediction-strip strong {
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: 0.03em;
}

.locked-points {
    color: #f7d35b;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
}

.compact-card-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.85rem;
}

.lock-banner {
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: rgba(247, 211, 91, 0.14);
    color: #f7d35b;
    font-weight: 600;
}

.table-dark {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
    color: #f2f3f5;
}

.form-control,
.form-select {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #f8f9fa;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(247, 211, 91, 0.6);
    box-shadow: 0 0 0 0.2rem rgba(247, 211, 91, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.form-control::placeholder {
    color: rgba(248, 249, 250, 0.55);
}

.btn-warning {
    color: #11161d;
    font-weight: 700;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
}

.back-to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 1030;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid rgba(247, 211, 91, 0.42);
    border-radius: 999px;
    background: rgba(8, 14, 18, 0.94);
    color: #f7d35b;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.75rem);
    transition: opacity 160ms ease, transform 160ms ease;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.alert {
    border: none;
}

@media (max-width: 991px) {
    .auth-shell {
        padding-top: 0;
    }

    .auth-shell-single {
        min-height: auto;
        align-items: stretch;
    }

    .sidebar-stack {
        position: static;
    }

    .match-card-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 767px) {
    .card-panel,
    .hero-panel {
        padding: 0.9rem;
        border-radius: 1rem;
    }

    .summary-chip,
    .status-pill {
        width: fit-content;
    }

    .match-card-topline {
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .match-card-teams {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.35fr);
        gap: 0.35rem;
    }

    .team-side h2,
    .team-side-main h2 {
        max-width: 100%;
        font-size: clamp(0.82rem, 4vw, 1.15rem);
        line-height: 1.1;
        overflow-wrap: anywhere;
    }

    .team-side-rail-wrap {
        flex-direction: row;
        gap: clamp(0.3rem, 2vw, 0.75rem);
    }

    .team-flag-large {
        width: clamp(30px, 9vw, 38px);
        height: clamp(30px, 9vw, 38px);
        margin-bottom: 0.3rem;
    }

    .match-divider {
        font-size: 0.72rem;
    }

    .match-result-divider {
        font-size: 1rem;
    }

    .winner-picker {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.3rem;
    }

    .winner-chip {
        min-width: 0;
        padding: 0.55rem 0.25rem;
        font-size: clamp(0.7rem, 3vw, 0.88rem);
        overflow-wrap: anywhere;
    }

    .group-rank-rail {
        width: clamp(3.7rem, 18vw, 4.8rem);
        height: 6rem;
        margin-left: 0;
        grid-template-rows: repeat(4, minmax(0, 1fr));
        grid-template-columns: 1fr;
        gap: 0.15rem;
        padding: 0.2rem;
    }

    .group-rank-item {
        grid-template-columns: auto 1fr;
        gap: 0.25rem;
        padding: 0.05rem 0.28rem;
    }

    .group-rank-flag,
    .group-rank-fallback {
        width: 16px;
        height: 16px;
    }

    .group-rank-points {
        font-size: 0.78rem;
    }

    .match-date-line {
        margin-bottom: 0.75rem;
        font-size: 0.85rem;
    }

    .score-submit-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.4rem;
    }

    .compact-submit-button {
        min-width: 76px;
        padding-inline: 0.65rem;
    }

    .compact-score-input {
        min-width: 0;
        padding-inline: 0.35rem;
        font-size: 0.9rem;
    }

    .locked-prediction-strip strong {
        font-size: 1.35rem;
    }

    .back-to-top {
        width: 2.85rem;
        height: 2.85rem;
        font-size: 0.8rem;
    }
}
