/* style.css (Volledige vervanging) */
:root {
    --kerst-rood: #D42426;      /* Iets dieper rood */
    --kerst-groen: #0B5719;     /* Iets donkerder groen */
    --goud: #FFD700;            /* Klassiek goud */
    --sneeuw: #F9F9F9;          /* Schoon wit */
    --tekst: #333;

    --main-font: 'Arial', sans-serif; /* Strak hoofdlettertype */
    --accent-font: 'Comic Sans MS', 'Chalkboard SE', sans-serif; /* Speels accent */
}

a {
    color: black;
    text-decoration: none;
}

body {
    font-family: var(--main-font); /* Gebruik het strakke font */
    background-color: var(--kerst-rood);
    /* Stipjes behouden: Simpel sneeuw effect */
     background-size: 50px 50px; 
    color: var(--tekst);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--sneeuw);
    padding: 30px;
    border-radius: 8px; /* Strakkere, minder ronde hoeken */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Subtielere schaduw */
    border: 3px solid var(--kerst-groen); /* Dunnere rand */
}

.container form {
        max-width: 90%; /* Het formulier zelf is smaller dan de 100% inputs */
        width: 100%;
        justify-content: center;
         /* Geef de formulier-box zelf padding */
        background: white; 
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.login-form {
    padding: 20px;
}

.add-form {

    justify-content: center;
    align-self: center;
    padding: 25px;
}

/* Accent font class voor feestelijke koppen */
.accent-font {
    font-family: var(--accent-font);
    text-shadow: 1px 1px var(--goud);
}

h1, h2 {
    color: var(--kerst-rood);
    text-align: center;
}

/* Knoppen en Formulieren (Strakker) */
button, .btn {
    background-color: var(--kerst-groen);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px; /* Strakkere knoppen */
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
}

button:hover, .btn:hover {
    background-color: #084313; /* Iets donkerder groen */
}

.list-action-button {
    font-size: 1em;

}

input[type="text"], input[type="password"], select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc; /* Subtielere rand */
    border-radius: 5px;
    box-sizing: border-box;
}

.player-list {
    background: white;
    border-bottom: 1px solid #eee;
    /* Zeer subtiele scheiding */
    padding: 15px;
    margin: 0px 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Lijst Items */
.wish-item {
    background: white;
    border-bottom: 1px solid #eee; /* Zeer subtiele scheiding */
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-bought {
    text-decoration: line-through;
    color: gray;
    opacity: 0.6;
}

.badge {
    border-radius: 3px;
    font-weight: normal;
}

/* style.css - Nieuwe Sneeuw Code */

/* De basis voor elke sneeuwlaag */
.snow-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Klikken gaat er dwars doorheen */
    z-index: 1;
    /* Zorgt dat het ONDER de tekstcontainer blijft */
    background-repeat: repeat;
    animation: fall linear infinite;
}

/* Laag 1: Kleine, langzame vlokjes (ver weg) */
.layer-1 {
    /* Maakt kleine stipjes */
    background-image: radial-gradient(white 1px, transparent 2px);
    background-size: 50px 50px;
    /* Ruimte tussen de vlokken */
    opacity: 0.8;
    animation-duration: 30s;
}

/* Laag 2: Middelgrote vlokken */
.layer-2 {
    background-image: radial-gradient(white 2px, transparent 3px);
    background-size: 100px 100px;
    opacity: 0.6;
    animation-duration: 20s;
}

/* Laag 3: Grote, snelle vlokken (dichtbij) */
.layer-3 {
    background-image: radial-gradient(white 2.5px, transparent 3.5px);
    background-size: 150px 150px;
    opacity: 0.4;
    animation-duration: 15s;
}

/* De animatie die de achtergrond naar beneden laat bewegen */
@keyframes fall {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 100vh;
        /* Beweegt 1 schermhoogte omlaag */
    }
}

/* Zorg dat de container van de tekst BOVEN de sneeuw ligt */
.container {
    position: relative;
    z-index: 10;
    /* Hoger dan de sneeuw (z-index 1) */
    background: var(--sneeuw);
    /* Zorg dat de achtergrond ondoorzichtig is */
}

ul {
        align-self: center;
        justify-content: center;
        align-items: center;
        max-width: 100vw;
        width: 100%;
        margin: 5% 0px;
        margin-top: 0;
        padding: 0;
    }


/* style.css (Onderaan toevoegen) */

.music-float-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--kerst-groen);
    color: white;
    border: 0;
    border-radius: 50px; /* Ronde knop */
    padding: 10px 20px;
    font-family: var(--accent-font); /* Je leuke lettertype */
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100; /* Zorg dat hij boven de sneeuw zweeft */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    opacity: 1; /* Iets doorzichtig als hij uit staat */
}

.music-float-btn:hover {
    transform: scale(1.05); /* Iets groter bij muis erover */
    opacity: 1;
    background-color: #084313;
}

/* style.css - Toevoegen voor het introscherm */

#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--kerst-rood);
    z-index: 9999; /* Helemaal bovenop alles */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: opacity 0.8s ease-out; /* Mooi uitfaden */
}

.intro-btn {
    margin-top: 30px;
    background-color: var(--kerst-groen);
    border: 3px solid var(--goud);
    padding: 20px 40px;
    font-size: 1.5rem;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    animation: pulse 2s infinite;
    font-family: var(--accent-font);
}

.intro-btn:hover {
    background-color: #084313;
    transform: scale(1.1);
}

/* Laat de knop kloppen als een hartje */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(255, 215, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* style.css - Modal en Upload Styles */

/* DE MODAL (POPUP) */
.modal-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Donkere achtergrond */
    z-index: 2000;
    display: none; /* Standaard verborgen */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-open {
    display: flex;
    opacity: 1;
}

.modal-content {
    align-items: center;
    align-content: center;
    justify-content: center;
    align-self: center;
    background: white;
    padding: 20px;
    border-radius: 15px;
    width: 85%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 4px solid var(--kerst-groen);
    position: relative;
    /* Zorg dat hij niet groter wordt dan het scherm, maar liever past hij gewoon */
    max-height: 90vh; 
    overflow-y: auto;
    text-align: center; /* Alles centreren in de view modal */
}

.close-modal {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

/* style.css - Vervang de oude file-drop-area code hiermee */

/* Mooiere Upload Wrapper */
.image-input-group {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    background: #fdfdfd;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 15px;
}

.image-input-group:hover {
    border-color: var(--kerst-groen);
    background: #f0fdf4; /* Heel licht groen */
}

/* Het daadwerkelijke bestandsveld (onzichtbaar eroverheen) */
.file-input-hidden {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

/* De visuele inhoud van het upload vak */
.upload-visual {
    pointer-events: none; /* Zodat klikken doorgaat naar de input */
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.upload-text {
    font-weight: bold;
    color: #555;
    display: block;
}

.upload-subtext {
    font-size: 0.8rem;
    color: #999;
}

/* De "OF" splitser */
.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 15px 0;
    color: #999;
    font-size: 0.85em;
    font-weight: bold;
}

.or-divider::before, .or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.or-divider:not(:empty)::before {
    margin-right: .5em;
}

.or-divider:not(:empty)::after {
    margin-left: .5em;
}

/* style.css - Voeg dit toe of update je bestaande input styles */

/* Algemene stijl voor alle invoervelden in de modal */
.styled-input {
    width: 100%;
    padding: 12px; /* Iets meer ruimte */
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95em;
    background: #fafafa;
    box-sizing: border-box; /* Zorgt dat padding niet buiten de breedte valt */
    transition: all 0.2s;
    font-family: inherit; /* Zorgt dat textarea hetzelfde lettertype heeft */
    margin-bottom: 12px; /* Ruimte tussen de velden */
}

.styled-input:focus {
    outline: none;
    border-color: var(--kerst-groen);
    background: white;
    box-shadow: 0 0 0 3px rgba(11, 87, 25, 0.1);
}

/* Specifiek voor het textarea zodat je het kan slepen */
textarea.styled-input {
    resize: vertical;
    min-height: 80px;
}

/* NIEUWE ITEM WEERGAVE */
.item-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    width: 100%;
}

/* style.css */

.item-image {
    width: 70px;            /* Iets groter gemaakt voor duidelijkheid */
    height: 70px;           /* Vaste hoogte */
    object-fit: contain;    /* Zorgt dat HELE plaatje zichtbaar is */
    background-color: white; /* Witte achtergrond voor transparante/afwijkende plaatjes */
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 2px;           /* Klein wit randje om de foto */
    flex-shrink: 0;         /* Zorgt dat hij niet geplet wordt als de tekst lang is */
}

.item-details {
    flex-grow: 1;
}

/* style.css */

/* Zorgt dat de beschrijving in de lijst compact blijft */
.item-short-desc {
    font-size: 0.85em; 
    color: #888; 
    margin-top: 4px;
    
    /* Moderne techniek om tekst af te kappen na 2 regels */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Maximaal 2 regels */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.item-link {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.85em;
    color: var(--kerst-rood);
    text-decoration: underline;
}

/* style.css - Toevoegen onderaan */

/* Laat zien dat je op een item kan klikken */
.clickable-area {
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 8px;
    padding: 5px; /* Beetje ruimte voor de hover */
    margin: -5px; /* Compenseer de padding */
}

.clickable-area:hover {
    background-color: #f5f5f5; /* Lichtgrijs bij eroverheen gaan */
}

/* Styling voor de 'Bekijk' Modal */
.view-image-large {
    width: 100%;
    height: auto;
    max-height: 200px; /* Beperkte hoogte! */
    object-fit: contain;
    margin: 10px 0;
    border-radius: 8px;
    background: #fff;
}

/* De Titel in de popup (Accent font) */
#viewTitle {
    font-family: var(--main-font);
    font-size: 1.5rem;
    color: var(--kerst-rood);
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.2;
}

/* De beschrijving tekst */
.view-desc-text {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid var(--kerst-groen);
    margin: 10px 0;
    font-style: italic;
    color: #555;
    white-space: pre-wrap;
    text-align: left; /* Tekst leest fijner links uitgelijnd */
    font-size: 0.95em;
}

.view-shop-btn {
    display: flex;
    width: 60%;
    text-align: center;
    justify-content: center;
    justify-self: center;
    background: var(--kerst-rood);
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
}

.view-shop-btn:hover {
    background: #a00;
}

/* style.css - Voeg toe onderaan */

/* De grijper voor het slepen */
.drag-handle {
    cursor: grab;
    color: #ccc;
    font-size: 1.2rem;
    margin-right: 10px;
    padding: 5px;
    display: flex; /* Zorgt voor nette uitlijning */
    align-items: center;
}

.drag-handle:hover {
    color: var(--kerst-groen);
}

.drag-handle:active {
    cursor: grabbing;
}

/* Visueel effect als je sleept */
.sortable-ghost {
    opacity: 0.4;
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
}

/* ======================================= */
/* === RESPONSIVE DESIGN (MOBIELE FIX) === */
/* ======================================= */

@media (max-width: 600px) {
    
    body {
        align-items: center;
        display: flex;
    }

    /* 1. LOGIN & WELKOM SCHERM (Full screen en smal formulier) */
    
    /* Zorgt dat de container de volle hoogte van de viewport pakt */
    .container {
        max-width: 600px;
        width: 98%;
        max-height: 100%; /* Noodzakelijk om de hele hoogte te vullen */
        padding: 20px 15px; 
        /* Gebruik flexbox om de inhoud van de container verticaal te centreren */
        display: flex;
        flex-direction: column;

    }
    .login-container {
        max-width: 500px;
        width: 80%;
        justify-content: center;
        align-items: center;
        align-self: center;
    }

    /* Maak het formulier smaller (target de form in de container) */
    .container form {
        max-width: 90%%; /* Het formulier zelf is smaller dan de 100% inputs */
        width: 100%;
         /* Geef de formulier-box zelf padding */
        background: white; 
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    /* --- ALGEMEEN VOOR DE HELE APP --- */
    
    /* Alle knoppen full-width */
    .container button, 
    .container .btn {
        width: 100%;
        padding: 12px;
    }
    
    /* De rest van de mobiele optimalisaties voor lijsten, headers, etc. */


    #intro-overlay {
    font-size: 1em;
    position: fixed;
    width: 100%;
    height: 100%;
    }
    
    ul {
        align-self: center;
        justify-content: center;
        align-items: center;
        max-width: 100vw;
        width: 100%;
        margin: 5% 0px;
        margin-top: 0;
        padding: 0;
    }

    .player-lsit{
        max-width: 500px;
        width: 100%;
    }

    .wish-item {
    background: white;
    border-bottom: 1px solid #eee; /* Zeer subtiele scheiding */
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    }


    .btn-bekijk {
        max-width: fit-content;
        width: fit-content;
    }

    h1 {
        margin-top: 25px;
        font-size: 1.5em;
    }





    /* De container die de drag-handle, details en knoppen bevat */
    .item-content {
        /* Zet de inhoud onder elkaar in plaats van naast elkaar */
        flex-direction: column !important; 
        align-items: stretch !important; /* Trek de inhoud breed */
        gap: 10px !important;
    }

    /* Het gedeelte met de foto en tekst */
    .item-details {
        width: 100%;
        /* Zorg dat de tekst de volle breedte kan pakken */
    }

    /* De container van de actieknoppen (Edit/Delete/Kopen) */
    /* In list.php heeft deze inline 'margin-left: 10px' en 'flex-direction: column'. 
       Dat moeten we resetten voor mobiel. */
    .item-content > div:last-child {
        width: 100%;
        margin-left: 0 !important; /* Verwijder de linkermarge */
        margin-top: 5px;
        padding: 0;
        flex-direction: row !important; 
        justify-content: center; 
        gap: 10px !important;
    }

    /* Specifieke knop aanpassingen binnen de items */
    .item-content > div:last-child button,
    .item-content > div:last-child form {
        /* Zorg dat formulieren (voor delete/kopen) niet de flow breken */
        margin: 0;
    }

    /* Als het de 'Kopen' knop is (bezoeker), maak deze groter/duidelijker */
    .item-content > div:last-child form button.badge {
        font-size: 1rem;
    }

    /* 4. Modals (Popups) optimalisatie */
    .modal-content {
        width: 95%; /* Gebruik bijna het hele scherm */
        padding: 15px; /* Minder witruimte binnenin */
        max-height: 85vh; /* Zorg dat het toetsenbord niet alles bedekt */
    }
    
    /* Zorg dat input velden in de modal goed te tikken zijn */
    .styled-input {
        font-size: 16px; /* Voorkomt inzoomen op iPhone */
        padding: 12px;
    }
    
    /* Zorg dat de afbeelding in de view-modal niet te groot is */
    .view-image-large {
        max-height: 250px;
    }
}