/* Emotions Game Styles */
#emotions-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex-grow: 1;
    min-height: 0;
    width: 100%;
    padding: 10px;
    padding-top: 60px;
    /* Reduced for mobile */
    padding-bottom: 80px;
    box-sizing: border-box;
    gap: 10px;
    overflow-y: auto;
}

#emotions-stage.hidden {
    display: none !important;
}

/* The Face Canvas - Responsive! */
.face-container {
    width: 60vmin;
    height: 60vmin;
    max-width: 300px;
    max-height: 300px;
    background: #FFD54F;
    border-radius: 50%;
    border: 6px solid #FFC107;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.face-container.correct-pulse {
    animation: correctPulse 1s;
}

@keyframes correctPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 30px rgba(76, 175, 80, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Drop Zones (Guides) - Percentage Based */
.drop-zone {
    position: absolute;
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s, border-color 0.2s;
}

.zone-eyes {
    width: 70%;
    height: 30%;
    top: 35%;
    left: 50%;
    border-radius: 60px;
}

.zone-mouth {
    width: 50%;
    height: 25%;
    top: 75%;
    left: 50%;
    border-radius: 40px;
}

.drop-zone.hovered {
    background: rgba(255, 255, 255, 0.5);
    border-color: #888;
}

/* Placed Parts on Face */
.placed-part {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;

    /* SVG sizing handled by container */
}

/* Scale SVGs inside placed parts */
.placed-part svg {
    width: 100%;
    height: 100%;
}

/* Instruction Text */
.emotion-instruction {
    background: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 3px solid #FFC107;
    flex-shrink: 0;
    max-width: 90%;
}

.emotion-instruction .target-emoji {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

/* Parts Palette */
.parts-palette {
    background: white;
    border-radius: 20px;
    padding: 10px;
    width: 95%;
    max-width: 450px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 3px solid #eee;
    flex-shrink: 1;
    /* Allow shrinking if needed, but wrapping handles it */
}

.part-item {
    width: 70px;
    height: 60px;
    cursor: grab;
    user-select: none;
    transition: transform 0.2s;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid #ddd;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.part-item svg {
    width: 90%;
    height: 90%;
}

.part-item:active {
    cursor: grabbing;
    transform: scale(0.95);
    border-color: #FFD54F;
}

/* --- Media Query: Desktop / Landscape --- */
@media (min-width: 768px),
(orientation: landscape) and (min-height: 500px) {
    #emotions-stage {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding-top: 80px;
        gap: 40px;
        overflow: hidden;
        /* No scroll on desktop usually */
    }

    .emotion-instruction {
        position: absolute;
        top: 90px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.5rem;
    }

    .face-container {
        width: 400px;
        height: 400px;
        max-width: none;
        max-height: none;
    }

    .parts-palette {
        width: 200px;
        flex-direction: row;
        /* Keep grid but vertical container */
        align-content: flex-start;
        max-height: 80vh;
        overflow-y: auto;
    }
}