/* ==========================================================================
   ASSETS/CSS/CUSTOM.CSS - GECORRIGEERDE VERSIE (MET SCROLL FIX)
   ========================================================================== */

/* 1. IMPORTS & VARIABELEN */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;900&display=swap');

:root {
    --hr-red: #d3104c;
    --hr-red-dark: #b00d40;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.3);
}

/* 2. ALGEMENE STYLING */
body {
    background-color: #f8f9fa; /* Lichte achtergrond voor dashboards */
    color: #333;
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-weight: 700; }

/* ==========================================================================
   3. HUISSTIJL ELEMENTEN (LOGIN & DASHBOARD)
   ========================================================================== */

/* Speciale body class voor login/full-screen pagina's */
body.bg-hr {
    background-color: var(--hr-red);
    color: white;
}

/* HR Buttons */
.btn-primary {
    background-color: var(--hr-red);
    border-color: var(--hr-red);
    font-weight: 600;
}
.btn-primary:hover {
    background-color: var(--hr-red-dark);
    border-color: var(--hr-red-dark);
}

/* Witte knop voor op rode achtergrond */
.btn-light-hr {
    background-color: white;
    color: var(--hr-red);
    font-weight: 700;
    border: none;
}
.btn-light-hr:hover {
    background-color: #f0f0f0;
    color: var(--hr-red-dark);
}

/* Glassmorphism Card (Het kader om de formulieren) */
.card-glass {
    background-color: rgba(255, 255, 255, 0.7); /* Iets witter voor dashboard */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);      
    color: #333;                               /* Donkere tekst */
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card-glass .form-control {
    background: rgba(255, 255, 255, 1);
    border: 1px solid #ced4da;                 
    color: #333;
    padding: 12px;
}

.card-glass label {
    color: #333;                               
    font-weight: 600;
    margin-bottom: 5px;
}

/* UITZONDERING: Alleen als we op de RODE inlogpagina zijn */
body.bg-hr .card-glass {
    background-color: var(--glass-bg);
    border-color: var(--glass-border);
    color: white;
}

body.bg-hr .card-glass label {
    color: white;
}

body.bg-hr .card-glass .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: none;
}

/* Navbar Styling */
.navbar-custom {
    background-color: var(--hr-red);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ==========================================================================
   4. CANDY CRUSH DIGIBORD STIJL
   ========================================================================== */

/* JOUW VLOEIENDE ANIMATIE (Heen en weer) */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* De body van het digibord */
body.candy-board-bg {
    /* Jouw kleurenverloop */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    
    /* 15s ease infinite zorgt voor de loop */
    animation: gradientBG 15s ease infinite;
    
    color: white;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', 'Poppins', sans-serif;
    
    /* === HIER ZIT DE FIX VOOR HET SCROLLEN === */
    height: 100vh;      /* Forceer dat de body nooit groter is dan het scherm */
    overflow: hidden;   /* Verberg scrollbalken op de body zelf */
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
}

.candy-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: rgba(255,255,255,0.1); 
    /* Zorgt dat deze container niet groter wordt dan de body */
    overflow: hidden; 
}

.candy-title {
    font-weight: 900;
    font-size: 4rem; 
    text-align: center;
    margin-bottom: 30px;
    color: white;
    text-shadow: 
        3px 3px 0 #d3104c, -3px -3px 0 #d3104c,  
        3px -3px 0 #d3104c, -3px 3px 0 #d3104c,
        0 10px 20px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}

/* Het scrollbare lijst-gedeelte */
.candy-scroll-area {
    overflow-y: auto;       /* Sta scrollen toe IN dit blok */
    flex-grow: 1;           /* Vul de rest van het scherm */
    padding: 10px 20px 40px 20px;
    width: 100%;
    scrollbar-width: none;  /* Firefox: geen balk */
    scroll-behavior: smooth; 
}
.candy-scroll-area::-webkit-scrollbar { display: none; /* Chrome: geen balk */ }

/* De rij (Snoepreep) */
.candy-row {
    margin-bottom: 15px;
    padding: 10px 25px;
    border-radius: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    
    /* Contrast fixes */
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-shadow: 0px 2px 4px rgba(0,0,0,0.4); 
    
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    width: 90%; 
    margin-left: auto; 
    margin-right: auto;
    min-height: 80px;
}

/* Naam container */
.candy-row > div:first-child {
    flex-grow: 1;       
    min-width: 0;       
    margin-right: 15px; 
    display: flex;      
    align-items: center;
}

.candy-name { 
    text-transform: capitalize; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    width: 100%; 
}

.candy-rank-num { margin-right: 20px; opacity: 0.9; font-size: 1.5rem; flex-shrink: 0; }

/* Nummer 1 */
.candy-row.rank-1 {
    transform: scale(1.05); 
    z-index: 10;
    border-color: #fff;
    background: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    text-shadow: 0px 2px 5px rgba(0,0,0,0.5);
}

/* Score Bal */
.candy-score-box {
    background-color: white;
    color: #333; 
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 2rem;
    border: 4px solid rgba(255,255,255,1);
    box-shadow: inset 0 3px 10px rgba(0,0,0,0.2);
    text-shadow: none; 
    flex-shrink: 0;
}

/* Kleurenschema's */
.candy-scheme-0 { background: linear-gradient(135deg, #FF61D2 0%, #FE9090 100%); }
.candy-scheme-1 { background: linear-gradient(135deg, #36D1DC 0%, #5B86E5 100%); }
.candy-scheme-2 { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.candy-scheme-3 { background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%); }

/* ==========================================================================
   5. MOBIELE AANPASSINGEN (IPHONE/ANDROID)
   ========================================================================== */
@media (max-width: 768px) {

    /* Laat de pagina normaal scrollen op mobiel */
    body.candy-board-bg {
        overflow-y: auto !important; /* Op mobiel mag de body wél scrollen */
        height: auto;
    }

    .candy-container {
        height: auto;
        min-height: 100vh;
        padding: 15px 10px;
        overflow: visible;
    }

    .candy-scroll-area {
        overflow: visible;
        padding: 0;
    }

    .candy-title {
        font-size: 2.5rem; 
        margin-bottom: 20px;
    }

    .candy-row {
        width: 100%; 
        padding: 8px 15px;
        border-radius: 40px;
        font-size: 1.1rem; 
        min-height: 60px;
        margin-bottom: 10px;
        border-width: 2px;
    }

    .candy-row.rank-1 {
        transform: scale(1.02);
        width: 96%;
        margin-left: 2%;
    }

    .candy-rank-num {
        font-size: 1rem;
        margin-right: 10px;
        min-width: 25px;
    }

    .candy-score-box {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        border-width: 3px;
    }
}