.toast-container {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    top: 105px;
}

.toast {
    pointer-events: auto;
    width: 340px;
    max-width: calc(100vw - 30px);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-weight: 400;
    position: relative;
}

.toast-enter {
    animation: toastSlideIn 0.25s ease forwards;
}

.toast-exit {
    animation: toastSlideOut 0.25s ease forwards !important;
}

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

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

.toast-success { background: #10b981; }
.toast-warning { background: #f59e0b; }
.toast-error { background: #ef4444; }
.toast-info { background: #509AF8; }

.toast-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    background: rgba(255,255,255,0.7);
    width: 100%;
    transition: none;
    z-index: 5;
    border-radius: 0;
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 12px 12px 12px 16px;
}

.toast-icon {
    flex-shrink: 0;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.toast-icon svg {
    width: 20px;
    height: 20px;
}

.toast-icon svg path {
    fill: #ffffff;
}

.toast-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    padding-right: 8px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toast-badge {
    background: rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: white;
    margin-left: 4px;
}

.toast-close {
    flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: background 0.15s;
    margin-left: 4px;
}

.toast-close:hover {
    background: rgba(255,255,255,0.35);
}

body.dark-mode .toast-close {
    background: rgba(0,0,0,0.2);
    color: #ffffff;
}

body.dark-mode .toast-close:hover {
    background: rgba(0,0,0,0.3);
}

.toast-shake {
    animation: toastShake 0.2s ease-in-out;
}

@keyframes toastShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}