/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    color: white;
}

header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    max-width: 800px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0 #000;
    color: #fff;
}

.subtitle {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #fffd8c;
}

.lab-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.beakers-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    flex: 1;
    min-width: 300px;
}

.primary-beakers {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.beaker {
    width: 100px;
    height: 180px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0 0 30px 30px;
    position: relative;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s;
}

.beaker:hover {
    transform: translateY(-5px);
}

.beaker-label {
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 1px 1px 0 #000;
}

.red-beaker .liquid {
    background: linear-gradient(to bottom, #ff0000, #cc0000);
}

.green-beaker .liquid {
    background: linear-gradient(to bottom, #00ff00, #00cc00);
}

.blue-beaker .liquid {
    background: linear-gradient(to bottom, #0000ff, #0000cc);
}

.liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    border-radius: 0 0 25px 25px;
    transition: height 0.5s;
}

.color-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.color-buttons button {
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.color-buttons button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 12px rgba(0, 0, 0, 0.3);
}

#add-red {
    background: linear-gradient(to bottom, #ff6b6b, #ff3838);
}

#add-green {
    background: linear-gradient(to bottom, #78e08f, #38ada9);
}

#add-blue {
    background: linear-gradient(to bottom, #4a69bd, #2d3e94);
}

.mix-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

.mix-beaker {
    width: 150px;
    height: 250px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0 0 40px 40px;
    position: relative;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.mixed-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    border-radius: 0 0 35px 35px;
    transition: background 0.5s, height 0.5s;
}

.color-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    width: 100%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.color-value {
    font-size: 1.8rem;
    margin: 10px 0;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
}

.color-name {
    font-size: 1.5rem;
    font-style: italic;
    color: #fffd8c;
    margin-bottom: 15px;
}

.controls {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

#reset-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(to bottom, #4a69bd, #2d3e94);
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

#reset-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 12px rgba(0, 0, 0, 0.3);
}

.instructions {
    max-width: 800px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.instructions h2 {
    color: #fffd8c;
    margin-bottom: 10px;
    text-align: center;
}

.instructions-list {
    list-style-type: none;
    padding: 0 15px;
}

.instructions-list li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.4;
}

.pour-animation {
    position: absolute;
    width: 20px;
    background: currentColor;
    border-radius: 10px;
    opacity: 0;
    z-index: 10;
}

@keyframes pour {
    0% { height: 0; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { height: 100px; opacity: 0; }
}

footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .lab-container {
        flex-direction: column;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .color-buttons {
        flex-direction: column;
    }
}