/* --- Globale Stijlen & Variabelen --- */
:root {
    --background-color: #fdf6f9;
    --text-color: #333;
    --wine-color-light: #e45a8e; /* Licht roze/wijn kleur */
    --wine-color-dark: #8c1b4f;  /* Donkerder wijnrood/paars */
    --wine-color-darker: #6b1038; /* Extra donker voor schaduwen */
    
    /* Button kleuren */
    --button-primary: var(--wine-color-light);
    --button-primary-hover: var(--wine-color-dark);
    --button-primary-shadow: rgba(228, 90, 142, 0.4);
    
    --button-play-again: #4cd964; /* Levendig groen */
    --button-play-again-hover: #34b349;
    --button-play-again-shadow: rgba(76, 217, 100, 0.4);
    
    --button-share: #56aeff; /* Helderder blauw */
    --button-share-hover: #3a9fee;
    --button-share-shadow: rgba(58, 159, 238, 0.3);
    
    --container-max-width: 600px;
    --border-radius: 12px;
    --button-border-radius: 35px; /* Rondere knoppen */
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { 
    font-family: 'Quicksand', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: var(--container-max-width);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px);
}

/* --- Header --- */
header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #f0e6ea;
    padding-bottom: 20px;
}

/* Logo styling - box effect verwijderd */
#logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 10px;
    background: transparent; /* Verwijder eventuele achtergrond */
    filter: none; /* Verwijder eventuele filters/schaduw */
}

#header-feedback {
    font-size: 1.1em;
    margin: 5px auto 10px;
    min-height: 1.4em;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    display: block;
    font-weight: 600;
    color: var(--wine-color-dark);
    text-align: center;
    max-width: 90%;
}

#header-feedback.tagline-initial {
    font-weight: normal;
    color: #666;
}

/* --- Main App Area --- */
main#app {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* --- Loading Indicator --- */
#loading-indicator {
    padding: 30px 0;
}

.spinner {
    border: 4px solid rgba(140, 27, 79, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--wine-color-dark);
    animation: spin 1s ease infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Question Area --- */
#question-area {
    width: 100%;
    margin-bottom: 20px;
}

#progress-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    height: 10px;
}

.progress-dot {
    width: 10px;
    height: 10px;
    background-color: #f0e6ea;
    border-radius: 50%;
    margin: 0 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.progress-dot.active {
    background-color: var(--wine-color-light);
    transform: scale(1.1);
}

#question-text {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 30px;
    color: var(--wine-color-dark);
    line-height: 1.5;
}

/* --- Interaction Containers --- */
.interaction-container {
    margin-top: 15px;
    width: 100%;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
    margin-top: 25px;
}

/* --- VERBETERDE KNOPPEN --- */
button, .submit-button {
    position: relative;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.05em;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--button-border-radius);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    color: white;
    text-align: center;
    width: 85%;
    max-width: 300px;
    transform: translateY(0);
    line-height: 1.4;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Button hover effect */
button:hover:not(:disabled), .submit-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);
}

/* Button active/press effect */
button:active:not(:disabled), .submit-button:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Animated ripple effect voor alle knoppen */
button:after, .submit-button:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

button:focus:not(:active):after, .submit-button:focus:not(:active):after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20) translate(-50%, -50%);
        opacity: 0;
    }
}

/* Disabled button style */
button:disabled, .submit-button:disabled {
    background-color: #e0e0e0;
    color: #a0a0a0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Standaard antwoord knoppen */
#answer-buttons button, .submit-button {
    background-color: var(--button-primary);
    background-image: linear-gradient(to right, var(--button-primary), #e9608e);
    box-shadow: 0 4px 15px var(--button-primary-shadow);
}

#answer-buttons button:hover, .submit-button:hover {
    background-image: linear-gradient(to right, var(--button-primary-hover), #d04a78);
    box-shadow: 0 7px 18px var(--button-primary-shadow);
}

/* NIEUWE GECENTREERDE BUTTON STYLING MET ICOONTJES */

/* Gemeenschappelijke button styling */
#play-again-button, #share-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important; /* Gecentreerd in plaats van links-uitlijning */
    width: auto !important; /* Automatische breedte gebaseerd op inhoud */
    min-width: 200px !important; /* Minimale breedte om te klein te voorkomen */
    max-width: 280px !important; /* Maxbreedte om consistentie te behouden */
    margin: 10px auto !important;
    padding: 14px 25px !important; /* Meer horizontale padding */
    border-radius: 35px !important;
}

/* De button icoon container */
.button-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    margin-left: -5px; /* Lichte aanpassing voor visuele balans */
}

.button-icon svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

/* De button tekst container */
.button-text {
    display: flex;
    flex-direction: column;
    text-align: center; /* Gecentreerde tekst */
    line-height: 1.3;
}

.button-text small {
    font-size: 0.75em;
    opacity: 0.9;
    font-weight: 500;
    margin-top: 2px;
}

/* Play Again knop - VERBETERD */
#play-again-button {
    background-color: var(--button-play-again) !important;
    background-image: linear-gradient(to right, var(--button-play-again), #40cd5f) !important;
    box-shadow: 0 4px 15px var(--button-play-again-shadow) !important;
}

#play-again-button:hover {
    background-image: linear-gradient(to right, var(--button-play-again-hover), #37b34e) !important;
    box-shadow: 0 7px 18px var(--button-play-again-shadow) !important;
}

#play-again-button:hover .button-icon svg {
    transform: rotate(30deg);
}

/* Share knop - VERBETERD */
#share-button {
    background-color: var(--button-share) !important;
    background-image: linear-gradient(to right, #56aeff, #3a9fee) !important;
    box-shadow: 0 4px 15px rgba(58, 159, 238, 0.3) !important;
}

#share-button:hover {
    background-image: linear-gradient(to right, var(--button-share-hover), #1c87e0) !important;
    box-shadow: 0 7px 18px rgba(58, 159, 238, 0.4) !important;
}

#share-button:hover .button-icon svg {
    transform: scale(1.15);
    animation: wiggle 1s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0) scale(1.15); }
    20% { transform: rotate(10deg) scale(1.15); }
    40% { transform: rotate(-8deg) scale(1.15); }
    60% { transform: rotate(4deg) scale(1.15); }
    80% { transform: rotate(-2deg) scale(1.15); }
}

#share-button-container {
    width: 100% !important;
    display: block !important;
}

/* Submit buttons (smaller variant) */
.submit-button {
    width: auto;
    min-width: 120px;
    max-width: 200px;
    padding: 12px 24px;
    margin-top: 10px;
}

/* Slider */
#slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    width: 90%;
    max-width: 350px;
    font-size: 0.9em;
    color: #666;
    padding: 0 5px;
}

#question-slider {
    width: 90%;
    max-width: 350px;
    cursor: pointer;
    accent-color: var(--wine-color-dark);
    height: 8px;
}

#slider-value-display {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--wine-color-dark);
    margin: 5px 0;
}

/* Calculation */
#calculation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#calculation-input {
    padding: 12px 15px;
    border: 2px solid #f0e6ea;
    border-radius: 15px;
    font-size: 1.1em;
    text-align: center;
    width: 60%;
    max-width: 200px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#calculation-input:focus {
    border-color: var(--wine-color-light);
    box-shadow: 0 0 0 3px rgba(228, 90, 142, 0.2);
    outline: none;
}

/* Emoji Select */
.emoji-button-container {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.emoji-button {
    background: none;
    border: none;
    font-size: 2.6em;
    cursor: pointer;
    padding: 15px;
    width: auto;
    max-width: auto;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.emoji-button:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.emoji-button:active {
    transform: scale(1.05);
}

.emoji-button:disabled {
    opacity: 0.5;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* Draw Line */
#draw-line-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.draw-instructions {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 10px;
}

#draw-canvas {
    width: 100%;
    max-width: 350px;
    height: 200px;
    border: 2px solid #f0e6ea;
    border-radius: 12px;
    touch-action: none;
    cursor: crosshair;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* Cork Clicker */
.cork-game-area {
    position: relative;
    height: 250px;
    width: 95%;
    max-width: 400px;
    border: 2px solid #f0e6ea;
    border-radius: 12px;
    margin: 15px auto;
    overflow: hidden;
    background-color: #f8f9ff;
    box-shadow: inset 0 0 20px rgba(140, 27, 79, 0.05);
}

.cork-game-area p {
    font-weight: bold;
    margin: 12px 0;
    color: var(--wine-color-dark);
}

.falling-cork {
    position: absolute;
    font-size: 2.5em;
    top: -40px;
    cursor: pointer;
    user-select: none;
    animation: fall linear forwards;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

@keyframes fall {
    to {
        top: calc(100% - 30px);
        transform: rotate(720deg);
    }
}

/* --- Result Area --- */
#result-area {
    width: 100%;
    margin-top: 20px;
}

#result-gif {
    max-width: 85%;
    height: auto;
    max-height: 250px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#result-text {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--wine-color-dark);
    margin-bottom: 30px;
    line-height: 1.4;
}

/* --- Wine Fact Area --- */
#wine-fact-area {
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid #f0e6ea;
    width: 100%;
    text-align: center;
    font-size: 0.9em;
    color: #666;
    background-color: #fdfafc;
    border-radius: 0 0 12px 12px;
}

#wine-fact-area h3 {
    font-size: 1.05em;
    color: var(--wine-color-light);
    margin-bottom: 8px;
}

#wine-fact-text {
    line-height: 1.5;
}

/* --- Footer --- */
footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #f0e6ea;
    text-align: center;
    font-size: 0.85em;
    color: #888;
    width: 100%;
}

/* --- Utility Classes --- */
.hidden {
    display: none !important;
}

/* --- Responsive Aanpassingen --- */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px 15px;
        min-height: calc(100vh - 20px);
    }
    
    #logo {
        max-width: 160px;
    }
    
    #question-text {
        font-size: 1.2em;
    }
    
    #result-text {
        font-size: 1.3em;
    }
    
    button, .submit-button {
        width: 90%;
        padding: 12px 20px;
    }
    
    #play-again-button, #share-button {
        min-width: 180px !important;
        padding: 12px 20px !important;
    }
    
    .button-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .button-icon {
        margin-right: 10px;
    }
    
    .emoji-button {
        font-size: 2.3em;
        padding: 12px;
    }
    
    .cork-game-area {
        height: 200px;
    }
    
    #header-feedback {
        font-size: 1em;
        min-height: 1.3em;
        margin-bottom: 10px;
    }
    
    #wine-fact-area {
        padding: 15px;
    }
}

/* --- Cookie Consent Banner --- */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(51, 51, 51, 0.95); /* Donkergrijs, licht transparant */
    color: #fff;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* Zorg dat het boven alles staat */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.9em;
    backdrop-filter: blur(5px); /* Optioneel: blur achtergrond */
    -webkit-backdrop-filter: blur(5px); /* Voor Safari */
    transition: transform 0.5s ease-in-out; /* Animatie */
    transform: translateY(100%); /* Start buiten beeld */
}

/* Class om banner zichtbaar te maken (wordt door JS toegevoegd) */
.cookie-consent-banner.visible {
    transform: translateY(0%); /* Schuif in beeld */
}

/* Verberg banner initieel (als JS niet draait/consent al gegeven) */
.cookie-consent-banner.hidden {
    display: none; /* Start verborgen */
    transform: translateY(100%); /* Zorg dat het ook uit beeld is */
}


.cookie-consent-banner p {
    margin-bottom: 10px;
    max-width: 800px; /* Voorkom te brede tekst op grote schermen */
    line-height: 1.5;
}

.cookie-consent-banner a {
    color: var(--wine-color-light); /* Gebruik je thema kleur */
    text-decoration: underline;
    font-weight: bold;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Styling voor de knoppen in de cookie banner */
.cookie-buttons button {
    padding: 8px 18px;
    border: none;
    border-radius: var(--button-border-radius); /* Gebruik dezelfde radius */
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-size: 0.95em;
    min-width: 100px;
    font-family: 'Quicksand', sans-serif; /* Zorg dat font consistent is */
    /* Reset button defaults */
    position: relative;
    overflow: hidden;
    color: white; /* Standaard tekstkleur */
    text-align: center;
    width: auto;
    max-width: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtiele schaduw */
    transform: translateY(0);
}

.cookie-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.cookie-buttons button:active {
     transform: translateY(0px);
     box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


#cookie-accept-button {
    background-color: var(--button-play-again); /* Groen voor accept */
    color: white;
}
#cookie-accept-button:hover {
    background-color: var(--button-play-again-hover);
}

#cookie-decline-button {
    background-color: #aaa; /* Grijs voor decline */
    color: #333;
}
#cookie-decline-button:hover {
    background-color: #999;
}

/* Responsive banner layout */
@media (min-width: 600px) {
    .cookie-consent-banner {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        text-align: left;
        padding: 15px 30px;
    }
    .cookie-consent-banner p {
        margin-bottom: 0;
        margin-right: 20px;
    }
     .cookie-buttons {
        margin-top: 0;
    }
}