:root {
    --bg-basis: #FFFFFF;
    --bg-header: rgba(255, 255, 255, 0.95);
    --tekst-basis: #0F1419;
    --tekst-gedempt: #536471;
    --randen: #EFF3F4;
    --blauw: #1D9BF0;
    --selectie-bg: #F7F9F9;
    --winst: #00BA7C;
    --verlies: #F91880;
    --gelijk: #FFD400;

    /* Set primary color variables to var(--blauw) */
    --bs-primary: var(--blauw);
    --bs-primary-rgb: 29, 155, 240;
    --bs-link-color: var(--blauw);
    --bs-link-hover-color: #1a8cd8;
    --bs-primary-bg-subtle: rgba(29, 155, 240, 0.1);
    --bs-primary-border-subtle: rgba(29, 155, 240, 0.25);
    --bs-primary-text-emphasis: var(--blauw);
}

body {
    background-color: var(--bg-basis);
    color: var(--tekst-basis);
    font-family: -apple-system, sans-serif;
    margin: 0;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

.btn-gepland-no-hover:hover,
.btn-gepland-no-hover:focus,
.btn-gepland-no-hover:active {
    background: rgba(29, 155, 240, 0.08) !important;
    color: var(--blauw) !important;
    border-color: rgba(29, 155, 240, 0.25) !important;
    box-shadow: none !important;
}

.text-primary {
    color: var(--blauw) !important;
}

.bg-primary {
    background-color: var(--blauw) !important;
}

.border-primary {
    border-color: var(--blauw) !important;
}

.btn-primary {
    background-color: var(--blauw) !important;
    border-color: var(--blauw) !important;
    border-radius: 999px;
    font-weight: bold;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #1a8cd8 !important;
    border-color: #1a8cd8 !important;
}

.btn-outline-primary {
    color: var(--blauw) !important;
    border-color: var(--blauw) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--blauw) !important;
    border-color: var(--blauw) !important;
    color: #ffffff !important;
}

.bg-primary-subtle {
    background-color: rgba(29, 155, 240, 0.12) !important;
}

.border-primary-subtle {
    border-color: rgba(29, 155, 240, 0.3) !important;
}

.nav-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--randen);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px)) 0;
    z-index: 1001;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--tekst-basis);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    flex: 1 0 auto;
    min-width: 56px;
    padding: 4px 6px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.nav-btn.active {
    color: var(--blauw);
    font-weight: bold;
}

@media (min-width: 992px) {
    .app-wrapper {
        display: flex;
        justify-content: center;
    }

    .nav-container {
        position: sticky;
        top: 0;
        height: 100vh;
        width: 260px;
        flex-direction: column;
        justify-content: flex-start;
        padding: 30px 20px;
        border-right: 1px solid var(--randen);
        border-top: none;
    }

    .nav-btn {
        flex-direction: row;
        font-size: 1.1rem;
        padding: 12px 20px;
        border-radius: 999px;
        margin-bottom: 8px;
        flex: none;
        width: 100%;
        text-align: left;
    }

    .main-content {
        max-width: 700px;
        width: 100%;
        border-right: 1px solid var(--randen);
        min-height: 100vh;
    }
}

.header-blur {
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--randen);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.seizoen-item {
    padding: 15px;
    border-bottom: 1px solid var(--randen);
    cursor: pointer;
    border-left: 4px solid transparent;
}

.seizoen-item.is-selected {
    background-color: var(--selectie-bg);
    border-left-color: var(--blauw);
}

.match-header {
    padding: 15px;
    border-bottom: 1px solid var(--randen);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-details {
    display: none;
    background: #F8F9F9;
    padding: 15px;
    border-bottom: 1px solid var(--randen);
    font-size: 0.9rem;
}

.blok-groep {
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 2px solid var(--blauw);
}

.badge-result {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.res-w {
    color: var(--winst);
    background: rgba(0, 186, 124, 0.1);
}

.res-v {
    color: var(--verlies);
    background: rgba(249, 24, 128, 0.1);
}

.res-g {
    color: var(--gelijk);
    background: rgba(255, 212, 0, 0.1);
}

.afwijkend-box {
    background-color: #f0f3f4;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--randen);
}

.speler-grid-btn {
    background: #fff;
    border: 1px solid var(--randen);
    border-radius: 12px;
    padding: 12px 5px;
    font-weight: bold;
    width: 48%;
    margin-bottom: 10px;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background-color: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-transition {
    transition: opacity 0.3s ease-in-out;
}

/* Tournament & Bracket Styling */
.tournament-card {
    background: #ffffff;
    border: 1px solid var(--randen);
    border-radius: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tournament-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.badge-tournament-type {
    background: rgba(29, 155, 240, 0.08);
    color: var(--blauw);
    border: 1px solid rgba(29, 155, 240, 0.2);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 3px 10px;
    white-space: nowrap;
    display: inline-block;
}
.badge-tournament-loc {
    background: var(--selectie-bg);
    color: var(--tekst-gedempt);
    border: 1px solid var(--randen);
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 3px 10px;
    white-space: nowrap;
    display: inline-block;
}
.poule-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}
.custom-nav-tabs {
    border-bottom: 1px solid #e2e8f0 !important;
    gap: 4px;
}
.custom-nav-tabs .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1D9BF0;
    background: transparent;
    border: 1px solid transparent;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 10px 22px;
    margin-bottom: -1px;
    transition: all 0.15s ease-in-out;
}
.custom-nav-tabs .nav-link.active {
    color: #0f172a !important;
    background-color: #ffffff !important;
    border-color: #cbd5e1 #cbd5e1 #ffffff !important;
}
.custom-nav-tabs .nav-link i {
    font-size: 1.1rem;
}
.poule-card-header {
    background: #ebf3fe !important;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px 20px;
}
.poule-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}
.poule-table th {
    background: #ffffff !important;
    color: #64748b !important;
    text-transform: uppercase;
    font-size: 0.725rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 12px 10px;
    vertical-align: middle;
}
.poule-table td {
    padding: 14px 10px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.875rem;
}
/* Highlighted PTS Column matching Bootstrap / FotMob theme */
.poule-table th.pts-col,
.poule-table td.pts-col {
    background: #1d9bf0 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-align: center !important;
    width: 65px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}
.poule-table th.pts-col {
    font-size: 0.75rem !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.poule-table td.pts-col {
    font-size: 0.95rem !important;
}
.row-our-team {
    background-color: rgba(29, 155, 240, 0.04) !important;
}
.row-our-team td:not(.pts-col) {
    font-weight: 700 !important;
    color: #0f172a !important;
}
.badge-our-team {
    background: rgba(29, 155, 240, 0.12);
    color: var(--blauw);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
}
.btn-score-pill {
    background: rgba(29, 155, 240, 0.08);
    color: var(--blauw);
    border: 1px solid rgba(29, 155, 240, 0.2);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 12px;
    transition: all 0.15s ease;
}
.btn-score-pill:hover {
    background: var(--blauw);
    color: #ffffff;
}
.btn-score-w {
    background: rgba(0, 186, 124, 0.12) !important;
    color: #00ba7c !important;
    border: 1px solid rgba(0, 186, 124, 0.3) !important;
}
.btn-score-w:hover {
    background: #00ba7c !important;
    color: #ffffff !important;
}
.btn-score-g {
    background: rgba(255, 212, 0, 0.18) !important;
    color: #b48000 !important;
    border: 1px solid rgba(255, 212, 0, 0.4) !important;
}
.btn-score-g:hover {
    background: #FFD400 !important;
    color: #000000 !important;
}
.btn-score-v {
    background: rgba(249, 24, 128, 0.12) !important;
    color: #f91880 !important;
    border: 1px solid rgba(249, 24, 128, 0.3) !important;
}
.btn-score-v:hover {
    background: #f91880 !important;
    color: #ffffff !important;
}
.bracket-wrapper {
    display: flex;
    gap: 3.5rem;
    overflow-x: auto;
    padding: 1.5rem 1rem;
    position: relative;
}
.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    min-width: 230px;
    position: relative;
    z-index: 2;
}
.bracket-round-title {
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--tekst-gedempt);
    margin-bottom: 1rem;
    letter-spacing: 0.05rem;
}
.bracket-match {
    background: #fff;
    border: 1px solid var(--randen);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 12px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    position: relative;
    z-index: 2;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bracket-match:hover {
    border-color: var(--blauw);
    box-shadow: 0 4px 10px rgba(29, 155, 240, 0.1);
}
.bracket-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.9rem;
}
.bracket-team.winner {
    font-weight: 700;
    color: var(--tekst-basis);
}
.bracket-team.loser {
    color: var(--tekst-gedempt);
    opacity: 0.85;
}
.bracket-score {
    background: var(--selectie-bg);
    border: 1px solid var(--randen);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tekst-basis);
}
.bracket-score-win {
    background: rgba(0, 186, 124, 0.15) !important;
    color: #00ba7c !important;
    border: 1px solid rgba(0, 186, 124, 0.3) !important;
    font-weight: 700;
}
.bracket-score-loss {
    background: rgba(249, 24, 128, 0.12) !important;
    color: #f91880 !important;
    border: 1px solid rgba(249, 24, 128, 0.3) !important;
    font-weight: 700;
}
.bracket-score-draw {
    background: rgba(255, 212, 0, 0.18) !important;
    color: #b48000 !important;
    border: 1px solid rgba(255, 212, 0, 0.4) !important;
    font-weight: 700;
}
.cursor-pointer {
    cursor: pointer;
}
.hover-bg-light:hover {
    background-color: var(--selectie-bg);
}

/* ── Match Timeline Line Style ── */
.timeline-line-wrapper {
    position: relative;
    user-select: none;
}

.timeline-pin {
    z-index: 2;
    transition: transform 0.15s ease;
}

.timeline-pin:hover {
    z-index: 10;
    transform: translateX(-50%) scale(1.2) !important;
}

.pin-icon-wrapper {
    position: relative;
    outline: none;
}

.pin-icon-raw {
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 2px;
}

.timeline-tooltip-popup {
    display: none;
    position: absolute;
    white-space: normal;
    word-break: break-word;
    max-width: 200px;
    width: max-content;
    background-color: #0F1419;
    color: #FFFFFF;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    z-index: 1050;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.pin-icon-wrapper.is-top .timeline-tooltip-popup {
    bottom: 100%;
    margin-bottom: 8px;
}

.pin-icon-wrapper.is-bottom .timeline-tooltip-popup {
    top: 100%;
    margin-top: 8px;
}

.timeline-tooltip-popup.align-left {
    left: -4px;
    transform: none;
}

.timeline-tooltip-popup.align-right {
    right: -4px;
    left: auto;
    transform: none;
}

.timeline-tooltip-popup.align-center {
    left: 50%;
    transform: translateX(-50%);
}

.pin-icon-wrapper:hover .timeline-tooltip-popup,
.pin-icon-wrapper:focus .timeline-tooltip-popup,
.pin-icon-wrapper:active .timeline-tooltip-popup {
    display: block;
}

