* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa; color: #333; line-height: 1.6;
}
.navbar {
    background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 0 40px; display: flex; justify-content: space-between; align-items: center;
    height: 64px; position: sticky; top: 0; z-index: 100;
}
.nav-brand { font-size: 20px; font-weight: 700; color: #2563eb; }
.nav-links a {
    color: #64748b; text-decoration: none; margin-left: 32px; font-size: 15px;
    font-weight: 500; padding: 6px 12px; border-radius: 6px; transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: #2563eb; background: #eff6ff; }
.main-content { min-height: calc(100vh - 64px - 60px); padding: 40px 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.footer {
    background: #fff; border-top: 1px solid #e2e8f0; text-align: center;
    padding: 20px; color: #94a3b8; font-size: 13px;
}
.hero-section { text-align: center; padding: 40px 0 32px; }
.hero-section h1 { font-size: 32px; color: #1e293b; margin-bottom: 12px; }
.subtitle { color: #64748b; font-size: 16px; }
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px; margin-bottom: 48px;
}
.stat-card {
    background: #fff; border-radius: 12px; padding: 24px; text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.stat-icon { font-size: 28px; margin-bottom: 8px; }
.stat-number { font-size: 28px; font-weight: 700; color: #1e293b; }
.stat-label { font-size: 13px; color: #94a3b8; margin-top: 4px; }
.action-section { margin-bottom: 48px; }
.action-section h2 { font-size: 22px; margin-bottom: 20px; color: #1e293b; }
.action-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.action-card {
    background: #fff; border-radius: 12px; padding: 32px; text-decoration: none;
    color: inherit; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column;
    cursor: pointer; border: none; text-align: left; width: 100%;
}
.action-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.action-icon { font-size: 40px; margin-bottom: 16px; }
.action-card h3 { font-size: 18px; color: #1e293b; margin-bottom: 8px; }
.action-card p { color: #64748b; font-size: 14px; margin-bottom: 20px; flex: 1; }
.btn-primary {
    display: inline-block; background: #2563eb; color: #fff; padding: 10px 24px;
    border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 500;
    border: none; cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary {
    background: #e2e8f0; color: #475569; padding: 10px 20px; border-radius: 8px;
    border: none; cursor: pointer; font-size: 14px;
}
.btn-secondary:hover { background: #cbd5e1; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-submit {
    background: #10b981; color: #fff; padding: 10px 28px; border-radius: 8px;
    border: none; cursor: pointer; font-size: 14px; font-weight: 500;
}
.btn-submit:hover { background: #059669; }
.btn-danger { background: #ef4444; color: #fff; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 13px; }
.btn-small { padding: 4px 12px; font-size: 12px; border-radius: 4px; border: none; cursor: pointer; }
.btn-remove { background: #fee2e2; color: #ef4444; }
.btn-remove:hover { background: #fecaca; }
.btn-large { padding: 14px 40px; font-size: 16px; }
.progress-section { background: #fff; border-radius: 12px; padding: 28px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.progress-section h2 { font-size: 18px; margin-bottom: 20px; }
.progress-detail { display: flex; flex-direction: column; gap: 16px; }
.progress-item { display: flex; align-items: center; gap: 16px; }
.progress-label { width: 100px; color: #64748b; font-size: 14px; }
.progress-bar { flex: 1; height: 10px; background: #e2e8f0; border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; background: #2563eb; border-radius: 5px; transition: width 0.5s; }
.progress-value { width: 60px; text-align: right; font-weight: 600; color: #1e293b; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 26px; color: #1e293b; margin-bottom: 6px; }
.page-header p { color: #64748b; font-size: 14px; }
.filter-bar {
    background: #fff; padding: 16px 20px; border-radius: 10px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.filter-bar label { color: #64748b; font-size: 14px; }
.filter-bar select { padding: 8px 14px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 14px; background: #fff; cursor: pointer; }
.question-card {
    background: #fff; border-radius: 12px; padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-bottom: 20px;
}
.question-header { display: flex; gap: 10px; margin-bottom: 16px; }
.question-type {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 500; background: #dbeafe; color: #2563eb;
}
.question-difficulty {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 500; background: #fef3c7; color: #d97706;
}
.question-text { font-size: 17px; color: #1e293b; line-height: 1.7; margin-bottom: 20px; }
.options-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.option-item {
    display: flex; align-items: flex-start; padding: 14px 18px;
    border: 1px solid #e2e8f0; border-radius: 10px; cursor: pointer;
    transition: all 0.2s; background: #fff;
}
.option-item:hover { border-color: #2563eb; background: #f8fafc; }
.option-item input { margin-right: 12px; margin-top: 3px; }
.option-label { font-weight: 600; color: #2563eb; margin-right: 8px; min-width: 24px; }
.option-text { color: #334155; font-size: 15px; line-height: 1.5; }
.result-panel { padding-top: 16px; border-top: 1px solid #e2e8f0; }
.result-status { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.result-status.correct { color: #10b981; }
.result-status.wrong { color: #ef4444; }
.correct-answer { color: #64748b; font-size: 15px; margin-bottom: 16px; }
.btn-next { background: #2563eb; color: #fff; padding: 10px 28px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; }
.practice-stats { display: flex; gap: 24px; color: #64748b; font-size: 14px; }
.exam-setup {
    background: #fff; border-radius: 12px; padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); max-width: 500px; margin: 0 auto;
}
.exam-setup h3 { margin-bottom: 24px; color: #1e293b; }
.form-group { display: flex; align-items: center; margin-bottom: 16px; }
.form-group label { width: 120px; color: #475569; font-size: 14px; }
.form-group input { flex: 1; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; }
.exam-info {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding: 12px 16px; background: #fff;
    border-radius: 8px; font-size: 14px; color: #475569;
}
.timer { font-family: monospace; font-size: 18px; color: #ef4444; font-weight: 600; }
.exam-nav { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
.question-palette { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-top: 20px; }
.question-palette h4 { margin-bottom: 12px; color: #1e293b; font-size: 15px; }
.palette-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.palette-btn {
    width: 40px; height: 40px; border: 1px solid #e2e8f0; border-radius: 8px;
    background: #fff; cursor: pointer; font-size: 13px; transition: all 0.2s;
}
.palette-btn:hover { border-color: #2563eb; }
.palette-btn.answered { background: #2563eb; color: #fff; border-color: #2563eb; }
.palette-btn.current { border: 2px solid #f59e0b; }
.exam-result {
    background: #fff; border-radius: 12px; padding: 48px; text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); max-width: 500px; margin: 0 auto;
}
.exam-result h2 { margin-bottom: 24px; color: #1e293b; }
.score-circle {
    width: 160px; height: 160px; border-radius: 50%; border: 8px solid #2563eb;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    margin: 0 auto 24px;
}
.score-number { font-size: 48px; font-weight: 700; color: #2563eb; line-height: 1; }
.score-label { font-size: 16px; color: #64748b; }
.result-detail { display: flex; justify-content: center; gap: 32px; margin-bottom: 32px; color: #475569; }
.wrong-actions { margin-bottom: 20px; text-align: right; }
.wrong-list { display: flex; flex-direction: column; gap: 16px; }
.wrong-card {
    background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.wrong-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wrong-count { margin-left: auto; color: #ef4444; font-size: 13px; font-weight: 500; }
.wrong-body h4 { font-size: 15px; color: #1e293b; margin-bottom: 12px; line-height: 1.6; }
.options-list-readonly { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.option-item-readonly { padding: 10px 14px; border-radius: 8px; background: #f8fafc; font-size: 14px; }
.option-correct { background: #d1fae5 !important; color: #065f46; }
.answer-reveal { color: #10b981; font-size: 14px; margin-top: 8px; }
.user-answer-wrong { color: #ef4444; font-size: 14px; margin-top: 4px; }
.empty-state { text-align: center; padding: 60px; color: #94a3b8; font-size: 16px; }
.loading { text-align: center; padding: 40px; color: #94a3b8; }
.file-upload-area {
    border: 2px dashed #cbd5e1; border-radius: 12px; padding: 48px; text-align: center;
    background: #fff; cursor: pointer; transition: all 0.2s;
}
.file-upload-area:hover { border-color: #2563eb; background: #f8fafc; }
.file-upload-area.dragover { border-color: #2563eb; background: #eff6ff; }
.file-upload-icon { font-size: 48px; margin-bottom: 16px; }
.file-upload-text { color: #64748b; font-size: 14px; margin-bottom: 8px; }
.file-upload-hint { color: #94a3b8; font-size: 12px; }
.data-manager { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-bottom: 20px; }
.data-manager h3 { font-size: 16px; margin-bottom: 16px; color: #1e293b; }
.data-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.export-btn { background: #0ea5e9; color: #fff; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 13px; }
.export-btn:hover { background: #0284c7; }
.import-btn { background: #8b5cf6; color: #fff; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 13px; }
.import-btn:hover { background: #7c3aed; }
@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .nav-links a { margin-left: 12px; font-size: 13px; padding: 4px 8px; }
    .container { padding: 0 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .action-cards { grid-template-columns: 1fr; }
    .exam-nav { flex-wrap: wrap; }
    .result-detail { flex-direction: column; gap: 8px; }
}
