/* ============================================
   STI EXAMS REVIEWER - SHARED STYLES
   ============================================ */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%); color: #fff; min-height: 100vh; }
.container { max-width: 800px; margin: 0 auto; padding: 20px; }

/* ============================================
   HOME PAGE
   ============================================ */
.home-page { text-align: center; padding: 40px 20px; }
.home-page h1 { font-size: 2.5rem; margin-bottom: 10px; background: linear-gradient(90deg, #00d9ff, #00ff88); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.home-page .subtitle { color: #e6e6e6; margin-bottom: 40px; font-size: 1.1rem; }

/* Cards Grid */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
.card { background: rgba(255,255,255,0.05); border: 1px solid rgba(0,217,255,0.3); border-radius: 16px; padding: 30px; cursor: pointer; transition: all 0.3s ease; }
.card:hover { transform: translateY(-8px); box-shadow: 0 10px 40px rgba(0,217,255,0.3); border-color: #00d9ff; }
.card h3 { color: #00d9ff; margin-bottom: 10px; font-size: 1.3rem; }
.card p { color: #e6e6e6; font-size: 0.9rem; }
.card .count { margin-top: 15px; color: #00ff88; font-weight: bold; }

/* ============================================
   GLOSSARY & SUMMARY PAGES
   ============================================ */
.glossary-page, .summary-page { padding: 40px 20px; }
.glossary-page h2, .summary-page h2 { text-align: center; margin-bottom: 30px; color: #00d9ff; font-size: 2rem; }
.glossary-section, .summary-section { background: rgba(255,255,255,0.05); border-radius: 12px; padding: 25px; margin-bottom: 20px; }
.glossary-section h3, .summary-section h3 { color: #00ff88; margin-bottom: 15px; font-size: 1.2rem; }

/* Glossary Items */
.glossary-item { margin-bottom: 15px; padding: 15px; background: rgba(0,217,255,0.05); border-radius: 8px; border-left: 3px solid #00d9ff; }
.glossary-item strong { color: #00d9ff; display: block; margin-bottom: 5px; }
.glossary-item p { color: #e6e6e6; font-size: 0.95rem; line-height: 1.5; }

/* Summary Lists */
.summary-section ul { list-style: none; padding: 0; }
.summary-section li { padding: 10px 15px; margin-bottom: 8px; background: rgba(0,217,255,0.05); border-radius: 8px; border-left: 3px solid #00d9ff; color: #e6e6e6; line-height: 1.5; }
.summary-section li strong { color: #00d9ff; }

/* ============================================
   QUIZ PAGE
   ============================================ */
.quiz-page { display: none; padding: 40px 20px; }

/* Quiz Header */
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.quiz-header h2 { color: #00d9ff; font-size: 1.5rem; }
.quiz-info { display: flex; gap: 20px; align-items: center; }
.score-display { color: #00ff88; font-weight: bold; font-size: 1.1rem; }

/* Progress Bar */
.progress-container { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; margin-bottom: 30px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #00d9ff, #00ff88); border-radius: 4px; transition: width 0.3s ease; }

/* Question Card */
.question-card { background: rgba(255,255,255,0.05); border-radius: 16px; padding: 30px; margin-bottom: 20px; }
.question-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 25px; }
.question-text { font-size: 1.2rem; line-height: 1.6; }

/* Options */
.options-list { list-style: none; }
.option-btn { width: 100%; padding: 15px 20px; margin-bottom: 12px; background: rgba(255,255,255,0.05); border: 2px solid rgba(0,217,255,0.3); border-radius: 10px; color: #fff; font-size: 1rem; cursor: pointer; text-align: left; transition: all 0.3s ease; }
.option-btn:hover:not(:disabled) { background: rgba(0,217,255,0.1); border-color: #00d9ff; transform: translateX(10px); }
.option-btn.correct { background: rgba(0,255,136,0.2); border-color: #00ff88; }
.option-btn.incorrect { background: rgba(255,71,87,0.2); border-color: #ff4757; }
.option-btn:disabled { cursor: not-allowed; }

/* ============================================
   EXPLANATION BOX
   ============================================ */
.explanation-box { display: none; background: rgba(0,217,255,0.05); border-left: 4px solid #00d9ff; border-radius: 0 12px 12px 0; padding: 20px; margin-top: 20px; }
.explanation-section { margin-bottom: 20px; }
.explanation-section:last-child { margin-bottom: 0; }
.explanation-section h4 { color: #00d9ff; margin-bottom: 10px; font-size: 1rem; }
.explanation-section p { color: #e6e6e6; line-height: 1.6; }

/* Comparison Table */
.comparison-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.comparison-table th, .comparison-table td { padding: 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
.comparison-table th { color: #00d9ff; font-weight: 600; }
.comparison-table tr.correct-row { background: rgba(0,255,136,0.1); }

/* Badges */
.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.badge.correct { background: #00ff88; color: #1a1a2e; }
.badge.wrong { background: #ff4757; color: #fff; }

/* ============================================
   NAVIGATION BUTTONS
   ============================================ */

/* Back/Exit Button */
.back-btn { display: inline-block; margin-bottom: 20px; padding: 10px 20px; background: rgba(255,255,255,0.1); border: 1px solid rgba(0,217,255,0.3); border-radius: 8px; color: #00d9ff; cursor: pointer; transition: all 0.3s ease; }
.back-btn:hover { background: rgba(0,217,255,0.1); border-color: #00d9ff; }

/* Random Button */
.random-btn { padding: 8px 16px; background: rgba(255,255,255,0.1); border: 1px solid rgba(0,217,255,0.3); border-radius: 6px; color: #00d9ff; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; }
.random-btn:hover { background: rgba(0,217,255,0.1); border-color: #00d9ff; transform: scale(1.05); }
.random-btn.active { background: rgba(0,217,255,0.2); border-color: #00d9ff; box-shadow: 0 0 10px rgba(0,217,255,0.5); }

/* Next Button */
.next-btn { display: none; padding: 10px 20px; background: linear-gradient(90deg, #00d9ff, #00ff88); border: none; border-radius: 8px; color: #1a1a2e; font-size: 0.9rem; font-weight: bold; cursor: pointer; transition: all 0.3s ease; }
.next-btn:hover { transform: scale(1.05); box-shadow: 0 0 15px rgba(0,217,255,0.4); }

/* ============================================
   SOURCE FILTER BUTTONS
   ============================================ */
.source-legend { display: flex; gap: 10px; margin-bottom: 15px; }
.source-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: rgba(255,255,255,0.05); border: 1px solid rgba(0,217,255,0.3); border-radius: 20px; color: #e6e6e6; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; }
.source-btn:hover { background: rgba(0,217,255,0.1); border-color: #00d9ff; }
.source-btn.active { background: rgba(0,217,255,0.2); border-color: #00d9ff; box-shadow: 0 0 10px rgba(0,217,255,0.3); }
.source-btn .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.source-btn .dot.prelim { background: #00ff88; box-shadow: 0 0 8px #00ff88; }
.source-btn .dot.new { background: #ff4757; box-shadow: 0 0 8px #ff4757; }

/* Source Dot (in question) */
.source-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.source-dot.prelim { background: #00ff88; box-shadow: 0 0 8px #00ff88; }
.source-dot.new { background: #ff4757; box-shadow: 0 0 8px #ff4757; }

/* ============================================
   RESULTS PAGE
   ============================================ */
.results-page { display: none; text-align: center; padding: 60px 20px; }
.results-page h2 { font-size: 2rem; margin-bottom: 20px; color: #00d9ff; }
.final-score { font-size: 4rem; font-weight: bold; margin: 20px 0; background: linear-gradient(90deg, #00d9ff, #00ff88); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.percentage { font-size: 1.5rem; color: #00ff88; margin-bottom: 20px; }
.performance-msg { font-size: 1.2rem; color: #e6e6e6; margin-bottom: 40px; max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.btn-group { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.btn { padding: 12px 30px; border: none; border-radius: 8px; font-size: 1rem; font-weight: bold; cursor: pointer; transition: transform 0.2s ease; }
.btn:hover { transform: scale(1.05); }
.btn-primary { background: linear-gradient(90deg, #00d9ff, #00ff88); color: #1a1a2e; }
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; border: 2px solid #00d9ff; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 600px) {
    .home-page h1 { font-size: 1.8rem; }
    .cards-grid { grid-template-columns: 1fr; }
    .question-text { font-size: 1.1rem; }
    .final-score { font-size: 3rem; }
    .quiz-header { flex-direction: column; align-items: flex-start; }
    .quiz-info { flex-wrap: wrap; gap: 10px; }
    .source-legend { flex-wrap: wrap; }
}