@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Outfit:wght@700&display=swap');



:root {
    --primary: #e63946;
    --primary-rgb: 230, 57, 70;
    --secondary: #1d3557;
    --secondary-rgb: 29, 53, 87;
    --accent: #457b9d;
    --light: #f1faee;
    --dark: #1d3557;
    --bg: #f8f9fa;
    --white: #ffffff;
    --text: #333333;
    --border: #e0e0e0;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Header specific */
    --header-height: 70px;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* { box-sizing: border-box; }



html {
    width: 100vw;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    max-width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
}

html.drawer-open, 
body.drawer-open {
    overflow: hidden;
    height: 100vh;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
}

.container {
    max-width: 1200px;
    margin-block: 40px;
    margin-inline: auto;
    padding: 20px;
    transition: opacity 0.3s ease;
}

.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-block-end: 2rem;
    border: 1px solid var(--border);
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
   
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding-block: 12px;
    padding-inline: 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(230,57,70,0.2); }
button:disabled { background: #ccc; transform: none; cursor: not-allowed; }
.is-disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    filter: grayscale(0.8);
}


.rider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
}

.rider-card {
    background: white;
    padding-block: 12px;
    padding-inline: 15px;
    border: 1px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.rider-card:hover {
    border-color: var(--accent);
    background: #fcfcfc;
}

/* :has() Magic for Selections */
.rider-card:has(input[name="riders[]"]:checked) {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(29, 53, 87, 0.2);
}

.rider-card:has(input[name="reserves[]"]:checked) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
}

/* Hide the actual inputs but keep them accessible */
.rider-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Generic Tab System using :has() */
.tabs-container {
    --active-bg: var(--secondary);
    --active-color: white;
    scroll-margin-top: 160px !important;
}

#uitslag {
    scroll-margin-top: 160px !important;
}

:target {
    scroll-margin-top: 160px !important;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tab logic */
.tabs-container:has(input#tab-stage:checked) .tab-content.stage-content,
.tabs-container:has(input#tab-gc:checked) .tab-content.gc-content,
.tabs-container:has(input#tab-points:checked) .tab-content.points-content,
.tabs-container:has(input#tab-kom:checked) .tab-content.kom-content,
.tabs-container:has(input#tab-youth:checked) .tab-content.youth-content {
    display: block;
}

/* Active label styling */
.tabs-container:has(input#tab-stage:checked) label[for="tab-stage"],
.tabs-container:has(input#tab-gc:checked) label[for="tab-gc"],
.tabs-container:has(input#tab-points:checked) label[for="tab-points"],
.tabs-container:has(input#tab-kom:checked) label[for="tab-kom"],
.tabs-container:has(input#tab-youth:checked) label[for="tab-youth"] {
    background: var(--active-bg);
    color: var(--active-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.summary-bar {
    position: fixed;
    inset-block-end: 0;
    inset-inline: 0;
    background: var(--secondary);
    color: white;
    padding-block: 15px;
    padding-inline: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.message { padding: 15px; border-radius: 8px; margin-block-end: 20px; }
.message.error { background: #fee2e2; color: #b91c1c; }
.message.success { background: #dcfce7; color: #15803d; }

table { width: 100%; border-collapse: collapse; margin-block-start: 10px; }
th, td { border: 1px solid #ddd; padding: 12px; text-align: start; }
th { background: #f8f9fa; }

/* Premium Cards & Specific Components */
/* 1. Definieer de animatie */
@keyframes reveal-card {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 2. Koppel het aan de scroll-tijdlijn */

.premium-card {
    background: var(--white);
    border-radius: 16px;
    /* overflow: hidden; -- Verwijderd om dropdowns (zoals share menu) niet te clippen */
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    margin-block-end: 30px;
    animation: reveal-card 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
}

/* Stacking Effect voor Mobiel */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}
.premium-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.card-header {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    padding: 20px;
    border-radius: 16px 16px 0 0; /* Match card radius nu overflow:hidden weg is */
}
.card-header h1, 
.card-header h2, 
.card-header h3 {
    color: inherit;
}
.card-body { padding: 20px; }

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 12px;
    padding-inline: 0;
    border-bottom: 1px solid #f0f0f0;
    max-width: 100%;
    box-sizing: border-box;
}
.result-item:last-child { border-bottom: none; }
.result-rank { width: 30px; font-weight: bold; color: var(--primary); flex-shrink: 0; }
.result-name { flex: 1; font-weight: 500; min-width: 0; } /* Verlaagd van 600 naar 500 voor minder 'dik' dashboard */
.result-points { font-weight: bold; background: #f0f4f8; padding-block: 4px; padding-inline: 10px; border-radius: 12px; font-size: 0.85rem; flex-shrink: 0; margin-inline-start: 10px; }

/* Native Side Drawer (Dialog) */
dialog.drawer {
    position: fixed;
    inset-block: 0;
    inset-inline: auto 0; /* Right aligned */
    width: 400px;
    max-width: 90vw;
    height: 100%;
    max-height: 100vh;
    border: none;
    padding: 0;
    margin: 0;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    flex-direction: column;
    display: none; /* Required for non-supporting browsers, overwritten by [open] */
    overflow: hidden;
}

dialog.drawer[open] {
    display: flex;
    animation: drawer-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawer-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

dialog.drawer::backdrop {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    animation: fade-in 0.4s ease forwards;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.drawer-header {
    padding-block: 20px;
    padding-inline: 25px; 
    background: var(--dark); 
    color: white;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

#closeDrawer {
    background: none;
    color: white;
    font-size: 1.8rem;
    padding: 0;
    border: none;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    outline: none; /* Verwijder de witte border/outline bij focus */
}

#closeDrawer:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.drawer-body { 
    flex: 1; 
    overflow-y: auto; 
    padding: 25px; 
}

@media (max-width: 768px) {
    dialog.drawer { width: 85%; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
}

/* --- MODERN DUAL NAVIGATION SYSTEM --- */

/* 1. Desktop Nav (Top) */
.nav-bar-floating {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--header-height);
    z-index: 2000;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    
    /* DE MAGIE: Scroll-to-Solid */
    animation: header-solidify linear both;
    animation-timeline: scroll();
    animation-range: 0 150px;
}

@keyframes header-solidify {
    to {
        background: var(--secondary);
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        backdrop-filter: none;
    }
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    transition: var(--transition);
}

.nav-brand:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.menu-trigger {
    background: transparent;
    border: none;
    height: var(--header-height);
    padding: 0;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    transition: var(--transition);
}

.menu-trigger:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.nav-account-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-account-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* 2. Mobile Bottom Nav (Floating Pill) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 25px;
    left: 20px;
    right: 20px;
    height: 70px;
    background: rgba(255, 255, 255, 0.85); /* More opaque */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 100px; 
    z-index: 3000; /* Higher than summary-bar */
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: none; 
    align-items: center;
    animation: nav-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.nav-scrim {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(to top, var(--bg) 30%, transparent 100%);
    z-index: 2900;
    pointer-events: none;
    display: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Hide when footer is visible */
body.footer-visible .mobile-bottom-nav,
body.footer-visible .nav-scrim {
    opacity: 0;
    pointer-events: none;
    transform: translateY(40px);
}

@media (max-width: 768px) {
    .nav-scrim { display: block; }
}

@keyframes nav-slide-up {
    from { transform: translateY(100px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.bottom-nav-container {
    display: flex;
    width: 100%;
    justify-content: space-around;
    padding: 0 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #64748b;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    position: relative;
}

.nav-item i {
    font-size: 1.35rem;
    transition: transform 0.3s ease;
}

.nav-item span {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.nav-item.active i {
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(230, 57, 70, 0.2));
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

/* Responsive Switches */
@media (max-width: 768px) {
    .desktop-nav-bar { display: none !important; }
    .mobile-bottom-nav { display: flex !important; }
    .mobile-top-bar { display: flex !important; }
    
    /* Extra spacing at bottom of body so content isn't hidden */
    body { padding-bottom: 0px; }
    
    .mobile-menu-btn { display: none !important; }
}

.mobile-top-bar {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%;
    height: 70px;
    display: none;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
    transition: transform 0.3s ease-in-out;
}

/* Hide when scrolling down on mobile */
body.nav-up .mobile-top-bar {
    transform: translateY(-100%);
}

.mobile-top-container {
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.mobile-top-bar .nav-brand,
.mobile-account-btn {
    pointer-events: auto;
    color: white !important;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
    text-decoration: none;
}

.mobile-top-bar .nav-brand {
    font-size: 1.25rem;
}

.mobile-account-btn {
    font-size: 1.6rem;
}

.standings-table {
    width: 100%; border-collapse: separate; border-spacing: 0 10px;
}
.standings-table tr {
    background: white; box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.standings-table td { padding: 12px; border: none; }
.standings-table td:first-child { padding-inline-start: 0; padding-inline-end: 10px; width: 30px; text-align: start; }
.standings-table tr td:first-child { border-start-start-radius: 12px; border-end-start-radius: 12px; }
.standings-table tr td:last-child { border-start-end-radius: 12px; border-end-end-radius: 12px; }

.trend { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    min-width: 18px; 
    height: 18px; 
    padding-inline: 4px;
    border-radius: 10px; 
    font-size: 0.65rem; 
    font-weight: bold;
}
.trend-up { color: #10b981; background: #ecfdf5; }
.trend-down { color: #ef4444; background: #fef2f2; }
.trend-neutral { color: #94a3b8; background: #f8fafc; }

.penalty-tag { font-size: 0.7rem; background: #fef2f2; color: #ef4444; padding-block: 2px; padding-inline: 6px; border-radius: 4px; font-weight: bold; margin-inline-start: 10px; border: 1px solid #fee2e2; }
.last-stage-pts { font-size: 0.85rem; color: #10b981; font-weight: bold; margin-inline-start: 8px; }
.medal { font-size: 1.1rem; vertical-align: middle; margin-inline-start: 5px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1)); }

.medal-wrapper { position: relative; display: inline-flex; align-items: center; }
.medal-count { 
    position: absolute; 
    inset-block-start: -5px; 
    inset-inline-end: -8px; 
    background: var(--primary); color: white; 
    font-size: 0.65rem; font-weight: bold; 
    padding-block: 1px; padding-inline: 4px; 
    border-radius: 10px; 
    min-width: 14px; text-align: center; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); 
    border: 1px solid white;
}

@media (max-width: 480px) {
    .hide-mobile { display: none !important; }
    .standings-table td { padding-block: 10px; padding-inline: 5px; }
}

.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    color: white;
    margin-inline-end: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}
.badge-res { background: linear-gradient(135deg, #457b9d, #1d3557); }
.badge-dnf { background: linear-gradient(135deg, #e63946, #d62828); }
.badge-act { background: linear-gradient(135deg, #2ecc71, #27ae60); }

.jersey-icon {
    height: 18px;
    width: auto;
    margin-inline-start: 0;
    vertical-align: middle;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-name-wrap {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

.team-info-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.jersey-slot {
    width: 26px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    margin-inline-end: 8px;
}

.jersey-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--secondary);
    color: white;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 3px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border: 1px solid white;
    z-index: 2;
}

.points-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
}

.points-stack .main-points {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary);
}

.points-stack .sub-points {
    font-size: 0.7rem;
    color: #10b981;
    font-weight: bold;
    margin-top: 2px;
}

.rank-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
    align-items: center;
}


/* --- STANDINGS & TOGGLE STYLES --- */

.pill-selectors {
    display: flex;
    gap: 10px;
    margin-block-end: 25px;
    overflow-x: auto;
    padding-block-end: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
}
.pill-selectors::-webkit-scrollbar { display: none; }

.pill {
    padding-block: 8px;
    padding-inline: 18px;
    border-radius: 25px;
    background: #f0f2f5;
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    scroll-snap-align: start;
}

.pill:hover {
    background: #e4e6e9;
    transform: translateY(-1px);
}

.pill.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.classification-title {
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-block-end: 10px;
}

/* Detail Toggle Logic using :has() */
.container:has(#breakdown-toggle:checked) .breakdown-row {
    display: table-row !important;
}

.container:has(#breakdown-toggle:checked) .show-icon { display: none !important; }
.container:has(#breakdown-toggle:checked) .hide-icon { display: inline-block !important; }

/* Toggle Group Styles */
.toggle-group {
    display: inline-flex;
    background: #f0f2f5;
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
    margin-block-end: 10px;
}

.toggle-group-btn {
    padding: 6px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    color: #666;
    transition: all 0.2s ease;
}

.toggle-group-btn:hover {
    color: var(--secondary);
}

.toggle-group-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}


/* .btn-toggle verwijderd (duplicaat van regel 1054+) */

.btn-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-small {
    display: inline-block;
    padding-block: 6px;
    padding-inline: 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    background: var(--primary);
    border: none;
    cursor: pointer;
}

/* --- PREMIUM FLOATING GLASS HEADER --- */

.page-header-premium {
    position: relative;
    padding: 0 20px 50px 20px;
    margin-bottom: 30px;
    /* overflow: hidden; -- Verwijderd om clipping van zwevende icon te voorkomen */
    background: var(--bg);
    display: flex;
    justify-content: center;
    z-index: 10; /* Zorg dat de header (en icon) boven de body zweeft */
}

/* De 'Spotlight' van de hoofdkleur met een zachte animatie */
@keyframes mesh-pulse {
    0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.4; }
    50% { transform: scale(1.1) translate(-5%, 5%); opacity: 0.6; }
}

.header-bg-mesh {
    position: absolute;
    top: -50%; 
    left: -20%; 
    width: 140%; 
    height: 200%;
    z-index: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(var(--primary-rgb, 230, 57, 70), 0.4) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(69, 123, 157, 0.2) 0%, transparent 60%);
    filter: blur(80px);
    pointer-events: none;
    animation: mesh-pulse 12s ease-in-out infinite;
}

/* De Zwevende Glazen Kaart */
.header-glass-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.6); /* Transparant wit */
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-top: 4px solid var(--primary); /* Krachtig accent bovenaan */
    border-radius: 0 0 24px 24px;
    padding: 30px 40px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.05),
        0 5px 15px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    
    /* Animatie bij binnenkomst */
    animation: header-slide-in 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
}

/* Icoon styling met diepte */
.header-icon-box {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    z-index: 100;
    width: 60px; height: 60px;
    background: var(--white);
    border: 3px solid var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    cursor: pointer;
}

.header-icon-box:hover {
    transform: translate(-50%, 45%) scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.header-main-icon {
    font-size: 2rem;
    color: var(--primary); /* Icoon krijgt de hoofdkleur */
    filter: drop-shadow(0 0 8px rgba(var(--primary-rgb), 0.4));
}

/* Tekst styling */
.header-text-box {
    flex: 1;
}

.header-title {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    color: var(--secondary); /* Terug naar donkere tekst */
    letter-spacing: -1px;
}

.header-subtitle {
    margin: 6px 0 0 0;
    font-size: 1rem;
    color: var(--text-muted, #666);
    font-weight: 400;
}

/* --- DE EXTRA 'HIPPE' TOUCH --- */

/* Een groot transparant icoon op de achtergrond voor grafische flair */
.header-glass-card::after {
    content: "\f206"; /* FontAwesome code voor fiets (bicycle) */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 20px;
    bottom: -10px;
    font-size: 6rem;
    color: var(--secondary);
    opacity: 0.03; /* Extreem subtiel */
    pointer-events: none;
    transform: rotate(-15deg);
}

@keyframes header-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.no-header-animation .header-glass-card {
    animation: none !important;
}

/* --- STANDINGS TOGGLE LOGIC --- */

/* Toon/Verberg de details rijen op basis van de checkbox */
body:has(#breakdown-toggle:checked) .breakdown-row {
    display: table-row !important;
}

/* Iconen wisselen */
body:has(#breakdown-toggle:checked) .show-icon {
    display: none !important;
}

body:has(#breakdown-toggle:checked) .hide-icon {
    display: inline-block !important;
}

/* De Knop Styling */
.btn-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    background: var(--secondary);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(29, 53, 87, 0.2);
    border: 1px solid rgba(255,255,255,0.1);
    user-select: none;
}

.btn-toggle:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(29, 53, 87, 0.3);
}

.btn-toggle:active {
    transform: translateY(0);
}

/* Mobile optimalisatie */
@media (max-width: 480px) {
    .header-glass-card {
        padding: 20px;
    }
    .header-icon-box {
        width: 50px; height: 50px;
    }
    .header-main-icon {
        font-size: 1.4rem;
    }
}

/* --- FULL-BLEED FLOATING HEADER --- */

.main-header {
    position: relative;
    width: 100%;
}


/* --- HERO AFBEELDING & CONTENT --- */

.hero-full-bleed {
    position: relative;
    height: 65vh; /* Slightly taller to accommodate overlap */
    overflow: hidden;
    background: var(--bg); /* Voorkom donkere lijntjes door sub-pixel rendering */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -1px; /* Sluit eventuele 1px kieren op mobiel */
}

/* De Scrim: Zorgt voor contrast tussen witte tekst en foto */
.hero-overlay-scrim {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.6) 0%, 
        rgba(0,0,0,0.1) 60%, 
        var(--bg) 100%); /* Volledige blend naar achtergrondkleur */
    z-index: 1;
}

.hero-img-parallax {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    
    /* Parallax effect bij scrollen */
    animation: parallax-img linear both;
    animation-timeline: scroll();
    animation-range: 0 55vh;
}

@keyframes parallax-img {
    to { transform: translateY(100px) scale(1.1); opacity: 0.5; }
}

.hero-content-center {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 0 20px;
    margin-top: 20px;
    padding-bottom: 60px; /* Shift text up to make room for overlap */
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: clamp(2.2rem, 8vw, 4rem);
    line-height: 1;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
    color: white; /* Force white for hero title */
}

.hero-tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-overlap {
    margin-top: -100px !important;
    position: relative;
    z-index: 10;
}

/* Verwijder de rand van de eerste kaart die over de hero heen valt */
.hero-overlap .card:first-of-type {
    border-top: none !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); /* Iets sterkere schaduw voor diepte */
}

/* Forceer geen randen op de hero containers */
.main-header, .hero-full-bleed, .hero-overlay-scrim {
    border: none !important;
    outline: none !important;
}
/* Standings-specific hero styling: position title on the fade-out with a dark color */
.hero-race-name {
    display: none;
}

body.page-standings .hero-full-bleed {
    align-items: flex-end;
}

body.page-standings .hero-content-center {
    padding-bottom: 85px; /* Positions it nicely on the light fade-out gradient area above the overlap */
    margin-top: 0;
}

body.page-standings .hero-title {
    color: var(--secondary); /* Premium dark color */
    text-shadow: none; /* Shadow removed since it's on a light background */
}

body.page-standings .hero-race-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary); /* Rondehoofdkleur */
    background: rgba(255, 255, 255, 0.65); /* Elegant glass background */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    padding: 6px 18px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: clamp(0.75rem, 2.5vw, 0.95rem);
    margin-top: 0;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: none;
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02);
}

body.page-standings .hero-tagline {
    color: var(--secondary);
    opacity: 0.85; /* Increased opacity for better readability on light fade */
    text-shadow: none;
}

@media (max-width: 768px) {
    body.page-standings .hero-content-center {
        padding-bottom: 80px;
    }
}
/* --- STATISTICS MODULES --- */
.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888;
    background: #f8f9fa;
    border: none;
    border-bottom: 1px solid #eee;
}

.stats-table td {
    padding: 12px 15px;
    border: none;
    border-bottom: 1px solid #f9f9f9;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stats-table .rider-info {
    display: flex;
    flex-direction: column;
}

.stats-table .rider-name {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.95rem;
}

.stats-table .rider-team {
    font-size: 0.75rem;
    color: #888;
}

.stats-table .stat-value {
    text-align: end;
    font-weight: 800;
}

.stats-table .points-value {
    color: #27ae60;
    font-size: 1.1rem;
}

.stats-table .chosen-value {
    color: var(--accent);
}

.stats-badge {
    background: #e1f7e7;
    color: #15803d;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
}

.stats-badge.chosen {
    background: #ebf5fb;
    color: #2980b9;
}

/* Toggle Pills */
.stats-toggle {
    display: inline-flex;
    background: #eee;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.stats-toggle input[type="radio"] {
    display: none;
}

.stats-toggle label {
    padding: 6px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    transition: var(--transition);
}

.stats-toggle input[type="radio"]:checked + label {
    background: white;
    color: var(--secondary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.social-template-hidden {
    display: none;
    width: 1200px;
    height: 630px;
    overflow: hidden;
}

.social-template-hidden * {
    font-family: 'Outfit', sans-serif;
}

.st-container {
    width: 1200px;
    height: 630px;
    padding: 40px 60px; /* Meer padding voor een luxere uitstraling */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: radial-gradient(ellipse at top right, #1e293b 0%, #0f172a 80%);
    position: relative;
    color: white;
}

/* ── Logo: linksboven, wit, kleine letters ── */
.st-branding {
    position: absolute;
    top: 40px;
    left: 60px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.st-logo-wrap {
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.st-logo-wrap i {
    font-size: 2.8rem; /* Groter logo */
    color: white !important;
    -webkit-text-fill-color: white !important;
}

.st-app-name {
    font-size: 2.2rem; /* Grotere naam */
    font-weight: 800;
    letter-spacing: -1px;
    text-transform: lowercase;
    color: white;
    -webkit-text-fill-color: white;
}

/* ── Koptekst (poule/insights) ── */
.st-header {
    text-align: center;
    padding-top: 10px;
    margin-bottom: 20px;
}

.st-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.st-subtitle {
    font-size: 5rem; /* Nog groter */
    font-weight: 900;
    line-height: 1;
    margin: 0;
    color: #e2e8f0;
}

/* ── Podium ── */
.st-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 25px;
    flex: 1;
    margin: 15px 0 10px 0; /* Minder marge om hoogte te besparen */
}

.st-podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 310px;
}

.st-podium-rank {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding-top hersteld naar 0 */
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    border: 4px solid rgba(255,255,255,0.25);
}

.st-podium-rank img {
    width: 95px;
    height: 95px;
    object-fit: contain;
}

.st-podium-item.st-rank-1 { order: 2; transform: scale(1.1); z-index: 5; }
.st-podium-item.st-rank-2 { order: 1; z-index: 3; }
.st-podium-item.st-rank-3 { order: 3; z-index: 3; }

.st-rank-1 .st-podium-rank { background: linear-gradient(135deg, #fde047, #f59e0b); color: #854d0e; border: 4px solid rgba(255,255,255,0.3); }
.st-rank-2 .st-podium-rank { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #334155; border: 4px solid rgba(255,255,255,0.3); }
.st-rank-3 .st-podium-rank { background: linear-gradient(135deg, #fdba74, #c2410c); color: #7c2d12; border: 4px solid rgba(255,255,255,0.3); }

.st-podium-name {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.st-podium-points {
    font-size: 1.8rem; /* Groter */
    color: #38bdf8;
    font-weight: 700;
}

/* Rank Change Indicators */
.st-rank-change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 1.4rem;
    font-weight: 900;
    margin-top: 10px;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(255,255,255,0.05);
}
.st-rank-change.up { color: #2ecc71; }
.st-rank-change.down { color: #e74c3c; }
.st-rank-change.stable { color: #94a3b8; }

/* ── Enkel insights kaart (Breaking News) ── */
.st-insight {
    display: flex;
    align-items: center;
    gap: 55px;
    flex: 1;
    padding: 10px 0;
}

.st-insight-icon-wrap {
    flex-shrink: 0;
    width: 230px;
    height: 230px;
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.st-insight-icon {
    width: 160px;
    height: 160px;
    font-size: 7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.st-insight-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.st-insight-content { flex: 1; }

.st-insight-badge {
    display: inline-block;
    background: #ef4444;
    color: white;
    padding: 7px 18px;
    border-radius: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1rem;
    margin-bottom: 22px;
}

.st-insight-message {
    font-size: 3.2rem; /* Nog groter */
    font-weight: 800;
    line-height: 1.15;
    color: white;
}

/* ── Meerdere updates (Grid Layout) ── */
.st-updates-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    padding: 10px 0;
    justify-content: center;
}

.st-update-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.st-update-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 20px 25px;
    position: relative;
    overflow: hidden;
}

.st-update-card.st-main {
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    padding: 25px 40px;
}

.st-update-card .st-update-icon {
    width: 60px;
    height: 60px;
    font-size: 2.2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
}

.st-update-card.st-main .st-update-icon {
    width: 100px;
    height: 100px;
    font-size: 4rem;
    border-radius: 25px;
}

.st-update-card .st-update-icon img {
    width: 65%;
    height: 65%;
    object-fit: contain;
}

.st-update-card .st-update-content {
    flex: 1;
}

.st-update-card .st-update-text {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: #f8fafc;
}

.st-update-card.st-main .st-update-text {
    font-size: 3.2rem; /* Groter voor hoofd-insight */
    letter-spacing: -1px;
}

/* Header Refinement */
.st-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
}

.st-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.st-header-label {
    font-size: 1.4rem; /* Groter */
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 800;
}

.st-race-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin: 5px 0 10px 0;
    text-align: center;
}

.st-container:has(.st-header-row) .st-branding {
    position: static !important;
}

.st-container:has(.st-header-row) .st-stage-badge {
    position: static !important;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 12px 24px; /* Groter */
    border-radius: 15px;
    font-weight: 900;
    font-size: 1.6rem; /* Veel groter */
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 10;
}

/* ── Truien Grid (Poule) ── */
.st-jerseys-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 10px 0; /* Minder marge */
}

.st-jersey-item {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 15px 25px; /* Minder padding voor minder hoogte */
    display: flex;
    align-items: center;
    gap: 25px;
    transition: all 0.3s ease;
}

.st-jersey-icon {
    width: 140px; 
    height: 100px; /* Lager */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none; /* Geen achtergrond meer */
    border-radius: 0;
}

.st-jersey-icon img {
    max-height: 100px; /* Nóg groter nu padding weg is */
    max-width: 130px;
    object-fit: contain;
}

.st-jersey-icon i {
    font-size: 1.6rem;
    color: #94a3b8;
}

.st-jersey-info {
    flex: 1;
    overflow: hidden;
}

.st-jersey-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 1.5px;
    margin-bottom: 3px;
    font-weight: 600;
}

.st-jersey-name {
    font-size: 2.2rem; /* XXL - even groot als podium */
    font-weight: 800;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Footer ── */
.st-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 15px;
    color: #64748b;
    font-size: 1.1rem;
}

/* ── Share Menu Dropdown ── */
.share-menu-container {
    position: relative;
    display: inline-block;
}

.share-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-menu-container.active .share-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #334155;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.share-menu-item:hover {
    background: #f1f5f9;
}

.share-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: #64748b;
}

.share-menu-item.loading {
    color: #94a3b8;
    pointer-events: none;
}

.share-menu-item.loading i {
    color: #94a3b8;
}

.share-menu-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 6px 8px;
}

/* --- SHARE BUTTON COMPONENTS (Moved from share_button.php) --- */
.share-btn-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
}
.share-btn-inline {
    display: inline-flex;
}
.share-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.share-action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.share-action-btn:disabled {
    opacity: 0.7;
    cursor: default;
}
.share-action-btn.share-btn--ready {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}
.share-action-btn.share-btn--error {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Lichte variant voor witte kaarten */
.share-btn-light .share-action-btn {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}
.share-btn-light .share-action-btn:hover:not(:disabled) {
    background: #e2e8f0;
}
.share-btn-light .share-action-btn.share-btn--ready {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

/* ==========================================================================
   STANDINGS REDESIGN: PREMIUM SPORT-DASHBOARD STYLES
   ========================================================================== */

/* 1. Compact Hero Banner for Standings */
.page-standings .hero-full-bleed {
    height: 170px !important; /* Taller height to prevent navigation overlap */
    margin-bottom: 0px !important;
}
.page-standings .hero-content-center {
    padding-bottom: 0 !important;
    margin-top: 25px !important; /* Push title down gracefully */
}
.page-standings .hero-tagline {
    display: none !important;
}
.page-standings .hero-overlap {
    margin-top: 15px !important;
}

/* Animated view panes (soepele animatie) */
.standings-view-pane {
    animation: fadeInSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Jersey Dashboard Grid Styles */
.jersey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}
.jersey-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.jersey-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
}
.jersey-card-icon {
    height: 48px;
    width: 48px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}
.jersey-card:hover .jersey-card-icon {
    transform: scale(1.1) rotate(-5deg);
}
.jersey-card-title {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.jersey-card-leader {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.jersey-card-pos {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}
.jersey-card-pos strong {
    color: var(--primary);
    font-weight: 800;
}
.jersey-card-arrow {
    margin-left: auto;
    color: #cbd5e1;
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}
.jersey-card:hover .jersey-card-arrow {
    transform: translateX(3px);
    color: var(--primary);
}

.page-standings .hero-tagline {
    display: none !important;
}
.page-standings .hero-overlap {
    margin-top: 15px !important;
}

/* 2. Poule Cards Horizontal Swiper */
.poule-dashboard-swiper {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 5px 5px 15px 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin-bottom: 25px;
}
.poule-card {
    flex: 0 0 190px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.poule-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.9);
}
.poule-card.active {
    background: linear-gradient(135deg, var(--secondary), #1e293b);
    color: white;
    border-color: var(--secondary);
    box-shadow: 0 8px 20px rgba(29, 53, 87, 0.15);
}
.poule-card.active .poule-card-rank {
    color: #fbbf24;
}
.poule-card.active .poule-card-subtitle {
    color: rgba(255, 255, 255, 0.7);
}
.poule-card-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.poule-card-subtitle {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 600;
}
.poule-card-rank {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.2;
}
.poule-card-trend {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* 3. Classification Jersey Buttons Swiper */
.jersey-selectors-swiper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 25px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.jersey-selectors-swiper::-webkit-scrollbar {
    display: none;
}
.jersey-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    background: white;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}
.jersey-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}
.jersey-pill img {
    height: 22px;
    width: 22px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.jersey-pill.active {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}
.jersey-pill.active img {
    filter: drop-shadow(0 2px 4px rgba(255,255,255,0.2));
}

/* 4. Dashboard Controls & Search */
.dashboard-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.view-mode-tabs {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 14px;
    gap: 2px;
    border: 1px solid #e2e8f0;
}
.view-mode-tab {
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
    font-family: inherit;
    position: relative;
}
.view-mode-tab:hover {
    color: var(--secondary);
    background: rgba(255,255,255,0.6);
}
.view-mode-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    font-weight: 800;
}
.live-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 320px;
    min-width: 200px;
}
/* In de standings controls rij: geen max-width, zoekbalk vult de rest */
.standings-controls-row .live-search-wrapper {
    max-width: none;
    min-width: 0;
}
.live-search-input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.01);
    background: white;
}
.live-search-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.1);
}
.live-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}

/* Extra Tweaks */
.page-standings .poule-summary-card {
    margin-block-end: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}
.page-standings .table-options-btn-new {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    transition: all 0.2s ease;
}
.page-standings .table-options-btn-new:hover {
    background: #f8fafc;
    color: var(--secondary);
}

/* Toggle Totaal/Dagstand in banner */
.toggle-group-btn {
    color: #64748b;
    font-weight: 700;
    font-size: 0.68rem;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.toggle-group-btn:hover {
    color: var(--secondary);
    background: rgba(255,255,255,0.7);
}
.toggle-group-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    font-weight: 800;
}

/* Pinned mijn-team balk onderaan de tabelkaart */
#pinned-my-team-row:hover {
    filter: brightness(1.08);
}

/* ============================================================
   MOBILE-FIRST STANDINGS CONTROLS
   ============================================================ */

/* Rij 1: Totaal / Dagstand mode-knoppen */
.standings-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.18s ease;
    cursor: pointer;
}
.standings-mode-btn:hover {
    background: #e2e8f0;
    color: var(--secondary);
}
.standings-mode-btn.active {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.15);
    font-weight: 800;
}

/* Rij 3: Full-width tabs aansluitend op de tabelkaart */
.standings-tab {
    flex: 1;
    padding: 10px 6px;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-right: none;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 0;
}
.standings-tab:first-child {
    border-radius: 14px 0 0 0;
}
.standings-tab:last-child {
    border-right: 1px solid #e2e8f0;
    border-radius: 0 14px 0 0;
}
.standings-tab:hover {
    background: #f1f5f9;
    color: var(--secondary);
}
.standings-tab.active {
    background: white;
    color: var(--primary);
    font-weight: 800;
    border-top: 2px solid var(--primary);
    position: relative;
    z-index: 1;
}
.standings-tab:hover,
.standings-tab:focus,
.standings-tab:active,
.standings-tab.active {
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

/* Custom Premium Select Dropdown Pill Styles */
.premium-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 8px 36px 8px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.2s;
    max-width: 100%;
}
.premium-select-wrapper:hover {
    border-color: var(--primary);
    background: #fff;
}
.premium-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--secondary);
    font-size: 1.1rem;
    cursor: pointer;
    outline: none;
    max-width: 100%;
}
.premium-select-wrapper .fa-chevron-down {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--primary);
    font-size: 0.8rem;
}

/* Social Card Styles (imported from poule.php) */
.social-card-wrapper {
    position: relative;
    margin-bottom: 25px;
}
.social-card {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #f8fafc;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}
.social-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(56,189,248,0.05) 0%, transparent 60%);
    pointer-events: none;
}
.sc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    z-index: 2;
    position: relative;
}
.sc-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #94a3b8;
    margin-bottom: 5px;
    font-weight: 600;
}
.sc-value {
    font-size: 3rem;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(to right, #fde047, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.sc-currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: #cbd5e1;
    -webkit-text-fill-color: initial;
}
.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    z-index: 2;
    position: relative;
}
.sc-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s;
}
.sc-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}
.sc-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}
.sc-info {
    flex: 1;
    min-width: 0;
}
.sc-label {
    font-size: 0.75rem;
    color: #cbd5e1;
    margin-bottom: 2px;
}
.sc-prize {
    font-weight: 800;
    color: #38bdf8;
    font-size: 0.9rem;
}
.sc-winner {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sc-winner i {
    font-size: 0.8rem;
    color: #fbbf24;
}
.sc-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    z-index: 2;
    position: relative;
    border-top: 1px dashed rgba(255,255,255,0.1);
    padding-top: 15px;
}

/* Premium Consolidated Dropdown Responsive Header Styles */
@media (max-width: 480px) {
    .premium-select-header-select {
        font-size: 1.15rem !important;
    }
}

/* Custom premium styled dropdown overlays */
.dropdown-item {
    color: #334155;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.dropdown-item:hover {
    background: #f8fafc;
    color: var(--primary) !important;
    padding-left: 22px !important; /* Premium slide micro-interaction */
}
.dropdown-group-header {
    font-family: 'Outfit', sans-serif;
}
