.ai-page { padding: 40px 20px 80px; max-width: 1000px; margin: 0 auto; }
.ai-header { text-align: center; margin-bottom: 40px; }
.ai-header h1 { font-size: 2rem; font-weight: 700; color: #16477f; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.ai-header p { color: #64748b; font-size: 1.1rem; }
.quiz-container { background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
.quiz-progress { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; font-weight: 600; color: #64748b; }
.progress-bar-wrap { flex-grow: 1; height: 8px; background: #e2e8f0; border-radius: 4px; margin: 0 20px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--opac-blue, #1f5fae); width: 10%; transition: width 0.3s; }
.question-card { display: none; }
.question-card.active { display: block; animation: fadeIn 0.4s; }
.question-title { font-size: 1.3rem; font-weight: 700; color: #1e293b; margin-bottom: 25px; }
.options-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .options-grid { grid-template-columns: 1fr 1fr; } }
.option-label { display: flex; align-items: center; padding: 16px 20px; background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 12px; cursor: pointer; transition: all 0.2s; font-weight: 500; color: #334155; }
.option-label:hover { background: #f1f5f9; border-color: #cbd5e1; }
.option-label input { margin-right: 15px; width: 20px; height: 20px; accent-color: var(--opac-blue); }
.option-label.selected { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
.quiz-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
.btn-ai { padding: 10px 24px; border-radius: 10px; font-weight: 600; border: none; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
.btn-prev { background: #f1f5f9; color: #475569; }
.btn-prev:hover { background: #e2e8f0; }
.btn-next, .btn-submit { background: var(--opac-blue, #1f5fae); color: white; }
.btn-next:hover, .btn-submit:hover { background: #16477f; }
.btn-submit { background: linear-gradient(135deg, #a855f7, #6366f1); }
.btn-submit:hover { opacity: 0.9; }

/* Result State */
#minat-result-container { display: none; }
.result-header { text-align: center; margin-bottom: 40px; padding: 40px; background: linear-gradient(135deg, #f3e8ff, #e0e7ff); border-radius: 20px; }
.result-badge { display: inline-block; padding: 6px 16px; background: #a855f7; color: white; border-radius: 20px; font-weight: 700; font-size: 0.9rem; margin-bottom: 15px; letter-spacing: 1px; }
.result-title { font-size: 2.2rem; font-weight: 800; color: #1e293b; margin-bottom: 15px; }
.result-desc { font-size: 1.1rem; color: #475569; max-width: 700px; margin: 0 auto; line-height: 1.6; }
.radar-chart-container { width: 100%; max-width: 400px; margin: 30px auto 0; }
.books-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 30px; }
@media (max-width: 768px) { .books-grid { grid-template-columns: repeat(2, 1fr); } }
.book-card { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; text-decoration: none; color: inherit; transition: transform 0.2s; }
.book-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.book-cover { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #f1f5f9; }
.book-info { padding: 12px; }
.book-title { font-weight: 700; font-size: 0.9rem; margin: 0 0 5px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-author { font-size: 0.8rem; color: #64748b; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.9); z-index: 1000; display: none; flex-direction: column; align-items: center; justify-content: center; }
.spinner { width: 50px; height: 50px; border: 5px solid #f3f3f3; border-top: 5px solid #a855f7; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .ai-page { padding: 20px 10px 40px; }
    .ai-header h1 { font-size: 1.6rem; }
    .ai-header p { font-size: 0.95rem; }
    .quiz-container { padding: 25px 20px; }
    .question-title { font-size: 1.15rem; margin-bottom: 15px; }
    .option-label { padding: 12px 15px; font-size: 0.95rem; }
    .result-title { font-size: 1.6rem; }
    .result-desc { font-size: 0.95rem; }
    .result-header { padding: 25px 20px; margin-bottom: 30px; }
    .radar-chart-container { margin: 20px auto 0; }
    
    .quiz-actions { flex-direction: column-reverse; gap: 12px; }
    .quiz-actions > div { display: none; }
    .btn-ai { padding: 14px 10px; width: 100%; flex: none; justify-content: center; font-size: 0.95rem; }
}

/* Extracted inline styles */
.ai-header-icon { color: #3b82f6; }
.ai-lock-container { text-align: center; padding: 50px; background: #fff; border-radius: 20px; border: 1px solid #e2e8f0; }
.ai-lock-icon { width: 48px; height: 48px; color: #94a3b8; margin-bottom: 20px; }
.ai-lock-title { font-size: 1.5rem; margin-bottom: 15px; }
.ai-lock-desc { color: #64748b; margin-bottom: 25px; }
.btn-no-decor { text-decoration: none; }
.ai-score-container { text-align: center; margin-top: 40px; padding-top: 30px; border-top: 1px solid #e2e8f0; }
.ai-score-title { font-size: 1.1rem; color: #475569; margin: 0; font-weight: 600; }
.ai-score-desc { color: #64748b; margin: 15px auto 0; max-width: 600px; }
.ai-recom-title { font-size: 1.4rem; font-weight: 700; margin: 0 0 20px; }
.anim-fade-in { animation: fadeIn 0.5s; }
.ai-nav-controls { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: center; margin-top: 20px; border-top: 1px solid #e2e8f0; padding-top: 20px; }
.ai-btn-prev { width:auto; padding:8px 16px; border:none; }
.ai-nav-status { font-size:0.9rem; color:#64748b; }
.ai-btn-next { width:auto; padding:8px 16px; border:none; }
.ai-empty-state { grid-column: 1/-1; text-align:center; color:#64748b; }