/* CSS Principal - OAB Prep Premium */

/* 1. Design System & Variables */
:root {
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Dark Mode Theme (Default) */
    --bg-app: #090b10;
    --bg-gradient: radial-gradient(circle at 50% 0%, #151a2d 0%, #090b10 70%);
    --card-bg: rgba(18, 22, 35, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --primary: #2563eb;
    --primary-hover: #3b82f6;
    --primary-glow: rgba(37, 99, 235, 0.4);
    
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --accent-glow: rgba(245, 158, 11, 0.3);
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --success-border: rgba(16, 185, 129, 0.3);
    
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.15);
    --error-border: rgba(239, 68, 68, 0.3);
    
    --option-bg: rgba(255, 255, 255, 0.03);
    --option-border: rgba(255, 255, 255, 0.08);
    --option-hover: rgba(255, 255, 255, 0.06);
    --option-selected: rgba(37, 99, 235, 0.15);
    --option-selected-border: rgba(37, 99, 235, 0.6);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode {
    /* Light Mode Theme overrides */
    --bg-app: #f4f6f9;
    --bg-gradient: radial-gradient(circle at 50% 0%, #e2e8f0 0%, #f4f6f9 100%);
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #1e40af;
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(30, 64, 175, 0.2);
    
    --accent: #d97706;
    --accent-hover: #b45309;
    --accent-glow: rgba(217, 119, 6, 0.2);
    
    --option-bg: rgba(255, 255, 255, 0.9);
    --option-border: rgba(0, 0, 0, 0.08);
    --option-hover: rgba(241, 245, 249, 0.9);
    --option-selected: rgba(30, 64, 175, 0.08);
    --option-selected-border: rgba(30, 64, 175, 0.5);
}

/* 2. Base resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-app);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: var(--transition-smooth);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
}

/* 3. Typography & Utility Classes */
.text-success { color: var(--success) !important; }
.text-error { color: var(--error) !important; }

/* 4. App Container & Layout */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 5. Header Area */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: var(--card-shadow);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text p {
    font-size: 13px;
    color: var(--text-secondary);
}

.badge-premium {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, #ea580c 100%);
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.header-quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.install-header-btn {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: var(--primary);
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
}

body.light-mode .install-header-btn {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
}

.install-header-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

body.light-mode .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.04);
}

.theme-toggle-btn:hover {
    background: var(--option-hover);
    color: var(--text-primary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mode-toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    body.light-mode & { background: rgba(0, 0, 0, 0.05); }
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
}

.mode-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition-fast);
}

.mode-btn:hover {
    color: var(--text-primary);
}

.mode-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

/* 6. Layout Grid */
.main-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 20px;
    align-items: start;
}

/* 7. Sidebar Widgets */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    padding: 20px;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.widget-header h3 {
    margin-bottom: 0 !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    border-left: 3px solid var(--primary);
    padding-left: 8px;
}

.widget-clean-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--error);
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
    outline: none;
}

.widget-clean-btn:hover {
    background: var(--error);
    color: #ffffff;
    border-color: var(--error);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-icon-xs {
    width: 12px;
    height: 12px;
}

.widget h3 {
    font-size: 14.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-left: 3px solid var(--primary);
    padding-left: 8px;
}

/* Performance Widget */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.stat-item {
    background: rgba(0, 0, 0, 0.15);
    body.light-mode & { background: rgba(0, 0, 0, 0.03); }
    padding: 10px;
    border-radius: 10px;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    display: block;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.progress-bar-linear {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    body.light-mode & { background: rgba(0, 0, 0, 0.08); }
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
}

#stats-percent {
    color: var(--success);
    font-weight: 600;
}

#stats-ratio {
    color: var(--text-secondary);
}

/* Filters Widget */
.filter-group {
    margin-bottom: 14px;
}
.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: var(--text-secondary);
}

.custom-select {
    width: 100%;
    padding: 11px 14px;
    background: rgba(0, 0, 0, 0.25);
    body.light-mode & { background: #fff; }
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}
.custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-muted);
}

.search-input, .search-box input {
    width: 100%;
    padding: 11px 14px 11px 36px;
    background: rgba(0, 0, 0, 0.25);
    body.light-mode & { background: #fff; }
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Status Filter Pills (Caderno de Questões) */
.status-filter-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 4px;
}

.status-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 7px 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
    outline: none;
}

body.light-mode .status-pill {
    background: rgba(0, 0, 0, 0.04);
}

.status-pill:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.status-pill.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.status-pill.error-pill.active {
    background: var(--error) !important;
    border-color: var(--error) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.status-pill.star-pill.active {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* Subjects Widget List */
.subjects-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 440px;
    overflow-y: auto;
    padding-right: 4px;
}

.subject-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

body.light-mode .subject-item {
    background: rgba(0, 0, 0, 0.02);
}

.subject-item:hover {
    background: var(--option-hover);
    color: var(--text-primary);
}

.subject-item.active {
    background: var(--option-selected);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
    border-color: rgba(37, 99, 235, 0.3);
}

.subject-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.subject-badges-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
}

.subject-count {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
    color: var(--text-muted);
    font-weight: 600;
}

body.light-mode .subject-count {
    background: rgba(0, 0, 0, 0.08);
}

.subject-item.active .subject-count {
    background: var(--primary);
    color: #fff;
}

.subject-stats-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
}

.subject-stats-badge.good {
    color: var(--success);
    background: var(--success-bg);
}

.subject-stats-badge.warning {
    color: var(--accent);
    background: rgba(245, 158, 11, 0.15);
}

.subject-stats-badge.danger {
    color: var(--error);
    background: var(--error-bg);
}

.subject-progress-mini {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

body.light-mode .subject-progress-mini {
    background: rgba(0, 0, 0, 0.06);
}

.subject-progress-mini-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Backup Widget */
.backup-widget {
    margin-top: 6px;
}

.backup-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.backup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.backup-btn {
    width: 100%;
    justify-content: center;
    padding: 9px 12px;
    font-size: 12.5px;
}

/* 8. Workspace Area */
.workspace-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Setup Card */
.mode-setup-card {
    padding: 30px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
}

.sprint-badge-header {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.3);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.setup-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.setup-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Sprint Setup Config Sections */
.sprint-config-section {
    text-align: left;
    margin-top: 20px;
}

.sprint-section-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sprint-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sprint-card-option {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
    font-family: var(--font-primary);
}

body.light-mode .sprint-card-option {
    background: rgba(0, 0, 0, 0.03);
}

.sprint-card-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.07);
}

.sprint-card-option.active {
    background: rgba(37, 99, 235, 0.15) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.sprint-card-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.sprint-card-option.active .sprint-card-num {
    color: var(--primary);
}

.sprint-card-title {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.sprint-card-time {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.sprint-pool-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.sprint-pool-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
    font-family: var(--font-primary);
    text-align: center;
}

body.light-mode .sprint-pool-btn {
    background: rgba(0, 0, 0, 0.03);
}

.sprint-pool-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.sprint-pool-btn.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.sprint-pool-btn.error-pool.active {
    background: var(--error) !important;
    border-color: var(--error) !important;
}

.setup-body {
    margin-top: 30px;
}

.setup-rules {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
    margin-bottom: 30px;
}

.rule-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.rule-icon {
    font-size: 24px;
    background: rgba(0, 0, 0, 0.15);
    padding: 8px;
    border-radius: 10px;
}

.rule-item h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.rule-item p {
    font-size: 13.5px;
    color: var(--text-secondary);
}

/* Exam Mode UI */
.exam-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--card-bg);
}

.exam-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.exam-badge {
    font-size: 11px;
    font-weight: 800;
    background: var(--accent);
    color: #fff;
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.exam-progress-text {
    font-size: 15px;
    font-weight: 600;
}

.exam-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

.timer-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.exam-grid-card {
    padding: 16px 20px;
}

.exam-grid-card h4 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 700;
}

.question-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.grid-bubble {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    body.light-mode & { background: rgba(0, 0, 0, 0.05); }
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.grid-bubble:hover {
    background: var(--option-hover);
    color: var(--text-primary);
}

.grid-bubble.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    color: var(--text-primary);
}

.grid-bubble.answered {
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.grid-bubble.correct {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
}

.grid-bubble.incorrect {
    background: var(--error-bg);
    border-color: var(--error);
    color: var(--error);
}

/* Banner Active Filters */
.filter-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: var(--option-selected);
    border: 1px dashed var(--option-selected-border);
}

.filter-banner-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.text-link {
    background: transparent;
    border: none;
    color: var(--primary);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* 9. Question Card Details */
.question-container {
    perspective: 1000px;
}

.question-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.card-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn-favorite {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
}

body.light-mode .icon-btn-favorite {
    background: rgba(0, 0, 0, 0.04);
}

.icon-btn-favorite .star-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease, fill 0.2s ease;
}

.icon-btn-favorite:hover {
    color: var(--accent);
    border-color: rgba(245, 158, 11, 0.4);
    transform: scale(1.08);
}

.icon-btn-favorite.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.icon-btn-favorite.active .star-icon {
    fill: var(--accent);
}

.badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    font-size: 12.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
}

.badge-exam {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-subject {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-theme {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

body.light-mode .badge-theme {
    background: rgba(0, 0, 0, 0.05);
}

.badge-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error-border);
}

.question-meta {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    white-space: nowrap;
}

.question-text {
    font-size: 17.5px;
    line-height: 1.8;
    color: var(--text-primary);
    text-align: justify;
}

/* Options Lists */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.option-btn {
    border: 1px solid var(--option-border);
    background: var(--option-bg);
    border-radius: 12px;
    padding: 16px 18px;
    text-align: left;
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: var(--transition-fast);
    position: relative;
}

.option-btn:hover {
    background: var(--option-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.option-content-wrap {
    flex: 1;
}

.option-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.eliminate-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 0.4;
    transition: var(--transition-fast);
    outline: none;
}

.option-btn:hover .eliminate-btn {
    opacity: 0.8;
}

.eliminate-btn:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border-color: var(--error-border);
}

.option-btn.eliminated {
    opacity: 0.4;
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.04);
}

body.light-mode .option-btn.eliminated {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.06);
}

.option-btn.eliminated .option-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.option-btn.eliminated .eliminate-btn {
    opacity: 1;
    color: var(--error);
    background: rgba(239, 68, 68, 0.12);
    border-color: var(--error-border);
}

.option-letter {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    body.light-mode & { background: rgba(0,0,0,0.06); }
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.option-btn:hover .option-letter {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.option-btn.selected {
    background: var(--option-selected);
    border-color: var(--option-selected-border);
}

.option-btn.selected .option-letter {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Correct/Incorrect styles in Study Mode */
.option-btn.correct {
    background: var(--success-bg) !important;
    border-color: var(--success) !important;
}

.option-btn.correct .option-letter {
    background: var(--success) !important;
    color: #fff !important;
    border-color: var(--success) !important;
}

.option-btn.incorrect {
    background: var(--error-bg) !important;
    border-color: var(--error) !important;
}

.option-btn.incorrect .option-letter {
    background: var(--error) !important;
    color: #fff !important;
    border-color: var(--error) !important;
}

/* Feedback panel */
.feedback-panel {
    background: var(--option-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 22px;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feedback-header {
    display: flex;
    gap: 14px;
    align-items: center;
}

.feedback-icon-container {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-icon-container.success {
    background: var(--success-bg);
    color: var(--success);
}

.feedback-icon-container.error {
    background: var(--error-bg);
    color: var(--error);
}

.feedback-title-container h4 {
    font-size: 17px;
    font-weight: 700;
}

.feedback-title-container p {
    font-size: 13px;
    color: var(--text-secondary);
}

.feedback-body h5 {
    font-size: 14.5px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feedback-body p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: justify;
}

/* Card footer */
.card-footer {
    display: grid;
    grid-template-columns: 140px 1fr 140px;
    align-items: center;
    margin-top: 20px;
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
}

.footer-center {
    display: flex;
    justify-content: center;
}

/* Keyboard Shortcuts Hint Bar (Desktop only) */
.keyboard-hints {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 6px 12px;
    font-size: 11.5px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed var(--card-border);
}

body.light-mode .keyboard-hints {
    background: rgba(0, 0, 0, 0.02);
}

.keyboard-hints strong {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 11px;
}

body.light-mode .keyboard-hints strong {
    background: rgba(0, 0, 0, 0.06);
}

.hint-sep {
    opacity: 0.4;
}

/* Buttons Styles */
.primary-btn, .secondary-btn, .error-btn, .mode-btn {
    font-family: var(--font-primary);
    outline: none;
    cursor: pointer;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-size: 14.5px;
    font-weight: 600;
    box-shadow: 0 4px 12px var(--primary-glow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--primary-glow);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    body.light-mode & { background: rgba(0, 0, 0, 0.04); }
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.secondary-btn:hover {
    background: var(--option-hover);
}

.secondary-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.error-btn {
    background: var(--error);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transition: var(--transition-fast);
}

.error-btn:hover {
    background: #dc2626;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    body.light-mode & { background: rgba(0, 0, 0, 0.04); }
    border: 1px solid var(--card-border);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.icon-btn:hover {
    background: var(--option-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 12px;
}

/* Empty State */
.empty-state {
    padding: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.empty-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* 10. Skeleton Loader Styles */
.skeleton {
    cursor: wait;
}

.skeleton-line {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    body.light-mode & {
        background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 75%);
    }
    background-size: 200% 100%;
    animation: loading-pulse 1.5s infinite;
    border-radius: 4px;
}

.skeleton-line.title {
    height: 28px;
    width: 180px;
    margin-bottom: 20px;
}

.skeleton-line.paragraph {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-line.paragraph:last-of-type {
    width: 60%;
    margin-bottom: 30px;
}

.skeleton-line.option {
    height: 50px;
    border-radius: 12px;
    margin-bottom: 12px;
}

@keyframes loading-pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Animations for transitioning cards */
@keyframes slide-in-right {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-in-left {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-right {
    animation: slide-in-right 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-left {
    animation: slide-in-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 11. Exam Report Card & Diagnostics */
.exam-report-card {
    padding: 30px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.report-header {
    text-align: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 20px;
}

.report-badge-container {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

#report-status-badge {
    font-size: 13px;
    font-weight: 800;
    padding: 6px 18px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#report-status-badge.aprovado {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

#report-status-badge.reprovado {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error-border);
}

.report-header h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.report-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.report-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 10px;
    text-align: center;
}

.report-stat-item {
    background: rgba(0, 0, 0, 0.15);
    body.light-mode & { background: rgba(0, 0, 0, 0.03); }
    border: 1px solid var(--card-border);
    padding: 16px;
    border-radius: 12px;
}

.report-stat-value {
    font-size: 28px;
    font-weight: 800;
    display: block;
    color: var(--primary);
}

.report-stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

.report-section {
    margin-top: 12px;
    margin-bottom: 12px;
}

.report-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.report-table-container {
    overflow-x: auto;
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.report-table th, .report-table td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--card-border);
}

.report-table th {
    background: rgba(0, 0, 0, 0.2);
    body.light-mode & { background: rgba(0, 0, 0, 0.04); }
    font-weight: 700;
    color: var(--text-secondary);
}

.report-table tbody tr:last-child td {
    border-bottom: none;
}

.report-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
    body.light-mode & { background: rgba(0, 0, 0, 0.02); }
}

.recommendations-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rec-card {
    background: rgba(255, 255, 255, 0.02);
    body.light-mode & { background: rgba(0, 0, 0, 0.01); }
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.rec-icon {
    font-size: 24px;
    padding: 10px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rec-content h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.rec-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.report-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    border-top: 1px solid var(--card-border);
    padding-top: 24px;
}

/* Progress Target 40 acertos styles */
.progress-target-section {
    background: rgba(0, 0, 0, 0.1);
    body.light-mode & { background: rgba(0, 0, 0, 0.02); }
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px 22px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.progress-target-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-target-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-target-status {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--accent);
    background: rgba(245, 158, 11, 0.12);
    padding: 3px 10px;
    border-radius: 6px;
}

.progress-target-container {
    width: 100%;
    position: relative;
    padding-top: 6px;
    padding-bottom: 6px;
}

.progress-target-bar-bg {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.06);
    body.light-mode & { background: rgba(0, 0, 0, 0.08); }
    border-radius: 7px;
    position: relative;
    overflow: visible; /* to allow marker to overflow a bit */
}

.progress-target-bar-fill {
    height: 100%;
    border-radius: 7px;
    width: 0%;
    background: linear-gradient(90deg, var(--error) 0%, var(--accent) 50%, var(--success) 100%);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.meta-marker {
    position: absolute;
    left: 50%; /* 40 is exactly 50% of 80 */
    top: -6px;
    bottom: -6px;
    width: 2px;
    background: #fff;
    body.light-mode & { background: #000; }
    box-shadow: 0 0 6px rgba(255,255,255,0.8);
    pointer-events: none;
    z-index: 2;
}

.meta-marker-label {
    position: absolute;
    top: -18px;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

/* Strategic Advisor Box styles */
.advisor-section {
    margin-top: 12px;
    margin-bottom: 12px;
}

.advisor-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 12px;
    padding: 22px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.advisor-icon {
    font-size: 26px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advisor-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.advisor-content p {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: justify;
}

/* Priority tag and metadata formatting on recommendations */
.priority-tag {
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 8px;
}

.priority-critical {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error-border);
}

.priority-high {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-medium {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* =========================================================
   MOBILE COMPONENTS & RESPONSIVE DESIGN (PHONES & TABLETS)
   ========================================================= */

/* Desktop defaults for mobile-only elements */
.mobile-filter-bar {
    display: none;
}
.sidebar-mobile-header {
    display: none;
}
.sidebar-backdrop {
    display: none;
}

@media (max-width: 992px) {
    body.drawer-open {
        overflow: hidden;
    }

    .app-container {
        padding: 12px 10px;
        gap: 12px;
    }

    .app-header {
        padding: 12px 14px;
        flex-direction: column;
        gap: 12px;
    }

    .logo-area {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .brand-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .logo-text h1 {
        font-size: 18px;
    }

    .logo-text p {
        font-size: 11.5px;
    }

    .header-quick-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .install-header-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .theme-toggle-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }

    .header-controls {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mode-toggle-group {
        width: 100%;
        display: flex;
    }

    .mode-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 6px;
        font-size: 12.5px;
        gap: 5px;
    }

    .mode-btn .btn-icon {
        width: 15px;
        height: 15px;
    }

    .runner-header-btn {
        width: 100%;
        justify-content: center;
        padding: 9px 14px;
        font-size: 13.5px;
    }

    /* Mobile Quick Filter Bar */
    .mobile-filter-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 14px;
        border-radius: 12px;
        gap: 10px;
    }

    .mobile-sidebar-btn {
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: 8px;
        padding: 8px 14px;
        font-size: 13.5px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        font-family: var(--font-primary);
        box-shadow: 0 2px 8px var(--primary-glow);
        transition: var(--transition-fast);
    }

    .mobile-sidebar-btn:hover {
        background: var(--primary-hover);
    }

    .mobile-sidebar-btn:active {
        transform: scale(0.98);
    }

    .mobile-stats-summary {
        display: flex;
        gap: 6px;
        align-items: center;
    }

    .mobile-stat-pill {
        font-size: 12px;
        font-weight: 700;
        padding: 4px 8px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.08);
        body.light-mode & { background: rgba(0, 0, 0, 0.08); }
        color: var(--text-secondary);
    }

    .mobile-stat-pill.success {
        color: var(--success);
        background: var(--success-bg);
    }

    /* Main Layout on Mobile */
    .main-layout {
        display: block;
        width: 100%;
    }

    /* Sidebar Drawer */
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 320px;
        max-width: 85vw;
        background: var(--bg-app);
        border-right: 1px solid var(--card-border);
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        padding: 16px;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--card-border);
    }

    .sidebar-mobile-header h3 {
        font-size: 16px;
        font-weight: 800;
        color: var(--text-primary);
    }

    #sidebar-close-btn {
        appearance: none;
        -webkit-appearance: none;
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid rgba(37, 99, 235, 0.18);
        border-radius: 11px;
        background: rgba(37, 99, 235, 0.08);
        color: var(--primary);
        cursor: pointer;
        line-height: 1;
        box-shadow: none;
        transition: var(--transition-fast);
        -webkit-tap-highlight-color: transparent;
    }

    #sidebar-close-btn svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
    }

    #sidebar-close-btn:active {
        transform: scale(0.94);
        background: rgba(37, 99, 235, 0.14);
    }

    #sidebar-close-btn:focus-visible {
        outline: 3px solid var(--primary-glow);
        outline-offset: 2px;
    }

    .icon-btn-close {
        background: rgba(255, 255, 255, 0.08);
        body.light-mode & { background: rgba(0, 0, 0, 0.08); }
        border: 1px solid var(--card-border);
        border-radius: 8px;
        width: 34px;
        height: 34px;
        color: var(--text-primary);
        cursor: pointer;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Question Card Mobile */
    .question-card {
        padding: 18px 14px;
        border-radius: 14px;
        gap: 16px;
    }

    .question-meta {
        font-size: 20px;
    }

    .question-text {
        font-size: 16px;
        line-height: 1.7;
        text-align: left;
    }

    .options-list {
        gap: 10px;
        margin-top: 8px;
    }

    .option-btn {
        padding: 14px 14px;
        gap: 12px;
        font-size: 15px;
        line-height: 1.55;
        border-radius: 10px;
        min-height: 48px;
    }

    .option-letter {
        width: 26px;
        height: 26px;
        font-size: 12px;
        flex-shrink: 0;
    }

    /* Card Footer Buttons Mobile */
    .card-footer {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-top: 16px;
        margin-top: 14px;
    }

    .footer-left, .footer-right {
        width: 100%;
    }

    .footer-left button, .footer-right button {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 14px;
        min-height: 44px;
    }

    .footer-center {
        order: -1;
        width: 100%;
    }

    .footer-center button {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 15px;
        min-height: 48px;
    }

    /* Feedback Panel Mobile */
    .feedback-panel {
        padding: 16px 14px;
        gap: 10px;
        margin-top: 14px;
    }

    .feedback-body p {
        font-size: 14px;
        line-height: 1.65;
        text-align: left;
    }

    /* Exam Status Bar Mobile */
    .exam-status-bar {
        flex-direction: column;
        gap: 10px;
        padding: 12px 14px;
        align-items: stretch;
        text-align: center;
    }

    .exam-info {
        justify-content: space-between;
    }

    .exam-timer {
        justify-content: center;
        font-size: 16px;
    }

    #finish-exam-btn {
        width: 100%;
        padding: 11px;
        font-size: 13.5px;
    }

    /* Question Grid Mobile */
    .question-grid {
        justify-content: center;
        gap: 5px;
    }

    .grid-bubble {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    /* Setup Mode Card Mobile */
    .mode-setup-card {
        padding: 20px 14px;
        margin: 10px auto;
    }

    .setup-rules {
        gap: 14px;
    }

    /* Diagnostic Report Mobile */
    .exam-report-card {
        padding: 18px 14px;
        gap: 18px;
    }

    .report-stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .report-stat-item {
        padding: 12px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .report-stat-value {
        font-size: 22px;
    }

    .report-table-container {
        -webkit-overflow-scrolling: touch;
    }

    .report-table th, .report-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .advisor-card, .rec-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 14px;
        gap: 10px;
    }

    .advisor-icon, .rec-icon {
        align-self: flex-start;
    }

    .advisor-content p, .rec-content p {
        text-align: left;
    }

    .report-footer {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .report-footer button {
        width: 100%;
        padding: 12px;
    }

    .keyboard-hints {
        display: none !important;
    }
}

/* =========================================================
   PRINT / PDF EXPORT STYLESHEET (@media print)
   ========================================================= */
@media print {
    body {
        background: #ffffff !important;
        background-image: none !important;
        color: #0f172a !important;
        font-size: 12pt !important;
    }

    .app-header, 
    .sidebar, 
    #mobile-filter-bar, 
    .report-footer, 
    #exam-grid-card, 
    #active-question-card, 
    #filter-banner,
    .mode-setup-card,
    #exam-status-bar,
    .keyboard-hints,
    .sidebar-backdrop {
        display: none !important;
    }

    .app-container {
        padding: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .main-layout {
        display: block !important;
        width: 100% !important;
    }

    .workspace-area {
        width: 100% !important;
    }

    .glass-card {
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        color: #0f172a !important;
    }

    #exam-report-card {
        display: block !important;
        padding: 20px !important;
        border: none !important;
    }

    .report-header {
        border-bottom: 2px solid #0f172a !important;
        padding-bottom: 15px !important;
        margin-bottom: 20px !important;
    }

    .report-header h2 {
        color: #0f172a !important;
        font-size: 20pt !important;
    }

    .report-stats-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }

    .report-stat-item {
        border: 1px solid #cbd5e1 !important;
        background: #f8fafc !important;
        padding: 12px !important;
    }

    .report-stat-value {
        color: #0f172a !important;
    }

    .report-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .report-table th, 
    .report-table td {
        border: 1px solid #cbd5e1 !important;
        color: #0f172a !important;
        padding: 8px 10px !important;
        font-size: 10pt !important;
    }

    .advisor-card, 
    .rec-card {
        border: 1px solid #cbd5e1 !important;
        background: #f8fafc !important;
        color: #0f172a !important;
        break-inside: avoid;
        margin-bottom: 12px !important;
    }

    .advisor-content h3, 
    .rec-content h4 {
        color: #0f172a !important;
    }

    .advisor-content p, 
    .rec-content p {
        color: #334155 !important;
    }
}

/* =========================================================
   RUNNER / ATHLETE HANDS-FREE VOICE PLAYER STYLES
   ========================================================= */

/* Header Runner Button */
.runner-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.15));
    border: 1.5px solid var(--accent);
    color: var(--accent);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15);
}

.runner-header-btn:hover {
    background: var(--accent);
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.runner-icon {
    font-size: 16px;
}

/* Fullscreen Runner Modal */
.runner-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 29, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 16px;
    animation: fadeIn 0.3s ease;
}

body.light-mode .runner-modal {
    background: rgba(248, 250, 252, 0.98);
}

.runner-container {
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: auto 0;
}

/* Runner Topbar */
.runner-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.runner-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.runner-badge {
    background: rgba(245, 158, 11, 0.18);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 20px;
}

.runner-counter {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.runner-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.runner-speed-control {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid var(--card-border);
}

body.light-mode .runner-speed-control {
    background: rgba(0, 0, 0, 0.05);
}

.runner-speed-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.runner-speed-btn.active {
    background: var(--primary);
    color: #fff;
}

.runner-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.runner-close-btn:hover {
    background: var(--error);
    color: #fff;
    border-color: var(--error);
}

/* Voice Status & Wave Animation */
.runner-voice-status-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 18px;
}

body.light-mode .runner-voice-status-box {
    background: rgba(0, 0, 0, 0.02);
}

.runner-status-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulseDot 1.5s infinite;
}

.runner-status-pill.listening .status-dot {
    background: #10b981;
    box-shadow: 0 0 12px #10b981;
}

.runner-status-pill.speaking .status-dot {
    background: #3b82f6;
    box-shadow: 0 0 12px #3b82f6;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* Audio Waveform */
.audio-wave-animation {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 24px;
}

.wave-bar {
    width: 4px;
    height: 6px;
    background: var(--accent);
    border-radius: 2px;
    transition: height 0.2s ease;
}

.audio-wave-animation.active .wave-bar:nth-child(1) { animation: wave 0.8s infinite 0.1s; }
.audio-wave-animation.active .wave-bar:nth-child(2) { animation: wave 0.8s infinite 0.3s; }
.audio-wave-animation.active .wave-bar:nth-child(3) { animation: wave 0.8s infinite 0.5s; }
.audio-wave-animation.active .wave-bar:nth-child(4) { animation: wave 0.8s infinite 0.2s; }
.audio-wave-animation.active .wave-bar:nth-child(5) { animation: wave 0.8s infinite 0.4s; }

@keyframes wave {
    0%, 100% { height: 6px; background: var(--primary); }
    50% { height: 22px; background: var(--accent); }
}

/* Runner Active Question Card */
.runner-card {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 140px;
}

.runner-meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.runner-enunciado {
    font-size: 16.5px;
    line-height: 1.6;
    font-weight: 500;
    color: var(--text-primary);
}

.runner-spoken-feedback {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
    font-weight: 700;
    font-size: 15px;
    animation: fadeIn 0.3s ease;
}

.runner-spoken-feedback.incorrect {
    background: var(--error-bg);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.runner-feedback-icon {
    font-size: 20px;
}

/* Giant Touch Alternatives Grid */
.runner-giant-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.runner-alt-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--card-border);
    border-radius: 14px;
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
    min-height: 75px;
    font-family: var(--font-primary);
}

body.light-mode .runner-alt-btn {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.runner-alt-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.runner-alt-letter {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

body.light-mode .runner-alt-letter {
    background: rgba(0, 0, 0, 0.05);
}

.runner-alt-text {
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--text-secondary);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.runner-alt-btn.selected {
    border-color: var(--primary) !important;
    background: rgba(37, 99, 235, 0.15) !important;
}

.runner-alt-btn.selected .runner-alt-letter {
    background: var(--primary);
    color: #fff;
}

.runner-alt-btn.correct {
    border-color: var(--success) !important;
    background: var(--success-bg) !important;
}

.runner-alt-btn.correct .runner-alt-letter {
    background: var(--success);
    color: #fff;
}

.runner-alt-btn.incorrect {
    border-color: var(--error) !important;
    background: var(--error-bg) !important;
}

.runner-alt-btn.incorrect .runner-alt-letter {
    background: var(--error);
    color: #fff;
}

/* Runner Bottom Bar */
.runner-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 6px;
}

.runner-stats-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.runner-actions-row {
    display: flex;
    gap: 10px;
}

.runner-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
}

.runner-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

/* Runner Pocket Mode */
.runner-pocket-btn {
    padding: 6px 12px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.runner-pocket-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000 !important;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.pocket-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #475569;
}

.pocket-pulse-icon {
    font-size: 38px;
    opacity: 0.6;
    animation: pulsePocket 2s infinite ease-in-out;
}

@keyframes pulsePocket {
    0%, 100% { opacity: 0.3; transform: scale(0.95); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.pocket-indicator h3 {
    font-size: 16px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 1px;
    margin: 0;
}

.pocket-indicator p {
    font-size: 13px;
    color: #475569;
    margin: 0;
    max-width: 290px;
    line-height: 1.4;
}

.pocket-warning {
    color: #f59e0b !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    background: rgba(245, 158, 11, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.pocket-desc {
    color: #64748b !important;
    font-size: 12.5px !important;
}

.pocket-unlock-pill {
    margin-top: 14px;
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Runner Submode Selector */
.runner-submode-group {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2px;
    border: 1px solid var(--card-border);
}

body.light-mode .runner-submode-group {
    background: rgba(0, 0, 0, 0.06);
}

.runner-submode-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
}

.runner-submode-btn.active {
    background: var(--accent);
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Podcast Reflection Box */
.podcast-reflection-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    animation: fadeIn 0.3s ease;
}

.podcast-reflection-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
}

.podcast-reflection-icon {
    font-size: 18px;
    animation: pulsePocket 1s infinite ease-in-out;
}

.podcast-reflection-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

body.light-mode .podcast-reflection-progress {
    background: rgba(0, 0, 0, 0.1);
}

.podcast-reflection-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
    border-radius: 3px;
    transition: width 1s linear;
}

.podcast-reflection-hint {
    font-size: 11.5px;
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 600px) {
    .runner-giant-buttons-grid {
        grid-template-columns: 1fr;
    }

    .runner-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .runner-top-actions {
        width: 100%;
        justify-content: space-between;
    }

    .runner-bottom-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .runner-actions-row {
        justify-content: space-between;
    }

    .runner-action-btn {
        flex: 1;
        text-align: center;
        padding: 10px 8px;
        font-size: 12.5px;
    }
}

/* =========================================================
   PWA INSTALL MODAL & BANNER STYLES
   ========================================================= */
.pwa-install-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pwa-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.pwa-modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    animation: scaleUpModal 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleUpModal {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.pwa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pwa-app-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-app-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pwa-app-badge h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
}

.pwa-app-badge p {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.pwa-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pwa-step-card {
    background: rgba(255, 255, 255, 0.04);
    body.light-mode & { background: rgba(0, 0, 0, 0.03); }
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pwa-step-num {
    font-size: 20px;
    min-width: 28px;
    text-align: center;
}

.pwa-step-text strong {
    font-size: 13.5px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 3px;
}

.pwa-step-text p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
}

.pwa-direct-btn {
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
}

