/* Bottle Styles */
.bottle {
    width: 90px;
    height: 200px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.bottle:hover {
    transform: translateY(-5px) scale(1.05);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

.bottle.selected {
    transform: translateY(-10px) scale(1.1);
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 1));
    }
}

.bottle.shake {
    animation: shake-bottle 0.5s ease;
}

@keyframes shake-bottle {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-8px) rotate(-3deg); }
    50% { transform: translateX(8px) rotate(3deg); }
    75% { transform: translateX(-8px) rotate(-3deg); }
}

.bottle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Glass Container - SVG Style */
.glass-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.1) 30%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(200, 200, 255, 0.1) 70%,
        rgba(255, 255, 255, 0.3) 100%
    );
    border-radius: 12px 12px 18px 18px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top: 2px solid rgba(255, 255, 255, 0.6);
    border-bottom: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        inset 2px 2px 15px rgba(255, 255, 255, 0.3),
        inset -2px -2px 15px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse;
    padding: 6px;
    backdrop-filter: blur(2px);
}

/* Shine effect on glass */
.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    width: 25%;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.5), 
        rgba(255, 255, 255, 0.2),
        transparent
    );
    border-radius: 8px;
    pointer-events: none;
    z-index: 10;
}

/* Highlight on top edge */
.glass-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    border-radius: 12px 12px 0 0;
    pointer-events: none;
    z-index: 10;
}

/* Liquid Layers */
.liquid-layer {
    width: 100%;
    height: 25%;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    border-radius: 4px;
    box-shadow: 
        inset 0 3px 8px rgba(0, 0, 0, 0.2),
        inset 0 -1px 4px rgba(255, 255, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Liquid surface with wave effect */
.liquid-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.5),
        rgba(255, 255, 255, 0.2),
        transparent
    );
    border-radius: 4px 4px 0 0;
    animation: wave 3s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.5;
    }
    50% {
        transform: translateX(3px);
        opacity: 0.7;
    }
}

/* Liquid shadow at bottom */
.liquid-layer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.3),
        rgba(0, 0, 0, 0.1),
        transparent
    );
}

/* Pour Animations */
@keyframes pour-out {
    0% { 
        transform: translateY(0) scaleY(1); 
        opacity: 1; 
    }
    50% {
        transform: translateY(-100px) scaleY(1.5);
        opacity: 0.7;
    }
    100% { 
        transform: translateY(-220px) scaleY(0.5); 
        opacity: 0; 
    }
}

@keyframes pour-in {
    0% { 
        transform: translateY(-220px) scaleY(0.5); 
        opacity: 0; 
    }
    50% {
        transform: translateY(-100px) scaleY(1.5);
        opacity: 0.7;
    }
    100% { 
        transform: translateY(0) scaleY(1); 
        opacity: 1; 
    }
}

.pouring-out {
    animation: pour-out 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pouring-in {
    animation: pour-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Liquid Colors with Gradients */
.color-red { 
    background: linear-gradient(180deg, 
        #ff6b6b 0%, 
        #ee5a6f 50%, 
        #d63031 100%
    );
}

.color-blue { 
    background: linear-gradient(180deg, 
        #74b9ff 0%, 
        #0984e3 50%, 
        #0652dd 100%
    );
}

.color-green { 
    background: linear-gradient(180deg, 
        #55efc4 0%, 
        #00b894 50%, 
        #00a383 100%
    );
}

.color-yellow { 
    background: linear-gradient(180deg, 
        #ffeaa7 0%, 
        #fdcb6e 50%, 
        #f39c12 100%
    );
}

.color-purple { 
    background: linear-gradient(180deg, 
        #a29bfe 0%, 
        #6c5ce7 50%, 
        #5f27cd 100%
    );
}

.color-orange { 
    background: linear-gradient(180deg, 
        #fab1a0 0%, 
        #ff7675 50%, 
        #fd7e14 100%
    );
}

.color-pink { 
    background: linear-gradient(180deg, 
        #fd79a8 0%, 
        #e84393 50%, 
        #d63031 100%
    );
}

.color-cyan { 
    background: linear-gradient(180deg, 
        #81ecec 0%, 
        #00cec9 50%, 
        #00b894 100%
    );
}

.color-teal {
    background: linear-gradient(180deg,
        #20E3B2 0%,
        #29ffc6 50%,
        #00d2d3 100%
    );
}

.color-lime {
    background: linear-gradient(180deg,
        #cddc39 0%,
        #9ccc65 50%,
        #7cb342 100%
    );
}

.color-indigo {
    background: linear-gradient(180deg,
        #5c6bc0 0%,
        #3f51b5 50%,
        #303f9f 100%
    );
}

.color-brown {
    background: linear-gradient(180deg,
        #a1887f 0%,
        #795548 50%,
        #5d4037 100%
    );
}

/* Empty bottle indicator */
.bottle.empty .glass-container {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
}

/* Full bottle indicator */
.bottle.complete .glass-container {
    animation: complete-glow 2s ease-in-out infinite;
}

@keyframes complete-glow {
    0%, 100% {
        box-shadow: 
            inset 2px 2px 15px rgba(255, 255, 255, 0.3),
            inset -2px -2px 15px rgba(0, 0, 0, 0.1),
            0 8px 25px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(0, 255, 0, 0.3);
    }
    50% {
        box-shadow: 
            inset 2px 2px 15px rgba(255, 255, 255, 0.3),
            inset -2px -2px 15px rgba(0, 0, 0, 0.1),
            0 8px 25px rgba(0, 0, 0, 0.4),
            0 0 40px rgba(0, 255, 0, 0.6);
    }
}

/* Hint highlight */
.bottle.hint-from {
    animation: hint-pulse 1s ease-in-out 3;
}

.bottle.hint-to {
    animation: hint-pulse 1s ease-in-out 3;
    animation-delay: 0.5s;
}

@keyframes hint-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(255, 255, 0, 1));
    }
}

/* Responsive Bottles */
@media (max-width: 768px) {
    .bottle {
        width: 80px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .bottle {
        width: 70px;
        height: 160px;
    }
    
    .glass-container {
        border-width: 2px;
        padding: 5px;
    }
}