/* 🏗️ FOUNDATIONAL MODAL ENGINE */
.modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px); justify-content: center; align-items: center; z-index: 10000;
}

.modal-content {
    background: #0d0e16; border: 1px solid var(--border-glass);
    border-radius: 24px; width: 600px; max-width: 90vw; max-height: 90vh; 
    overflow-y: auto; padding: 32px; box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* --- INDUSTRIAL-GRADE INFO OVERLAYS (Universal System) --- */
.info-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(8, 9, 15, 0.95); backdrop-filter: blur(25px);
    z-index: 10005; display: none; align-items: center; justify-content: center;
    padding: 20px; box-sizing: border-box;
}

.info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px; width: 100%; max-width: 800px;
    max-height: 90vh; overflow-y: auto; position: relative;
    box-shadow: 0 50px 100px rgba(0,0,0,0.8);
    animation: infoScaleIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes infoScaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.info-close {
    position: absolute; top: 25px; right: 30px;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.05); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; cursor: pointer; transition: all 0.2s;
    z-index: 10;
}
.info-close:hover { background: var(--accent); transform: rotate(90deg); }

/* 📱 MOBILE HARD-FIX: NO OVERLAP, NO TRANSPARENCY */
@media (max-width: 600px) {
    .info-overlay { padding: 0; background: #0a0b16 !important; }
    .info-card { 
        height: 100%; max-height: 100vh; border-radius: 0; border: none; 
        display: flex; flex-direction: column; 
    }
}
/* -- HEIGHT STABILIZED SETTINGS PLATFORM -- */
#settingsModal .modal-content {
    display: flex; flex-direction: column;
    height: 80vh; min-height: 600px;
    overflow: hidden; /* Hard Frame Lock */
    padding-bottom: 15px;
}

#settingsModal .modal-body {
    flex: 1; overflow-y: auto; /* Dynamic scroll window */
    padding-right: 10px; margin-top: 5px;
}
#settingsModal .modal-body::-webkit-scrollbar { width: 6px; }
#settingsModal .modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.modal-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.modal-header h2 { font-weight: 700; font-size: 1.3rem; }
.close-btn {
    background: transparent; border: none; color: var(--text-secondary);
    font-size: 1.5rem; cursor: pointer;
}
