pdf-quiz-generator/frontend/src/index.css
ifedan-ed b876f13fac Initial commit: PDF Quiz Generator app
- FastAPI backend with JWT auth, roles (admin/moderator/user)
- PDF upload (up to 500MB) with streaming, PyMuPDF text extraction
- ChromaDB vectorization per page with metadata
- LiteLLM AI question extraction from PDF (not generation)
- Image extraction from PDF pages, graceful fallback
- Quiz modes: timed (countdown timer) + learning (answers shown inline)
- Page-by-page question navigation with dot navigator
- TTS endpoint using LiteLLM (Google Vertex / OpenAI voices)
- Admin dashboard: AI model management per task, user role management
- Moderator role: upload PDFs, create sections, generate quizzes
- Spaced repetition reminders via SMTP email (SM-2 intervals)
- APScheduler daily reminder jobs
- Celery + Redis for background PDF processing
- React frontend with all pages
- Docker Compose deployment (nginx + backend + celery + redis)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 20:04:53 +00:00

418 lines
6.5 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f8fafc;
color: #1e293b;
line-height: 1.6;
}
.container {
max-width: 1100px;
margin: 0 auto;
padding: 0 20px;
}
/* Navigation */
.navbar {
background: #1e293b;
color: white;
padding: 12px 0;
margin-bottom: 24px;
}
.navbar .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.navbar .logo {
font-size: 1.3rem;
font-weight: 700;
color: #60a5fa;
text-decoration: none;
}
.navbar nav {
display: flex;
gap: 16px;
align-items: center;
}
.navbar a {
color: #cbd5e1;
text-decoration: none;
font-size: 0.9rem;
}
.navbar a:hover {
color: white;
}
.navbar button {
background: transparent;
border: 1px solid #475569;
color: #cbd5e1;
padding: 6px 14px;
border-radius: 6px;
cursor: pointer;
font-size: 0.85rem;
}
/* Cards */
.card {
background: white;
border-radius: 10px;
padding: 24px;
box-shadow: 0 1px 3px rgba(0,0,0,0.08);
margin-bottom: 16px;
}
.card h2 {
margin-bottom: 16px;
font-size: 1.2rem;
}
/* Buttons */
.btn {
display: inline-block;
padding: 10px 20px;
border-radius: 8px;
border: none;
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
text-decoration: none;
transition: background 0.2s;
}
.btn-primary {
background: #2563eb;
color: white;
}
.btn-primary:hover {
background: #1d4ed8;
}
.btn-secondary {
background: #e2e8f0;
color: #334155;
}
.btn-danger {
background: #ef4444;
color: white;
}
.btn-sm {
padding: 6px 14px;
font-size: 0.82rem;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Forms */
.form-group {
margin-bottom: 16px;
}
.form-group label {
display: block;
font-weight: 500;
margin-bottom: 6px;
font-size: 0.9rem;
}
.form-group input,
.form-group select {
width: 100%;
padding: 10px 14px;
border: 1px solid #d1d5db;
border-radius: 8px;
font-size: 0.9rem;
}
.form-group input:focus {
outline: none;
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
/* Status badges */
.badge {
display: inline-block;
padding: 3px 10px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
}
.badge-processing { background: #fef3c7; color: #92400e; }
.badge-ready { background: #d1fae5; color: #065f46; }
.badge-error { background: #fee2e2; color: #991b1b; }
/* Quiz question styles */
.question-card {
background: white;
border-radius: 10px;
padding: 20px;
margin-bottom: 16px;
border-left: 4px solid #2563eb;
box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.question-card h3 {
font-size: 1rem;
margin-bottom: 12px;
}
.question-card .options {
display: flex;
flex-direction: column;
gap: 8px;
}
.question-card .option {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
border: 1px solid #e2e8f0;
border-radius: 8px;
cursor: pointer;
transition: all 0.15s;
}
.question-card .option:hover {
background: #f1f5f9;
}
.question-card .option.selected {
border-color: #2563eb;
background: #eff6ff;
}
.question-card .option.correct {
border-color: #22c55e;
background: #f0fdf4;
}
.question-card .option.incorrect {
border-color: #ef4444;
background: #fef2f2;
}
.question-card input[type="text"] {
width: 100%;
padding: 10px 14px;
border: 1px solid #d1d5db;
border-radius: 8px;
}
.explanation {
margin-top: 12px;
padding: 12px;
background: #f8fafc;
border-radius: 8px;
font-size: 0.85rem;
color: #475569;
border-left: 3px solid #60a5fa;
}
/* Stats */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 16px;
margin-bottom: 24px;
}
.stat-card {
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 1px 3px rgba(0,0,0,0.08);
text-align: center;
}
.stat-card .stat-value {
font-size: 2rem;
font-weight: 700;
color: #2563eb;
}
.stat-card .stat-label {
font-size: 0.85rem;
color: #64748b;
margin-top: 4px;
}
/* Grid layouts */
.grid-2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
/* Alerts */
.alert {
padding: 12px 16px;
border-radius: 8px;
margin-bottom: 16px;
font-size: 0.9rem;
}
.alert-error {
background: #fef2f2;
color: #991b1b;
border: 1px solid #fecaca;
}
.alert-success {
background: #f0fdf4;
color: #166534;
border: 1px solid #bbf7d0;
}
/* Score display */
.score-display {
text-align: center;
padding: 32px;
}
.score-display .score-value {
font-size: 3.5rem;
font-weight: 800;
}
.score-display .score-value.good { color: #22c55e; }
.score-display .score-value.ok { color: #f59e0b; }
.score-display .score-value.poor { color: #ef4444; }
/* Upload area */
.upload-area {
border: 2px dashed #cbd5e1;
border-radius: 12px;
padding: 48px;
text-align: center;
cursor: pointer;
transition: all 0.2s;
}
.upload-area:hover {
border-color: #2563eb;
background: #f8fafc;
}
.upload-area.dragging {
border-color: #2563eb;
background: #eff6ff;
}
/* Progress bar */
.progress-bar {
background: #e2e8f0;
border-radius: 999px;
height: 8px;
overflow: hidden;
margin-top: 12px;
}
.progress-bar .fill {
background: #2563eb;
height: 100%;
border-radius: 999px;
transition: width 0.3s;
}
/* Spinner */
.spinner {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid #e2e8f0;
border-top-color: #2563eb;
border-radius: 50%;
animation: spin 0.6s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Section list */
.section-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
border: 1px solid #e2e8f0;
border-radius: 8px;
margin-bottom: 8px;
}
/* Auth pages */
.auth-page {
display: flex;
justify-content: center;
align-items: center;
min-height: 80vh;
}
.auth-card {
background: white;
padding: 40px;
border-radius: 12px;
box-shadow: 0 4px 6px rgba(0,0,0,0.07);
width: 100%;
max-width: 420px;
}
.auth-card h1 {
text-align: center;
margin-bottom: 24px;
color: #1e293b;
}
.auth-card .auth-link {
text-align: center;
margin-top: 16px;
font-size: 0.9rem;
}
.auth-card .auth-link a {
color: #2563eb;
text-decoration: none;
}
/* Loading */
.loading {
text-align: center;
padding: 48px;
color: #64748b;
}
/* Empty state */
.empty-state {
text-align: center;
padding: 48px;
color: #94a3b8;
}
@media (max-width: 768px) {
.grid-2 {
grid-template-columns: 1fr;
}
.stats-grid {
grid-template-columns: 1fr 1fr;
}
}