/* بهبودهای بصری و UI */

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-right: 4px solid;
}

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

.toast-success { border-color: #10b981; }
.toast-error { border-color: #ef4444; }
.toast-warning { border-color: #f59e0b; }
.toast-info { border-color: #3b82f6; }

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.toast-icon {
    font-size: 24px;
}

.toast-message {
    font-weight: 600;
    color: #1f2937;
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #1f2937;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Progress Bar */
.upload-progress {
    margin-top: 12px;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 8px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

/* Drag and Drop */
.drag-over {
    border: 2px dashed #3b82f6 !important;
    background: #eff6ff !important;
}

/* Confirm Dialog */
.confirm-dialog-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;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.confirm-dialog {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.confirm-message {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 24px;
    text-align: center;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
}

.btn-confirm, .btn-cancel {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-confirm {
    background: #3b82f6;
    color: white;
}

.btn-confirm:hover {
    background: #2563eb;
}

.btn-cancel {
    background: #e5e7eb;
    color: #374151;
}

.btn-cancel:hover {
    background: #d1d5db;
}

/* Dark Mode */
.dark-mode {
    color-scheme: dark;
}

.dark-mode body {
    background: #111827;
    color: #f9fafb;
}

.dark-mode .bg-white {
    background: #1f2937 !important;
}

.dark-mode .text-gray-800 {
    color: #f9fafb !important;
}

.dark-mode .border-gray-300 {
    border-color: #4b5563 !important;
}

/* Image Preview */
.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-top: 12px;
    display: none;
}

/* Audio Preview */
.audio-preview {
    width: 100%;
    margin-top: 12px;
    display: none;
}

/* File Upload Enhancement */
.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.file-upload-area.drag-over {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: scale(1.02);
}

/* Smooth Animations */
* {
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* Better Form Inputs */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
    transition: all 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Login Modal Blur Effect */
.scroll-container.require-login {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

.scroll-container.require-login * {
    pointer-events: none;
}

/* Responsive Improvements */
@media (max-width: 640px) {
    .toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .confirm-dialog {
        margin: 20px;
    }
}

