/* --- CONFIGURATION GLOBALE & POLICES --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

:root {
    --bg-color: #e0f7fa;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-dark: #2c3e50;
    --accent-green: #00b894;
    --color-rum: #eccc68;
    --color-lime: #badc58;
    --color-sugar: #f5f6fa;
    --color-soda: #dff9fb;
    --color-mint: #2ecc71;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--text-dark);
}

/* --- CONTENEUR PRINCIPAL (CARTE) --- */
.app-container {
    display: flex;
    flex-direction: row;
    width: 900px;
    height: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    overflow: hidden;
}

/* --- PARTIE GAUCHE : CONTRÔLES --- */
.controls-panel {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #16a085;
}

p.subtitle {
    margin-top: 0;
    opacity: 0.7;
    margin-bottom: 40px;
}

.input-group {
    margin-bottom: 30px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.value-display {
    color: var(--accent-green);
}

/* Styling des Sliders */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--accent-green);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

/* Liste des ingrédients (texte) */
.recipe-list {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.4);
    padding: 20px;
    border-radius: 15px;
}

.recipe-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.recipe-item span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* --- PARTIE DROITE : VISUALISATION --- */
.visual-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 50px;
}

/* Le Verre */
.glass-container {
    position: relative;
    width: 200px;
    height: 350px;
}

.glass {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-left: 2px solid rgba(255, 255, 255, 0.6);
    border-right: 2px solid rgba(255, 255, 255, 0.6);
    border-bottom: 8px solid rgba(255, 255, 255, 0.6);
    border-radius: 0 0 30px 30px;
    /* Forme légèrement trapézoïdale */
    clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse;
    /* Empilement du bas vers le haut */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Les couches liquides */
.liquid {
    width: 100%;
    transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.6);
    font-weight: bold;
    position: relative;
}

/* Couleurs des ingrédients */
.liquid.mint {
    background: var(--color-mint);
}

.liquid.sugar {
    background: var(--color-sugar);
}

.liquid.lime {
    background: var(--color-lime);
}

.liquid.rum {
    background: var(--color-rum);
}

.liquid.soda {
    background: var(--color-soda);
}

/* Effet de bulles dans le soda */
.bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: rise 4s infinite ease-in;
}

@keyframes rise {
    0% {
        bottom: -10px;
        transform: translateX(0);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        bottom: 100%;
        transform: translateX(-20px);
        opacity: 0;
    }
}

/* Décorations (Citron & Paille) */
.garnish-lime {
    position: absolute;
    top: -15px;
    right: -10px;
    width: 60px;
    height: 60px;
    background: #badc58;
    border-radius: 50%;
    border: 4px solid #6ab04c;
    clip-path: polygon(50% 50%, 100% 0, 100% 50%, 100% 100%, 0 100%, 0 0);
    transform: rotate(15deg);
    z-index: 10;
}

.straw {
    position: absolute;
    width: 12px;
    height: 450px;
    background: repeating-linear-gradient(45deg,
            #333,
            #333 10px,
            #fff 10px,
            #fff 20px);
    top: -150px;
    left: 40px;
    transform: rotate(-10deg);
    z-index: -1;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

/* Responsive Mobile */
@media (max-width: 800px) {
    .app-container {
        flex-direction: column-reverse;
        width: 95%;
        height: 90vh;
        overflow-y: auto;
    }

    .glass-container {
        height: 250px;
        width: 150px;
    }

    .visual-panel {
        padding-top: 20px;
        flex: 0.8;
    }

    .controls-panel {
        padding: 20px;
    }
}