/* Custom Alert System - Futuristic Style */

.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.alert-overlay.show {
    opacity: 1;
    visibility: visible;
}

.alert-box {
    background: #151c28;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 212, 255, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.alert-overlay.show .alert-box {
    transform: scale(1) translateY(0);
}

.alert-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--alert-color-start, #00d4ff), var(--alert-color-end, #7b61ff));
}

/* Alert Types */
.alert-box.success {
    --alert-color-start: #00ff88;
    --alert-color-end: #00d4ff;
    --alert-icon-color: #00ff88;
}

.alert-box.error {
    --alert-color-start: #ff4757;
    --alert-color-end: #ff6b81;
    --alert-icon-color: #ff4757;
}

.alert-box.warning {
    --alert-color-start: #ffaa00;
    --alert-color-end: #ffcc00;
    --alert-icon-color: #ffaa00;
}

.alert-box.info {
    --alert-color-start: #00d4ff;
    --alert-color-end: #7b61ff;
    --alert-icon-color: #00d4ff;
}

.alert-box.confirm {
    --alert-color-start: #00d4ff;
    --alert-color-end: #7b61ff;
    --alert-icon-color: #00d4ff;
}

.alert-header {
    padding: 24px 24px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(var(--alert-icon-color-rgb, 0, 212, 255), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alert-icon i {
    font-size: 24px;
    color: var(--alert-icon-color, #00d4ff);
}

.alert-box.success .alert-icon {
    background: rgba(0, 255, 136, 0.15);
}
.alert-box.success .alert-icon i {
    color: #00ff88;
}

.alert-box.error .alert-icon {
    background: rgba(255, 71, 87, 0.15);
}
.alert-box.error .alert-icon i {
    color: #ff4757;
}

.alert-box.warning .alert-icon {
    background: rgba(255, 170, 0, 0.15);
}
.alert-box.warning .alert-icon i {
    color: #ffaa00;
}

.alert-title {
    font-size: 18px;
    font-weight: 600;
    color: #e8edf5;
    margin: 0;
}

.alert-body {
    padding: 0 24px 24px;
    color: #8b95a5;
    font-size: 14px;
    line-height: 1.6;
}

.alert-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.alert-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    font-family: 'Inter', sans-serif;
}

.alert-btn-cancel {
    background: #1a2332;
    color: #8b95a5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-btn-cancel:hover {
    background: #1c2538;
    color: #e8edf5;
    border-color: rgba(255, 255, 255, 0.2);
}

.alert-btn-confirm {
    background: linear-gradient(135deg, var(--alert-color-start, #00d4ff), var(--alert-color-end, #7b61ff));
    color: #fff;
}

.alert-btn-confirm:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.alert-btn-confirm.danger {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
}

.alert-btn-confirm.danger:hover {
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: #151c28;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 12px 0 0 12px;
}

.toast.success::before {
    background: linear-gradient(180deg, #00ff88, #00d4ff);
}

.toast.error::before {
    background: linear-gradient(180deg, #ff4757, #ff6b81);
}

.toast.warning::before {
    background: linear-gradient(180deg, #ffaa00, #ffcc00);
}

.toast.info::before {
    background: linear-gradient(180deg, #00d4ff, #7b61ff);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.toast.error .toast-icon {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.toast.warning .toast-icon {
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
}

.toast.info .toast-icon {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #e8edf5;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #8b95a5;
}

.toast-close {
    background: transparent;
    border: none;
    color: #5a6478;
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #e8edf5;
}

/* Loading Spinner */
.alert-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .alert-box {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .toast-container {
        left: 10px;
        right: 10px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}