/* EduQuest Pro Frontend Styles */

.eduquest-generator-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.eduquest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.eduquest-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1.875rem;
}

.eduquest-limits {
    font-size: 0.875rem;
    color: #64748b;
}

.eduquest-remaining {
    font-weight: bold;
    color: #0ea5e9;
    font-size: 1.25rem;
}

/* Form Styles */
.eduquest-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.eduquest-form-group {
    display: flex;
    flex-direction: column;
}

.eduquest-form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #334155;
    font-size: 0.875rem;
}

.eduquest-form-group select,
.eduquest-form-group input[type="number"] {
    padding: 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.eduquest-form-group select:focus,
.eduquest-form-group input[type="number"]:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Button Styles */
.eduquest-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.eduquest-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.eduquest-btn-primary {
    background: #0ea5e9;
    color: white;
}

.eduquest-btn-primary:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.eduquest-btn-secondary {
    background: #64748b;
    color: white;
}

.eduquest-btn-secondary:hover {
    background: #475569;
}

.eduquest-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.eduquest-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Spinner */
.eduquest-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: eduquest-spin 0.8s linear infinite;
}

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

/* Progress Bar */
.eduquest-progress {
    margin-top: 1rem;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.eduquest-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #06b6d4);
    width: 0;
    transition: width 0.3s;
    animation: eduquest-progress 1.5s ease-in-out infinite;
}

@keyframes eduquest-progress {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Results Section */
.eduquest-results {
    margin-top: 3rem;
    animation: eduquest-fade-in 0.5s;
}

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

.eduquest-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.eduquest-results-header h3 {
    margin: 0;
    color: #1e293b;
}

.eduquest-results-actions {
    display: flex;
    gap: 0.5rem;
}

.eduquest-source-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
}

.eduquest-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.eduquest-source-database {
    background: #dbeafe;
    color: #1e40af;
}

.eduquest-source-ai {
    background: #fce7f3;
    color: #be185d;
}

/* Question Cards */
.eduquest-questions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.eduquest-question-card {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.eduquest-question-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.eduquest-question-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: block;
}

.eduquest-question-text {
    font-size: 1.125rem;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.eduquest-question-options {
    margin: 1rem 0;
    line-height: 1.8;
}

.eduquest-question-option {
    display: inline;
    margin-right: 1rem;
    color: #1e293b;
}

.eduquest-question-option.correct {
    font-weight: 600;
    color: #059669;
}

.eduquest-question-explanation {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef3c7;
    border-left: 4px solid #fbbf24;
    border-radius: 4px;
    font-size: 0.875rem;
}

.eduquest-question-image {
    margin: 1rem 0;
    max-width: 100%;
    border-radius: 8px;
}

.eduquest-question-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Messages */
.eduquest-message {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 6px;
    animation: eduquest-fade-in 0.3s;
}

.eduquest-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.eduquest-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .eduquest-generator-container {
        padding: 1rem;
    }
    
    .eduquest-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .eduquest-form-grid {
        grid-template-columns: 1fr;
    }
    
    .eduquest-form-actions {
        flex-direction: column;
    }
    
    .eduquest-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
