/* ========================================
   AI QUIZ STYLES
   ======================================== */

.ai-info-banner {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    margin-bottom: 24px;
}

.ai-info-banner i {
    font-size: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.ai-loading {
    text-align: center;
    padding: 60px 20px;
    margin: 40px 0;
}

.ai-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.ai-loading-text h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.ai-loading-text p {
    color: var(--text-secondary);
}

.ai-preview-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.ai-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ai-preview-header h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-question-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.ai-quiz-preview-content {
    margin-top: 24px;
}

.preview-question {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.preview-question:hover {
    box-shadow: var(--shadow-md);
}

.preview-question.editable {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.preview-question-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.preview-question-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.preview-question-text {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    padding: 6px 0;
}

.preview-question-text[contenteditable="true"] {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    outline: none;
}

.preview-question-text[contenteditable="true"]:focus {
    background: var(--bg-primary);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.preview-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.preview-option {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.preview-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.preview-option.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.preview-option-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.preview-option.correct .preview-option-letter {
    background: var(--success-color);
    color: white;
}

.preview-option-text {
    flex: 1;
    line-height: 1.6;
}

.preview-option-text[contenteditable="true"] {
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    outline: none;
}

.preview-option-text[contenteditable="true"]:focus {
    background: var(--bg-primary);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.preview-correct-answer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    color: var(--success-color);
    font-weight: 600;
    font-size: 14px;
}

.preview-correct-answer i {
    font-size: 16px;
}

/* Dark mode support */
body.dark-mode .ai-info-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
}

body.dark-mode .preview-question {
    background: var(--bg-tertiary);
}

body.dark-mode .preview-option {
    background: var(--bg-secondary);
}

body.dark-mode .preview-option.correct {
    background: rgba(16, 185, 129, 0.15);
}

/* File Upload Styles */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.file-upload-content i {
    font-size: 48px;
    color: var(--primary-color);
}

.file-upload-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.file-upload-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.file-size {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-remove-file {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--danger-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-remove-file:hover {
    transform: scale(1.1);
}

.divider-with-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0;
}

.divider-with-text::before,
.divider-with-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider-with-text span {
    padding: 0 16px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .ai-info-banner {
        flex-direction: column;
        gap: 12px;
    }
    
    .ai-preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .preview-question-header {
        flex-direction: column;
    }
    
    .file-upload-area {
        padding: 30px 15px;
    }
    
    .file-upload-content i {
        font-size: 36px;
    }
    
    .file-info {
        flex-direction: column;
        text-align: center;
    }
}
