.alert-container {
    position: fixed;
    top: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
    width: 100%;
    max-width: 500px;
    padding: 0 var(--spacing-xl);
    box-sizing: border-box;

}

.alert {
    position: absolute;
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 0;
    pointer-events: auto;
    transform: translateY(-100px);
    opacity: 0;
    transition: all var(--transition-cubic);
    border-left: 4px solid;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

.alert.alert-show {
    transform: translateY(0);
    opacity: 1;
}

.alert.alert-hide {
    transform: translateY(-100px);
    opacity: 0;
    margin-bottom: 0;
    max-height: 0;
    overflow: hidden;
}

.alert-content {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    gap: 10px;
    min-height: 20px;
}

.alert-icon {
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.alert-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.alert-close:hover {
    background-color: rgba(0, 0, 0, var(--opacity-10));
    color: var(--color-text-primary);
}

.alert-close:active {
    transform: scale(0.95);
}

.alert-success {
    border-left-color: var(--color-success-border);
    background: var(--gradient-success);
}

.alert-success .alert-icon {
    color: var(--color-success-dark);
}

.alert-success .alert-message {
    color: var(--color-text-primary);
}

.alert-success .alert-close:hover {
    background-color: rgba(var(--color-success-rgb), var(--opacity-10));
    color: var(--color-success-dark);
}

.alert-warning {
    border-left-color: var(--color-warning-border);
    background: var(--gradient-warning);
}

.alert-warning .alert-icon {
    color: var(--color-warning-darker);
}

.alert-warning .alert-message {
    color: var(--color-text-primary);
}

.alert-warning .alert-close:hover {
    background-color: rgba(var(--color-warning-rgb), var(--opacity-10));
    color: var(--color-warning-darker);
}

.alert-error {
    border-left-color: var(--color-error-border);
    background: var(--gradient-error);
}

.alert-error .alert-icon {
    color: var(--color-error-dark);
}

.alert-error .alert-message {
    color: var(--color-text-primary);
}

.alert-error .alert-close:hover {
    background-color: rgba(var(--color-error-rgb), var(--opacity-10));
    color: var(--color-error-dark);
}

.alert-info {
    border-left-color: var(--color-info-border);
    background: var(--gradient-info);
}

.alert-info .alert-icon {
    color: var(--color-info-dark);
}

.alert-info .alert-message {
    color: var(--color-text-primary);
}

.alert-info .alert-close:hover {
    background-color: rgba(var(--color-info-rgb), var(--opacity-10));
    color: var(--color-info-dark);
}

.dark-mode .alert-success .alert-icon {
    color: var(--color-success);
}

.dark-mode .alert-success .alert-message {
    color: var(--color-text-primary);
}

.dark-mode .alert-warning .alert-icon {
    color: var(--color-warning);
}

.dark-mode .alert-warning .alert-message {
    color: var(--color-text-primary);
}

.dark-mode .alert-error .alert-icon {
    color: var(--color-error);
}

.dark-mode .alert-error .alert-message {
    color: var(--color-text-primary);
}

.dark-mode .alert-info .alert-icon {
    color: var(--color-info);
}

.dark-mode .alert-info .alert-message {
    color: var(--color-text-primary);
}

@media (max-width: 768px) {
    .alert-container {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        max-width: none;
        padding: 0;
    }

    .alert-content {
        padding: 14px 16px;
        gap: 10px;
    }

    .alert-message {
        font-size: 13px;
    }

    .alert-icon {
        font-size: 16px;
        width: 18px;
    }

    .alert-close {
        width: 22px;
        height: 22px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .alert-container {
        top: 5px;
        left: 5px;
        right: 5px;
    }

    .alert-content {
        padding: 12px 14px;
        gap: 8px;
    }

    .alert-message {
        font-size: 12px;
        line-height: 1.3;
    }
}

@media (prefers-contrast: high) {
    .alert {
        border-width: 2px;
        border-style: solid;
    }

    .alert-success {
        border-color: var(--color-success);
    }

    .alert-warning {
        border-color: var(--color-warning);
    }

    .alert-error {
        border-color: var(--color-error);
    }

    .alert-close {
        border: 1px solid var(--color-text-secondary);
    }
}

@media (prefers-reduced-motion: reduce) {
    .alert {
        transition: opacity var(--transition-base);
    }

    .alert.alert-show {
        transform: none;
    }

    .alert.alert-hide {
        transform: none;
    }
}

@media (prefers-color-scheme: dark) {
    .alert {
        background: var(--color-bg-dark);
        box-shadow: var(--shadow-xl);
    }

    .alert-message {
        color: var(--color-text-light);
    }

    .alert-close {
        color: var(--color-gray-400);
    }

    .alert-close:hover {
        background-color: rgba(255, 255, 255, var(--opacity-10));
        color: var(--color-text-light);
    }

    .alert-success {
        background: var(--gradient-success);
    }

    .alert-warning {
        background: var(--gradient-warning);
    }

    .alert-error {
        background: var(--gradient-error);
    }
}

.alert-close:focus {
    outline: 2px solid var(--color-info);
    outline-offset: 2px;
}

@media print {
    .alert-container {
        display: none;
    }
}