/* Boss Fight Button Styles */
.boss-fight-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.85) 0%, rgba(20, 40, 80, 0.85) 100%);
    border: 2px solid rgba(255, 68, 68, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-top: 12px;
    max-width: 100px;
}

.boss-fight-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 68, 68, 0.4);
    border-color: rgba(255, 68, 68, 0.6);
}

.boss-fight-button.available {
    border-color: rgba(255, 215, 0, 0.7);
    animation: bossFightGlow 2s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    max-width: 140px;
}

@keyframes bossFightGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
        border-color: rgba(255, 215, 0, 0.7);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 215, 0, 0.6);
        border-color: rgba(255, 215, 0, 0.9);
    }
}

.boss-fight-icon-wrapper {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boss-fight-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(255, 68, 68, 0.5));
}

.boss-fight-button.available .boss-fight-icon {
    filter: drop-shadow(0 2px 12px rgba(255, 215, 0, 0.7));
    animation: bossFightPulse 2s ease-in-out infinite;
}

@keyframes bossFightPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.boss-fight-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    line-height: 1.2;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    min-width: 20px;
}

.boss-fight-button.available .boss-fight-label {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

/* Boss Fight Modal */
.boss-fight-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.boss-fight-modal-overlay.visible {
    display: flex;
}

.boss-fight-modal {
    background: linear-gradient(160deg, rgba(20, 30, 60, 0.98) 0%, rgba(40, 50, 90, 0.98) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.boss-fight-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.boss-fight-modal-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

.boss-fight-modal-tips {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.boss-fight-modal-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 3px solid rgba(255, 215, 0, 0.5);
}

.boss-fight-modal-tip-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.boss-fight-modal-tip-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.boss-fight-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.boss-fight-modal-button {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.boss-fight-modal-start {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.3) 0%, rgba(255, 100, 100, 0.5) 100%);
    color: #fff;
    border-color: rgba(255, 68, 68, 0.7);
}

.boss-fight-modal-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.4) 0%, rgba(255, 120, 120, 0.6) 100%);
}

.boss-fight-modal-close {
    background: rgba(60, 60, 60, 0.5);
    color: #ccc;
    border-color: rgba(255, 255, 255, 0.3);
}

.boss-fight-modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: rgba(80, 80, 80, 0.6);
    color: #fff;
}

/* Landscape Mode Optimization for Small iPhones (≤430px height) */
@media (orientation: landscape) and (max-height: 430px) {
    .boss-fight-modal {
        padding: 16px;
        max-height: 80vh;
        display: flex;
        flex-direction: column;
    }

    .boss-fight-modal-title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .boss-fight-modal-description {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .boss-fight-modal-tips {
        gap: 8px;
        margin-bottom: 12px;
        overflow-y: auto;
        flex: 1;
        max-height: calc(80vh - 200px); /* Reserve space for header and footer */
        padding-right: 4px;
    }

    .boss-fight-modal-tip {
        padding: 8px;
        gap: 8px;
    }

    .boss-fight-modal-tip-icon {
        font-size: 16px;
    }

    .boss-fight-modal-tip-text {
        font-size: 11px;
        line-height: 1.3;
    }

    .boss-fight-modal-buttons {
        gap: 8px;
    }

    .boss-fight-modal-button {
        padding: 10px 24px;
        font-size: 13px;
    }
}
