/* Modern Premium Modal Engine */
:root {
    --modal-bg: rgba(22, 22, 22, 0.85);
    --modal-backdrop: rgba(0, 0, 0, 0.5);
    --modal-border: rgba(255, 255, 255, 0.1);
    --modal-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    --modal-orange: linear-gradient(135deg, #e8380d, #f97316);
    --modal-radius: 24px;
}

#app-modal-layer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--modal-backdrop);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#app-modal-layer.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: var(--modal-bg);
    border: 1px solid var(--modal-border);
    border-radius: var(--modal-radius);
    padding: 28px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--modal-shadow);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#app-modal-layer.active .modal-container {
    transform: scale(1);
    opacity: 1;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
}

.modal-icon.info { background: rgba(59, 130, 246, 0.2); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.modal-icon.success { background: rgba(34, 217, 138, 0.2); color: #22d98a; border: 1px solid rgba(34, 217, 138, 0.3); }
.modal-icon.warning { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.modal-icon.danger { background: rgba(255, 68, 68, 0.2); color: #ff4444; border: 1px solid rgba(255, 68, 68, 0.3); }
.modal-icon.primary { background: var(--modal-orange); color: #fff; box-shadow: 0 8px 20px rgba(232, 56, 13, 0.3); }

.modal-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.modal-message {
    font-size: 14px;
    color: #a0a0a0;
    line-height: 1.5;
    margin-bottom: 28px;
}

.modal-input-wrap {
    width: 100%;
    margin-bottom: 24px;
    display: none;
}

.modal-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: #f97316;
}

.modal-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s, opacity 0.2s;
    border: none;
    outline: none;
}

.modal-btn:active {
    transform: scale(0.95);
}

.modal-btn.cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
}

.modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.12);
}

.modal-btn.confirm {
    background: var(--modal-orange);
    color: #fff;
    box-shadow: 0 4px 15px rgba(232, 56, 13, 0.3);
}

.modal-btn.confirm.danger {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.modal-btn.confirm:hover {
    opacity: 0.9;
}
