/* Boss Warning */
#boss-warning {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 0, 0, 0.1);
    display: none; /* 默认隐藏 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 100;
    /* 赛博朋克扫描线背景 */
    background-image: linear-gradient(0deg, transparent 24%, rgba(255, 0, 0, .3) 25%, rgba(255, 0, 0, .3) 26%, transparent 27%, transparent 74%, rgba(255, 0, 0, .3) 75%, rgba(255, 0, 0, .3) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(255, 0, 0, .3) 25%, rgba(255, 0, 0, .3) 26%, transparent 27%, transparent 74%, rgba(255, 0, 0, .3) 75%, rgba(255, 0, 0, .3) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
}

#boss-warning.active {
    display: flex; /* 激活时才显示 */
    animation: flashRed 0.5s infinite;
}

@keyframes flashRed {
    0% { background-color: rgba(255, 0, 0, 0.1); }
    50% { background-color: rgba(255, 0, 0, 0.3); }
    100% { background-color: rgba(255, 0, 0, 0.1); }
}

.warning-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 80px;
    color: #ff0000; 
    font-weight: bold;
    letter-spacing: 15px;
    text-shadow: 0 0 20px #ff0000, 0 0 10px #fff; 
    transform: skew(-10deg);
}

.warning-sub {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    color: #fff;
    letter-spacing: 5px;
    margin-top: 20px;
    text-shadow: 0 0 10px #ff0000;
    animation: blink 0.2s infinite;
}

/* Achievement Panel */
#achievement-panel {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: rgba(10, 10, 20, 0.95);
    border: 2px solid #00e5ff; /* Cyan Border */
    box-shadow: 0 0 20px #00e5ff;
    border-radius: 5px;
    padding: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Orbitron', sans-serif;
}

#achievement-panel h2 {
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
    letter-spacing: 2px;
    margin-top: 0;
}

#achievement-panel.hidden {
    display: none !important; 
}

#badge-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    margin-top: 20px;
    overflow-y: auto;
}

.badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    opacity: 0.5;
    transition: all 0.3s;
}

.badge.unlocked {
    opacity: 1;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.1);
}

.badge-icon {
    font-size: 30px;
    margin-bottom: 5px;
}

.badge-name {
    font-size: 12px;
    color: #ccc;
}

.badge.unlocked .badge-name {
    color: #ffd700;
    font-weight: bold;
}

#close-achievement {
    margin-top: 20px;
    background: transparent;
    border: 1px solid #00e5ff;
    color: #00e5ff;
    box-shadow: none;
}
#close-achievement:hover {
    background: rgba(0, 229, 255, 0.2);
    box-shadow: 0 0 10px #00e5ff;
}

#show-achievement-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 1px solid #ffd700;
    color: #ffd700;
    padding: 5px 15px;
    font-size: 14px;
    z-index: 20;
    box-shadow: none;
}
#show-achievement-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 10px #ffd700;
}

/* Screen Shake Animation Class (JS controlled) */
.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); }
}