@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes bubble {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(0.95); }
}

@keyframes wiggle {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0.8; }
    100% { transform: translateY(-100px) scale(1.5); opacity: 0; }
}

@keyframes waterMoleculeMotion {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(5px) translateX(-15px); }
    75% { transform: translateY(-10px) translateX(5px); }
    100% { transform: translateY(0) translateX(0); }
}

@keyframes oilMoleculeMotion {
    0% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(5px) translateX(5px); }
    100% { transform: translateY(0) translateX(0); }
}

.font-geist-mono {
    font-family: 'Inter', monospace;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Kitchen Scene */
.kitchen-bg {
    background-image: url('kitchen-bg.svg');
    background-size: cover;
    background-position: center;
}

.water-drop-icon, .oil-drop-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.water-drop-icon {
    background-image: url('water-drop.svg');
}

.oil-drop-icon {
    background-image: url('oil-drop.svg');
}

.water-drop-icon-small, .oil-drop-icon-small {
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.water-drop-icon-small {
    background-image: url('water-drop.svg');
}

.oil-drop-icon-small {
    background-image: url('oil-drop.svg');
}

.speech-bubble {
    position: relative;
    background: #f0f4f8;
    border-radius: 0.5rem;
    padding: 0.75rem;
    animation: bubble 4s ease-in-out infinite;
}

.speech-bubble:after {
    content: '';
    position: absolute;
    left: -8px;
    top: 10px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: #f0f4f8;
    border-left: 0;
    margin-top: -8px;
}

.water-pot, .oil-pot {
    width: 80px;
    height: 60px;
    background-image: url('pot.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.water-pot-small, .oil-pot-small {
    width: 60px;
    height: 45px;
    background-image: url('pot.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}

.stove {
    width: 200px;
    height: 40px;
    background-image: url('stove.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Experiment Elements */
.water-level, .oil-level {
    position: absolute;
    width: 60%;
    height: 30%;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 0 0;
    transition: height 0.5s, opacity 0.5s;
}

.water-level {
    background-color: rgba(59, 130, 246, 0.6);
}

.oil-level {
    background-color: rgba(245, 158, 11, 0.6);
}

.water-vapor, .water-vapor-small {
    width: 80px;
    height: 80px;
    background-image: url('water-vapor.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    top: -60px;
}

.water-vapor-small {
    width: 40px;
    height: 40px;
    top: -30px;
}

/* Molecule Animations */
.water-molecules-animation, .oil-molecules-animation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.water-molecule, .oil-molecule {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.water-molecule {
    width: 30px;
    height: 30px;
    background-image: url('molecule-water.svg');
    animation: waterMoleculeMotion 5s infinite ease-in-out;
}

.oil-molecule {
    width: 50px;
    height: 50px;
    background-image: url('molecule-oil.svg');
    animation: oilMoleculeMotion 8s infinite ease-in-out;
}

/* Option Selections */
.observation-option, .reason-option, .final-question-option {
    transition: all 0.2s;
}

.observation-option:hover, .reason-option:hover, .final-question-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.option-selected {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.option-correct {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

.option-incorrect {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

/* Feedback Messages */
#answer-feedback, #final-feedback {
    transition: all 0.3s;
}

.feedback-correct {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    color: #047857;
}

.feedback-incorrect {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    color: #b91c1c;
}

/* Animations for interaction */
.pot-wiggle {
    animation: wiggle 0.5s ease-in-out;
}

.vapor-rise {
    animation: rise 3s infinite ease-out;
}

/* Mobile-specific styles */
@media (max-width: 640px) {
    .experiment-container, .molecules-container {
        height: 350px;
    }
    
    .water-pot, .oil-pot {
        width: 60px;
        height: 45px;
    }
    
    .stove {
        width: 150px;
        height: 30px;
    }
    
    .control-panel {
        flex-direction: column;
        bottom: 10px;
        right: 10px;
        left: auto;
        transform: none;
    }
    
    .experiment-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
}
