#compound-craft-game {
    font-family: 'Arial', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    color: #333;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5em;
    font-size: 1.3em;
    font-weight: bold;
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.game-area {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5em;
    gap: 20px;
}

/* Reaction Vessel Styling */
.reaction-vessel {
    border: 3px solid #2c3e50;
    border-radius: 20px;
    padding: 1.5em;
    width: 45%;
    min-height: 200px;
    background: linear-gradient(45deg, #f39c12, #e67e22);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 0 8px 16px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.reaction-vessel h3 {
    margin: 0 0 15px 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-align: center;
}

.vessel-interior {
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    min-height: 120px;
    position: relative;
    padding: 15px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

/* Animated Bubbles */
.bubbles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.bubble {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    animation: float 3s infinite ease-in-out;
}

.bubble:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
    animation-duration: 2.5s;
}

.bubble:nth-child(2) {
    left: 50%;
    animation-delay: 1s;
    animation-duration: 3s;
}

.bubble:nth-child(3) {
    left: 80%;
    animation-delay: 2s;
    animation-duration: 2.8s;
}

@keyframes float {
    0% {
        bottom: 0;
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
    100% {
        bottom: 100%;
        opacity: 0;
        transform: scale(0.8);
    }
}

.elements-in-vessel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 60px;
    position: relative;
    z-index: 2;
}

/* Element Inventory Styling */
.element-inventory {
    border: 3px solid #27ae60;
    border-radius: 20px;
    padding: 1.5em;
    width: 45%;
    min-height: 200px;
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.element-inventory h3 {
    margin: 0 0 15px 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-align: center;
}

.elements {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(255,255,255,0.9);
    padding: 15px;
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.element {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border-radius: 8px;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    font-weight: bold;
    cursor: grab;
    user-select: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 2px solid #2980b9;
}

.element:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #5dade2, #3498db);
}

.element:active {
    cursor: grabbing;
    transform: scale(0.95);
}

/* Orders Section */
.orders {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.orders h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

#order-text {
    font-size: 1.1em;
    font-weight: bold;
    color: #34495e;
    margin-bottom: 15px;
}

/* Action Buttons */
.action-btn {
    padding: 12px 24px;
    margin-right: 10px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-btn.primary {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.action-btn.primary:hover {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
}

.action-btn.secondary {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.action-btn.secondary:hover {
    background: linear-gradient(45deg, #e67e22, #f39c12);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(243, 156, 18, 0.4);
}

.clue-text {
    margin-top: 15px;
    padding: 10px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-style: italic;
}

/* Game Rules Popup */
.game-rules-popup {
    background: white;
    border: 3px solid #3498db;
    border-radius: 15px;
    padding: 2em;
    max-width: 500px;
    margin: 2em auto;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.game-rules-popup h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.game-rules-popup ul {
    text-align: left;
    margin: 20px 0;
    padding-left: 20px;
}

.game-rules-popup li {
    margin: 8px 0;
    color: #34495e;
}

/* Drag and Drop Effects */
.reaction-vessel.drag-over {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border-color: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
    }
    
    .reaction-vessel, .element-inventory {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .top-bar {
        font-size: 1.1em;
    }
    
    .element {
        width: 40px;
        height: 40px;
        line-height: 40px;
    }
}
