/* css/chest_battle.css */

.chest-area {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0.5;
    /* Takes less space than combatants */
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chest-image {
    width: 220px;
    height: auto;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
    transition: all 0.4s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.chest-area.drag-over .chest-image {
    transform: scale(1.15);
    filter: drop-shadow(0 0 30px #ffd700) brightness(1.2);
}

.chest-area.opening .chest-image {
    animation: openChestAnim 0.6s ease-out forwards;
}

@keyframes openChestAnim {
    0% {
        transform: translateY(0) scale(1.15);
    }

    30% {
        transform: translateY(-30px) scale(1.2) rotate(3deg);
        filter: brightness(2) drop-shadow(0 0 40px #ffd700);
    }

    100% {
        transform: translateY(0) scale(1.15) rotate(0);
        filter: brightness(1.3) drop-shadow(0 0 20px #ffd700);
    }
}

.drag-options-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.draggable-answer {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 15px 25px;
    min-width: 120px;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.draggable-answer:active {
    cursor: grabbing;
}

.draggable-answer:hover {
    transform: translateY(-8px);
    border-color: #ffd700;
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.2), 0 0 15px rgba(0, 0, 0, 0.5);
    background: linear-gradient(145deg, rgba(45, 55, 75, 0.9), rgba(30, 41, 59, 0.9));
}

.answer-icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.answer-value {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffd700;
}

.dragging {
    opacity: 0.4;
    transform: scale(0.85);
    z-index: 100;
}

.problem-header-minimal {
    margin-bottom: 25px;
    text-align: center;
}

#chest-problem-text {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 5px;
}

.drag-instruction {
    color: #ffd700;
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Animations for damage */
.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

@media (max-width: 900px) {
    .chest-image {
        width: 150px;
    }

    #chest-problem-text {
        font-size: 2.2rem;
    }
}