:root {
    --notification-primary: #FFB347;
    --notification-primary-dark: #FF9F1C;
    --notification-primary-light: #FFD699;
    --notification-info: #2196F3;
    --notification-info-bg: #E3F2FD;
    --notification-success: #4CAF50;
    --notification-success-bg: #E8F5E9;
    --notification-warning: #FF9800;
    --notification-warning-bg: #FFF3E0;
    --notification-error: #F44336;
    --notification-error-bg: #FFEBEE;
    --notification-text: #333333;
    --notification-text-secondary: #666666;
    --notification-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --notification-border-radius: 8px;
    --notification-spacing: 12px;
    --notification-max-width: 400px;
}

.notification-container {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: var(--notification-spacing);
    z-index: 9999;
    padding: 16px;
    max-width: calc(100% - 32px);
}

.notification-container.top-left {
    top: 0;
    left: 0;
}

.notification-container.top-right {
    top: 0;
    right: 0;
}

.notification-container.bottom-left {
    bottom: 0;
    left: 0;
}

.notification-container.bottom-right {
    bottom: 0;
    right: 0;
}

.notification-container.top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.notification-container.bottom-center {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.notification {
    display: flex;
    align-items: flex-start;
    background: white;
    border-radius: var(--notification-border-radius);
    box-shadow: var(--notification-shadow);
    max-width: var(--notification-max-width);
    min-width: 280px;
    padding: 16px;
    animation: slideIn 0.3s ease;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.notification-info::before {
    background: var(--notification-info);
}

.notification-success::before {
    background: var(--notification-success);
}

.notification-warning::before {
    background: var(--notification-warning);
}

.notification-error::before {
    background: var(--notification-error);
}

.notification-info {
    background: linear-gradient(135deg, var(--notification-info-bg), white);
}

.notification-success {
    background: linear-gradient(135deg, var(--notification-success-bg), white);
}

.notification-warning {
    background: linear-gradient(135deg, var(--notification-warning-bg), white);
}

.notification-error {
    background: linear-gradient(135deg, var(--notification-error-bg), white);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.notification.removing {
    animation: slideOut 0.3s ease forwards;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

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

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

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

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

.notification-body {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--notification-text);
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.notification-message {
    font-size: 13px;
    color: var(--notification-text-secondary);
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

.notification-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--notification-text-secondary);
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--notification-text);
}

.notification-close:focus {
    outline: 2px solid var(--notification-primary);
    outline-offset: 2px;
}

.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.notification-action {
    padding: 6px 12px;
    background: var(--notification-primary);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.notification-action:hover {
    background: var(--notification-primary-dark);
    transform: translateY(-1px);
}

.notification-action:focus {
    outline: 2px solid var(--notification-primary);
    outline-offset: 2px;
}

.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10000;
}

.alert-overlay.active {
    opacity: 1;
}

.alert-modal {
    background: white;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.alert-overlay.active .alert-modal {
    transform: scale(1);
}

.alert-icon {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
}

.alert-icon svg {
    width: 64px;
    height: 64px;
    display: block;
}

.alert-info .alert-icon {
    color: var(--notification-info);
    background: linear-gradient(135deg, var(--notification-info-bg), rgba(33, 150, 243, 0.1));
}

.alert-success .alert-icon {
    color: var(--notification-success);
    background: linear-gradient(135deg, var(--notification-success-bg), rgba(76, 175, 80, 0.1));
}

.alert-warning .alert-icon {
    color: var(--notification-warning);
    background: linear-gradient(135deg, var(--notification-warning-bg), rgba(255, 152, 0, 0.1));
}

.alert-error .alert-icon {
    color: var(--notification-error);
    background: linear-gradient(135deg, var(--notification-error-bg), rgba(244, 67, 54, 0.1));
}

.alert-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--notification-text);
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

.alert-message {
    font-size: 15px;
    color: var(--notification-text-secondary);
    margin: 0 0 32px 0;
    line-height: 1.8;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: auto;
}

.alert-button {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.3px;
}

.alert-button:focus {
    outline: 2px solid var(--notification-primary);
    outline-offset: 2px;
}

.alert-button-confirm {
    background: linear-gradient(135deg, var(--notification-primary), var(--notification-primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(255, 179, 71, 0.3);
}

.alert-button-confirm:hover {
    background: linear-gradient(135deg, var(--notification-primary-dark), var(--notification-primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 179, 71, 0.4);
}

.alert-button-confirm:active {
    transform: translateY(0);
}

.alert-button-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: var(--notification-text-secondary);
    border: none;
}

.alert-button-cancel:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--notification-text);
}

@media (max-width: 480px) {
    .notification-container {
        padding: 12px;
        max-width: calc(100% - 24px);
    }

    .notification {
        min-width: auto;
        padding: 12px;
    }

    .notification-content {
        gap: 10px;
    }

    .notification-title {
        font-size: 13px;
    }

    .notification-message {
        font-size: 12px;
    }

    .notification-actions {
        margin-top: 10px;
    }

    .notification-action {
        padding: 5px 10px;
        font-size: 11px;
    }

    .alert-overlay {
        padding: 16px;
    }

    .alert-modal {
        padding: 32px 24px;
        min-height: 240px;
    }

    .alert-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }

    .alert-icon svg {
        width: 48px;
        height: 48px;
    }

    .alert-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .alert-message {
        font-size: 14px;
        margin-bottom: 24px;
        min-height: 40px;
    }

    .alert-button {
        padding: 10px 24px;
        font-size: 14px;
        min-width: 100px;
    }

    .alert-actions {
        flex-direction: column;
        gap: 8px;
    }

    .alert-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notification {
        animation: none;
    }

    .notification.removing {
        animation: none;
    }

    .alert-overlay {
        transition: none;
    }

    .alert-modal {
        transition: none;
    }
}

@media (max-width: 768px) {
    .notification-container.top-left,
    .notification-container.top-right,
    .notification-container.bottom-left,
    .notification-container.bottom-right {
        left: 0;
        right: 0;
        transform: none;
    }

    .notification-container.top-center,
    .notification-container.bottom-center {
        left: 0;
        right: 0;
        transform: none;
    }

    .notification {
        max-width: 100%;
    }
}

.notification-container:focus-within .notification {
    animation-play-state: paused;
}

.alert-overlay:focus-within {
    animation-play-state: paused;
}