/* modals.css - All Fullscreen Overlays and Dialogs */

/* Sacrifice Confirmation Modal */
#sacrifice-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex; justify-content: center; align-items: center;
    z-index: 1001; /* [User Request] Top Overlay z=1001 */
    backdrop-filter: blur(10px);
}

#sacrifice-content {
    width: 550px; padding: 40px; text-align: center; position: relative;
    background: linear-gradient(145deg, #1a0000, #0a0a0a);
    border: 4px solid #800; border-radius: 30px 30px 10px 10px;
    box-shadow: 0 0 60px rgba(139, 0, 0, 0.4), inset 0 0 30px rgba(0, 0, 0, 0.8);
    animation: modalOminousPulse 2s infinite alternate;
}

#sacrifice-content::before {
    content: "💀 FORBIDDEN RITUAL 💀";
    position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
    background: #000; padding: 5px 20px; color: #f00;
    font-family: 'Cinzel', serif; font-size: 18px;
    border: 2px solid #800; border-radius: 5px; letter-spacing: 2px;
    white-space: nowrap;
}

#sacrifice-header { font-size: 36px; color: #ff1744; font-weight: bold; margin-bottom: 25px; text-shadow: 0 0 15px #f00; text-transform: uppercase; }
#sacrifice-body { font-size: 24px; color: #ccc; line-height: 1.6; margin-bottom: 40px; font-family: 'Noto Sans KR', sans-serif; }

#sacrifice-footer {
    display: flex;
    gap: 20px;
    justify-content: center;
}

#sacrifice-confirm-btn, #sacrifice-cancel-btn {
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    font-family: 'Noto Sans KR', sans-serif;
}

#sacrifice-confirm-btn {
    background: linear-gradient(to bottom, #800, #300);
    color: #fff;
    border: 2px solid #f00;
}

#sacrifice-confirm-btn:hover {
    background: #f00;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
    transform: scale(1.05);
}

#sacrifice-cancel-btn {
    background: #222;
    color: #aaa;
    border: 2px solid #444;
}

#sacrifice-cancel-btn:hover {
    background: #333;
    color: #fff;
    border-color: #888;
    transform: scale(1.05);
}

/* Unlock Modal */
#unlock-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); 
    z-index: 1001; /* [User Request] Top Overlay z=1001 */
    display: flex; justify-content: center; align-items: center;
}

#unlock-content {
    width: 840px; padding: 75px; text-align: center;
    background: linear-gradient(145deg, #1a1a1a, #000);
    border: 9px solid #ffd700; border-radius: 45px;
    box-shadow: 0 0 120px rgba(255, 215, 0, 0.3);
}

/* Game Over Screen */
#game-over-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(40, 0, 0, 0.95) 0%, rgba(0, 0, 0, 1) 100%);
    z-index: 1001; /* [User Request] Top Overlay z=1001 */
    display: flex; justify-content: center; align-items: center;
}

#game-over-title { color: #ff0000; font-size: 84px; animation: eeriePulse 3s infinite alternate; }

/* Boss Victory Overlay */
.boss-victory-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(40, 0, 0, 0.9) 0%, #000 90%);
    display: flex; justify-content: center; align-items: center;
    z-index: 1001; /* [User Request] Top Overlay z=1001 */
    backdrop-filter: blur(15px);
}

.boss-victory-content {
    text-align: center; width: 100%; padding: 120px 0;
    border-top: 4px solid #ff4500; border-bottom: 4px solid #ff4500;
    background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.4), transparent);
}

/* Collections (도감) Overlay */
#collections-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; /* [User Request] Overlay z=1000 */
    backdrop-filter: blur(15px);
}

#collections-content {
    width: 1000px; max-height: 90%; padding: 50px;
    background: linear-gradient(145deg, #1a1a1a, #050505);
    border: 5px solid #ffd700; border-radius: 50px 50px 20px 20px;
    display: flex; flex-direction: column; gap: 20px;
    box-shadow: 0 0 100px rgba(255, 215, 0, 0.2), inset 0 0 40px rgba(0, 0, 0, 0.8);
    position: relative;
    border-top: 8px solid #ffd700;
}

#collections-content::before {
    content: "📖 COLLECTIONS 📖";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    padding: 5px 30px;
    color: #ffd700;
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #ffd700;
    border-radius: 10px;
    letter-spacing: 4px;
    z-index: 10;
}

#collections-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 25px; margin-bottom: 20px;
}

#collections-tabs { display: flex; gap: 10px; }

.col-tab-btn {
    padding: 15px 40px; font-size: 30px; font-weight: bold;
    background: none; color: #888; border: none;
    border-bottom: 6px solid transparent; cursor: pointer; transition: all 0.3s;
}

.col-tab-btn.active {
    color: #ffd700; border-bottom-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

#close-collections {
    background: none; border: none; color: #ff4500; font-size: 54px;
    cursor: pointer; font-weight: bold; transition: color 0.2s;
}
#close-collections:hover { color: #fff; text-shadow: 0 0 15px #fff; }

.collections-section { display: none; flex: 1; overflow-y: auto; scrollbar-width: none; }
.collections-section::-webkit-scrollbar { display: none; }
.collections-section.active { display: flex; flex-direction: column; gap: 20px; }

/* Ghost Section Styles */
.col-category-nav { display: flex; gap: 10px; margin-bottom: 10px; }
.col-cat-btn {
    padding: 10px 20px; font-size: 28px; font-weight: bold;
    background: #111; color: #aaa; border: 1px solid #333;
    border-radius: 12px; cursor: pointer; transition: all 0.2s;
}
.col-cat-btn.active { background: #333; color: #ffd700; border-color: #ffd700; box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }

.collections-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 15px;
    padding: 20px; background: rgba(0,0,0,0.4); border-radius: 15px;
    border: 1px solid #222;
}

.col-item {
    aspect-ratio: 1/1; background: linear-gradient(145deg, #222, #111);
    border: 2px solid #333; border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    font-size: 50px; cursor: pointer; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.col-item:hover { transform: scale(1.1) translateY(-5px); border-color: #ffd700; box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2); }
.col-item.locked { filter: grayscale(1) brightness(0.2); cursor: not-allowed; }

/* Exorcist Section Styles */
#exorcist-tree-container {
    display: flex; flex-direction: column; gap: 15px; padding: 10px;
}

.ex-tree-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 15px 25px;
    background: rgba(255,215,0,0.03); border-radius: 15px;
    border: 1px solid rgba(255,215,0,0.1);
}

.ex-node {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    cursor: pointer; transition: transform 0.2s; width: 120px;
}
.ex-node:hover { transform: scale(1.08); }
.ex-node .icon { font-size: 40px; filter: drop-shadow(0 0 5px rgba(255,215,0,0.3)); }
.ex-node .icon.locked { filter: grayscale(1) brightness(0.3); }
.ex-node .name { font-size: 16px; font-weight: bold; color: #ffd700; text-align: center; text-shadow: 0 2px 4px #000; }

.ex-arrow {
    color: #ffd700; font-size: 30px; opacity: 0.5;
    text-shadow: 0 0 10px #ffd700;
    animation: arrowPulse 1.5s infinite alternate;
}

@keyframes arrowPulse {
    from { opacity: 0.3; transform: translateX(0); }
    to { opacity: 0.8; transform: translateX(5px); }
}

/* Updated Details Pane for readability */
#collection-details {
    height: 240px; padding: 0; 
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    display: flex; overflow: hidden;
    box-shadow: inset 0 0 30px #000;
}

#col-info-pane {
    flex: 1; padding: 30px;
    display: flex; flex-direction: column;
    justify-content: center;
}

.col-detail-header { display: flex; align-items: center; gap: 30px; margin-bottom: 15px; }
.col-detail-icon { 
    font-size: 72px; background: #222; width: 100px; height: 100px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 20px; border: 2px solid #444;
}
.col-detail-title-group { flex: 1; }
.col-detail-title { font-size: 42px; font-weight: 900; color: #fff; margin-bottom: 8px; }
.col-detail-stats { 
    display: flex; gap: 20px; font-size: 20px; color: #ffd700; 
    font-family: monospace; font-weight: bold;
    background: rgba(255,215,0,0.1); padding: 6px 15px; border-radius: 8px;
}

.col-detail-lore { 
    font-size: 22px; color: #ccc; line-height: 1.5; 
    border-left: 5px solid #ffd700; padding-left: 25px;
    font-style: italic; background: rgba(255,255,255,0.03); 
    padding: 15px 25px; border-radius: 0 15px 15px 0;
}

/* Equipment (장비) Overlay */
#equip-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; backdrop-filter: blur(15px);
}

#equip-content {
    width: 1000px; max-height: 90%; padding: 50px;
    background: linear-gradient(145deg, #051015, #000000);
    border: 5px solid #00e5ff; border-radius: 50px 50px 20px 20px;
    display: flex; flex-direction: column; gap: 20px;
    box-shadow: 0 0 100px rgba(0, 229, 255, 0.2), inset 0 0 40px rgba(0, 0, 0, 0.8);
    position: relative;
    border-top: 8px solid #00e5ff;
}

#equip-header {
    display: flex; justify-content: center; align-items: center;
    border-bottom: 2px solid rgba(0, 229, 255, 0.3);
    padding-bottom: 25px; margin-bottom: 40px;
    position: relative;
}

#equip-header h2 {
    color: #00e5ff; margin: 0; font-size: 72px; text-transform: uppercase;
    letter-spacing: 12px; text-shadow: 0 0 30px rgba(0, 229, 255, 0.8); text-align: center;
}

#close-equip {
    background: none; border: none; color: #888; font-size: 54px;
    cursor: pointer; position: absolute; right: 0; transition: color 0.2s;
}
#close-equip:hover { color: #fff; text-shadow: 0 0 15px #fff; }

#equip-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    padding: 20px; flex: 1; overflow-y: auto; scrollbar-width: none;
}
#equip-grid::-webkit-scrollbar { display: none; }

.equip-slot {
    aspect-ratio: 1; background: rgba(0, 229, 255, 0.05);
    border: 2px solid #333; border-radius: 15px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    font-size: 54px; cursor: pointer; transition: all 0.3s;
    position: relative; box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}
.equip-slot:hover { transform: scale(1.05); border-color: #00e5ff; background: rgba(0, 229, 255, 0.1); }
.equip-slot.selected { border-color: #fff; box-shadow: 0 0 30px rgba(0, 229, 255, 0.5); transform: scale(1.08); }

.equip-tier-label {
    position: absolute; bottom: 8px; font-size: 16px; font-weight: bold;
    padding: 2px 8px; border-radius: 4px; text-transform: uppercase;
}
.tier-1 { color: #aaa; } /* Normal */
.tier-2 { color: #00ff00; text-shadow: 0 0 5px #00ff00; } /* Holy */
.tier-3 { color: #ff00ff; text-shadow: 0 0 10px #ff00ff; } /* Legendary */
.tier-4 { color: #ffd700; text-shadow: 0 0 15px #ffd700; animation: gearGlow 2s infinite alternate; } /* Ancient */

@keyframes gearGlow { from { opacity: 0.7; } to { opacity: 1; filter: brightness(1.5); } }

#equip-details {
    margin-top: 40px; padding: 0; min-height: 320px;
    display: flex; gap: 25px; background: transparent;
}

#equip-info-pane {
    flex: 0 0 58%; padding: 35px; background: rgba(0, 0, 0, 0.8);
    border: 3px solid rgba(0, 229, 255, 0.4); border-radius: 20px;
    display: flex; flex-direction: column; justify-content: center;
    box-shadow: inset 0 0 30px #000; box-sizing: border-box;
}

#equip-bonus-pane {
    flex: 1; padding: 30px; background: rgba(0, 15, 20, 0.85);
    border: 3px solid rgba(0, 229, 255, 0.3); border-radius: 20px;
    display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none;
    box-shadow: inset 0 0 30px #000; box-sizing: border-box;
}

.equip-bonus-title {
    color: #00e5ff; font-size: 34px; font-weight: 900; text-align: center;
    margin-bottom: 25px; text-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
    letter-spacing: 2px; border-bottom: 2px solid rgba(0, 229, 255, 0.2); padding-bottom: 10px;
}

/* Animations */
@keyframes modalOminousPulse {
    0% { transform: scale(1); box-shadow: 0 0 30px #f00; }
    100% { transform: scale(1.02); box-shadow: 0 0 60px #800; }
}

@keyframes eeriePulse {
    from { transform: scale(1); text-shadow: 0 0 30px #8b0000; }
    to { transform: scale(1.05); text-shadow: 0 0 90px #ff0000; }
}
