/* Toast Styles */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    width: 100%;
}

.toast {
    position: relative;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: flex;
    align-items: flex-start;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Toast Types */
.toast.success {
    background: linear-gradient(135deg, var(--success) 0%, var(--secondary-dark) 100%);
}

.toast.success::before {
    background: var(--secondary-light);
}

.toast.error {
    background: linear-gradient(135deg, var(--danger) 0%, var(--alert) 100%);
}

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

.toast.info {
    background: linear-gradient(135deg, var(--info) 0%, var(--primary-dark) 100%);
}

.toast.info::before {
    background: var(--primary-light);
}

.toast.warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--gold) 100%);
    color: var(--text-primary);
}

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

.toast.registration_success {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
}

.toast.registration_success::before {
    background: var(--accent-primary-light);
}

/* Toast Icon */
.toast-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    margin-top: 2px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--secondary-light); }
.toast.error .toast-icon { color: var(--alert); }
.toast.info .toast-icon { color: var(--primary-light); }
.toast.warning .toast-icon { color: var(--gold); }
.toast.registration_success .toast-icon { color: var(--accent-primary-light); }

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.toast-message {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Countdown Section */
.toast-countdown {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.toast-countdown:not(.hidden) {
    display: block;
}

.countdown-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}

.countdown-progress-bar {
    height: 100%;
    background: white;
    border-radius: 3px;
    width: 100%;
    transition: width 1s linear;
}

.countdown-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.countdown-text {
    opacity: 0.9;
}

.countdown-timer {
    font-family: 'Courier New', monospace;
    font-weight: 800;
    font-size: 1rem;
}

/* Toast Actions */
.toast-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 15px;
    flex-shrink: 0;
}

.btn-toast-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.btn-toast-action {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-toast-action:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.btn-toast-action:not(.hidden) {
    display: block;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes toastShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.toast.shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: toastShine 2s infinite;
}

/* Responsive */
@media (max-width: 480px) {
    #toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        padding: 15px;
    }
    
    .toast-actions {
        flex-direction: row;
        margin-left: 10px;
    }
    
    .btn-toast-action {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    #toast-container {
        top: 10px;
        right: 8px;
        left: 8px;
    }

    .toast {
        padding: 12px;
        margin-bottom: 10px;
    }

    .toast-title {
        font-size: 0.95rem;
    }

    .toast-message {
        font-size: 0.85rem;
    }

    .btn-toast-close {
        width: 28px;
        height: 28px;
    }
}