﻿

.demo-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.demo-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 40px;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.control-group {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

    .control-group h3 {
        margin-bottom: 15px;
        color: #333;
        font-size: 1.1rem;
    }

.control-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    flex: 1;
    min-width: 100px;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    .btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(17, 19, 33, 0.5);
    }

.btn-success {
    background: #10b981;
    color: white;
}

.btn-error {
    background: #ef4444;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-loading {
    background: #6366f1;
    color: white;
}

.btn-promise {
    background: #8b5cf6;
    color: white;
}

.btn-primary {
    background: #5a67d8;
    color: rgb(243, 238, 238);
}

select, input {
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    width: 100%;
}

    select:focus, input:focus {
        outline: none;
        border-color: #667eea;
    }

/* Toast Container */
.toast-container {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    width: 100%;
}

    .toast-container.top-left {
        top: 20px;
        left: 20px;
    }

    .toast-container.top-center {
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
    }

    .toast-container.top-right {
        top: 20px;
        right: 20px;
    }

    .toast-container.bottom-left {
        bottom: 20px;
        left: 20px;
    }

    .toast-container.bottom-center {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
    }

    .toast-container.bottom-right {
        bottom: 20px;
        right: 20px;
    }

/* Toast Styles */
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100px);
    opacity: 0;
    max-width: 100%;
    min-width: 300px;
    position: relative;
    overflow: hidden;
}

    .toast.show {
        transform: translateY(0);
        opacity: 1;
    }

    .toast.hide {
        transform: translateY(-100px);
        opacity: 0;
        margin-top: -80px;
    }

    /* Toast Themes */
    .toast.light {
        background: rgba(255, 255, 255, 0.95);
        color: #374151;
    }

    .toast.dark {
        background: rgba(31, 41, 55, 0.95);
        color: #f9fafb;
    }

    .toast.success {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
        color: white;
    }

    .toast.error {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
        color: white;
    }

    .toast.warning {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.9));
        color: white;
    }

    .toast.info {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
        color: white;
    }

    .toast.minimal {
        background: rgba(255, 255, 255, 0.98);
        color: #374151;
        border: 1px solid #e5e7eb;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .toast.glass {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: #1f2937;
    }

/* Toast Icon */
.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .toast-icon svg {
        width: 100%;
        height: 100%;
    }

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Content */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}

.toast-message {
    opacity: 0.9;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Close Button */
.toast-close {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

    .toast-close:hover {
        opacity: 1;
    }

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 12px 12px;
    transition: width linear;
}

/* Action Buttons */
.toast-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.toast-action {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: currentColor;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .toast-action:hover {
        background: rgba(255, 255, 255, 0.2);
    }
/* Footer */
.footer {
    text-align: center;
}

    .footer a img {
        width: 26px;
        height: 26px;
        vertical-align: middle;
    }

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        max-width: calc(100vw - 40px);
        left: 20px !important;
        right: 20px !important;
        transform: none !important;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    .controls {
        grid-template-columns: 1fr;
    }
}
