/* ========================================================
   1. CSS VARIABLES (Modern, Clean, Accessible Colors)
   ======================================================== */
:root {
    /* Brand Colors */
    --primary-color: #4f46e5; /* Indigo */
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    
    /* Neutral/Backgrounds */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    /* Semantic Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --error: #ef4444;
    --error-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    
    /* Tags & Subjects */
    --tag-physics: #3b82f6;
    --tag-physics-bg: #dbeafe;
    --tag-chem: #8b5cf6;
    --tag-chem-bg: #ede9fe;
    --tag-bio: #10b981;
    --tag-bio-bg: #d1fae5;
    --tag-history: #f59e0b;
    --tag-history-bg: #fef3c7;
    
    /* Typography & Spacing */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    
    /* UI Elevations */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-header: 0 2px 10px rgba(0,0,0,0.05);
}

/* ========================================================
   2. RESET & GLOBAL STYLES (Mobile First)
   ======================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-stack);
    background-color: #e2e8f0; 
    color: var(--text-main);
    line-height: 1.5;
    font-size: 16px;
}

#app-wrapper {
    max-width: 480px; 
    margin: 0 auto;
    background-color: var(--bg-main);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.hidden { display: none !important; }
.divider { margin: 0 8px; color: #cbd5e1; }
.section-divider { margin: 24px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--border-color); font-size: 1.1rem; }

/* ========================================================
   3. TYPOGRAPHY & BUTTONS
   ======================================================== */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; margin-bottom: var(--spacing-sm); }
p { color: var(--text-muted); font-size: 0.95rem; }

button {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px; 
    padding: 0 var(--spacing-md);
}

button:active { transform: scale(0.96); } 
button:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:active { background-color: var(--primary-hover); }

.btn-outline { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:active { background-color: var(--primary-light); }

.btn-success { background-color: var(--success); color: white; }
.btn-success:active { background-color: #059669; }

.btn-text { background: transparent; color: var(--primary-color); min-height: auto; padding: 0; }
.btn-sm { min-height: 36px; font-size: 0.85rem; padding: 0 16px; border-radius: var(--radius-pill); }
.btn-block { width: 100%; }
.btn-icon { background: transparent; font-size: 1.2rem; min-height: 44px; width: 44px; border-radius: 50%; }
.btn-icon:active { background: #f1f5f9; }

/* ========================================================
   4. HEADER & SIDEBAR NAVIGATION
   ======================================================== */
#top-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    box-shadow: var(--shadow-header);
    height: 64px;
}

.nav-left, .nav-right { display: flex; align-items: center; gap: 12px; }
.app-logo { font-size: 1.25rem; font-weight: 800; color: var(--primary-color); letter-spacing: -0.5px; }

#menu-btn { padding: 0; width: 44px; background: transparent; justify-content: flex-start; }
.menu-icon, .menu-icon::before, .menu-icon::after {
    display: block; width: 22px; height: 2px; background-color: var(--text-main); position: relative; transition: 0.3s; border-radius: 2px;
}
.menu-icon::before { content: ''; position: absolute; top: -6px; }
.menu-icon::after { content: ''; position: absolute; top: 6px; }

.wallet-badge {
    display: flex; align-items: center; gap: 6px;
    background: var(--warning-light); color: var(--warning);
    font-weight: 700; font-size: 0.9rem;
    padding: 6px 14px; border-radius: var(--radius-pill);
    cursor: pointer; transition: 0.2s;
}
.wallet-badge:active { transform: scale(0.95); }
.wallet-badge button { background: var(--warning); color: white; width: 22px; min-height: 22px; padding: 0; border-radius: 50%; margin-left: 4px;}

.profile-menu { cursor: pointer; transition: 0.2s; }
.profile-menu:active { transform: scale(0.90); }
.avatar-sm { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-light); }

#sidebar {
    position: absolute; top: 64px; left: 0; bottom: 0; width: 260px;
    background: var(--bg-card); z-index: 40; box-shadow: var(--shadow-md);
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
}
#sidebar.sidebar-open { transform: translateX(0); }

.sidebar-nav { padding: var(--spacing-md) 0; flex-grow: 1; display: flex; flex-direction: column; }
.nav-item {
    padding: 14px var(--spacing-lg); text-decoration: none; color: var(--text-muted);
    font-weight: 600; transition: background 0.2s; border-left: 4px solid transparent; font-size: 0.95rem;
}
.nav-item:active { background: var(--bg-main); }
.nav-item.active { color: var(--primary-color); border-left-color: var(--primary-color); background: var(--primary-light); }
.sidebar-footer { padding: var(--spacing-lg); border-top: 1px solid var(--border-color); }

/* ========================================================
   5. VIEW MANAGEMENT & MAIN LAYOUT
   ======================================================== */
#main-content { flex-grow: 1; padding: var(--spacing-md); overflow-y: auto; overflow-x: hidden; }
.screen-view { display: none; animation: fadeIn 0.3s ease; }
.screen-view.active-view { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.section-header { margin-bottom: var(--spacing-lg); }

/* ========================================================
   6. VIEW 1: DASHBOARD
   ======================================================== */
.dashboard-actions { display: grid; grid-template-columns: 1fr; gap: var(--spacing-md); margin-bottom: var(--spacing-lg); }
.action-card {
    background: var(--bg-card); padding: var(--spacing-md); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
    text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.primary-action { background: var(--primary-color); color: white; border: none; box-shadow: 0 8px 15px -3px rgba(79, 70, 229, 0.4); }
.primary-action p { color: rgba(255,255,255,0.85); }
.card-icon { font-size: 2rem; margin-bottom: 4px; }

.section-title-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: var(--spacing-md); }
.quiz-list { display: flex; flex-direction: column; gap: var(--spacing-sm); }
.quiz-list-item {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: var(--spacing-md);
    display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm);
}
.quiz-item-info h4 { margin-bottom: 6px; font-size: 1rem; }
.quiz-meta { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }
.quiz-item-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* Dashboard Footer */
.app-footer { margin-top: 2rem; padding: 1.5rem 0; border-top: 1px dashed var(--border-color); text-align: center; }
.dev-credits p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.legal-links { margin-top: 0.8rem; display: flex; justify-content: center; gap: 4px; font-size: 0.75rem; }
.legal-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.legal-links a:hover { color: var(--primary-color); text-decoration: underline; }

/* ========================================================
   7. VIEW 2: PROFILE
   ======================================================== */
.profile-card { background: white; border-radius: var(--radius-lg); padding: var(--spacing-lg); text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
.profile-avatar-large { margin-bottom: 20px; }
.profile-avatar-large img { width: 100px; height: 100px; border-radius: 50%; border: 4px solid var(--primary-light); object-fit: cover; box-shadow: var(--shadow-sm); }
.profile-details h3 { font-size: 1.4rem; margin-bottom: 4px; }
.profile-details .hint-text { margin-bottom: 24px; font-size: 0.9rem; color: var(--text-muted); }
.google-login-btn { background: white; color: #333; border: 1px solid #ccc; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.google-login-btn .icon { font-weight: 900; color: #DB4437; font-size: 1.2rem; }
.security-note { font-size: 0.75rem; color: #94a3b8; line-height: 1.4; }

/* ========================================================
   8. VIEW 3: PAST QUIZZES (HISTORY)
   ======================================================== */
.sticky-header { position: sticky; top: -16px; background: var(--bg-main); padding-top: 16px; z-index: 10; padding-bottom: 8px; }
.header-content-flex { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.filter-dropdown { width: auto; padding: 6px 12px; font-size: 0.85rem; border-radius: 6px; }

.history-list { display: flex; flex-direction: column; gap: var(--spacing-md); padding-bottom: 40px; }
.history-card { background: var(--bg-card); border-radius: var(--radius-md); padding: var(--spacing-md); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.hc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.hc-title h4 { font-size: 1.05rem; margin-bottom: 6px; color: var(--text-main); }
.hc-date { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

.status-badge { padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; display: inline-block; }
.status-attempted { background: var(--success-light); color: var(--success); }
.status-pending { background: var(--warning-light); color: var(--warning); }

.hc-stats { display: flex; align-items: center; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.hc-stats strong { color: var(--text-main); }
.hc-actions { display: flex; gap: 12px; }
.hc-actions button { flex: 1; }

/* ========================================================
   9. VIEW 4: MY COACHING
   ======================================================== */
.join-group-card { background: var(--primary-light); padding: var(--spacing-lg); border-radius: var(--radius-lg); border: 1px solid #c7d2fe; margin-bottom: var(--spacing-lg); }
.join-group-card h3 { color: var(--primary-hover); margin-bottom: 4px; }
.join-group-card p { color: #4338ca; font-size: 0.9rem; margin-bottom: 16px; }
.join-input-group { display: flex; gap: 8px; }
.join-input-group input { flex-grow: 1; text-transform: uppercase; letter-spacing: 1px; font-weight: bold; border-color: #a5b4fc; }

.coaching-list { display: flex; flex-direction: column; gap: var(--spacing-md); }
.coaching-card { background: white; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: var(--spacing-md); box-shadow: var(--shadow-sm); }
.cc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cc-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-color); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.cc-header h4 { font-size: 1.1rem; margin-bottom: 2px; }
.cc-meta { font-size: 0.8rem; color: var(--text-muted); }
.cc-stats { display: flex; justify-content: space-between; background: var(--bg-main); padding: 12px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.cc-stats strong { color: var(--primary-color); font-size: 1.1rem; }

/* --- CSS PART 1 ENDS HERE. ASK FOR CSS PART 2 FOR THE REST --- */
/* ========================================================
   10. VIEW 5: UPLOAD & CONFIGURATOR FORM
   ======================================================== */
.header-with-back { display: flex; align-items: flex-start; gap: var(--spacing-sm); }
.header-with-back h2 { margin-bottom: 2px; }

.config-form { display: flex; flex-direction: column; gap: var(--spacing-md); padding-bottom: 90px; }

.form-card {
    background: var(--bg-card); border-radius: var(--radius-md);
    padding: var(--spacing-md); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
}
.highlight-card { border: 2px solid var(--primary-light); background: #f8fafc; }

.card-header { display: flex; align-items: center; gap: 8px; margin-bottom: var(--spacing-md); }
.step-badge {
    background: var(--primary-color); color: white; width: 26px; height: 26px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; font-weight: bold;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color); border-radius: var(--radius-md);
    padding: var(--spacing-lg) var(--spacing-md); text-align: center;
    background: var(--bg-main); transition: all 0.3s ease; margin-bottom: 12px;
}
.drop-zone.drag-over { border-color: var(--primary-color); background: var(--primary-light); }
.upload-icon { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.primary-text { font-weight: 700; margin-bottom: 4px; color: var(--text-main); font-size: 1.05rem; }
.secondary-text { font-size: 0.85rem; margin-bottom: var(--spacing-md); }
.upload-actions { display: flex; gap: var(--spacing-sm); justify-content: center; margin-top: var(--spacing-md); }
.upload-actions button { flex: 1; }

/* File Preview Grid */
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; margin-bottom: 8px; }
.preview-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.btn-remove-file {
    position: absolute; top: 4px; right: 4px; background: rgba(239, 68, 68, 0.9); color: white;
    width: 24px; min-height: 24px; font-size: 0.7rem; border-radius: 50%; padding: 0; box-shadow: var(--shadow-sm);
}

/* Form Elements */
.form-group { margin-bottom: var(--spacing-md); }
.form-row { display: flex; gap: var(--spacing-md); }
.half-width { flex: 1; }
label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; color: var(--text-main); }
.form-control {
    width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px;
    font-family: inherit; font-size: 1rem; background: var(--bg-card); color: var(--text-main);
    appearance: none; 
}
.form-control:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }
select.form-control { background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 12px top 50%; background-size: 12px auto; padding-right: 32px; }

/* Custom Slider */
.slider-container { background: var(--bg-main); padding: 14px; border-radius: 8px; border: 1px solid var(--border-color); }
.label-with-value { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.range-value { font-weight: 800; color: var(--primary-color); font-size: 1.15rem; background: var(--primary-light); padding: 2px 10px; border-radius: 6px; }
.styled-slider { width: 100%; appearance: none; height: 6px; background: #cbd5e1; border-radius: 4px; outline: none; }
.styled-slider::-webkit-slider-thumb {
    appearance: none; width: 26px; height: 26px; border-radius: 50%;
    background: var(--primary-color); cursor: pointer; border: 3px solid white; box-shadow: var(--shadow-sm);
}

/* Custom Toggle Switch (Strict Mode) */
.toggle-group { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.toggle-text { flex: 1; }
.toggle-text label { margin-bottom: 4px; font-size: 1rem; color: var(--primary-hover); }
.hint-text { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex-shrink: 0; margin-top: 4px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider.round {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1; transition: .4s; border-radius: 34px;
}
.slider.round:before {
    position: absolute; content: ""; height: 22px; width: 22px; left: 4px; bottom: 4px;
    background-color: white; transition: .4s; border-radius: 50%; box-shadow: var(--shadow-sm);
}
input:checked + .slider.round { background-color: var(--primary-color); }
input:checked + .slider.round:before { transform: translateX(22px); }

/* Submit Area Sticky Footer */
.form-submit-area {
    position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
    padding: var(--spacing-md); box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
    z-index: 20; max-width: 480px; margin: 0 auto; border-top: 1px solid var(--border-color);
}
.cost-indicator { text-align: center; font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; color: var(--text-muted); }
.cost-value { color: var(--warning); font-size: 1.1rem; font-weight: 800; background: var(--warning-light); padding: 2px 8px; border-radius: 4px; margin-left: 4px;}
.loader {
    border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top: 3px solid white;
    width: 22px; height: 22px; animation: spin 1s linear infinite; display: inline-block;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ========================================================
   11. VIEW 6: LIVE QUIZ / EXAM UI
   ======================================================== */
#view-live-quiz { background: var(--bg-card); height: 100vh; display: flex; flex-direction: column; }

.quiz-header { padding: var(--spacing-md); border-bottom: 1px solid var(--border-color); background: white; position: sticky; top: 0; z-index: 20; }
.quiz-progress-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
#quiz-title-display { font-weight: 700; font-size: 1.05rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 65%; }
.timer-badge { background: var(--error-light); color: var(--error); font-weight: 700; padding: 6px 12px; border-radius: 8px; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }

.progress-bar-bg { width: 100%; height: 8px; background: var(--border-color); border-radius: 4px; margin-bottom: 8px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary-color); transition: width 0.3s ease; border-radius: 4px; }
.question-tracker { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; text-align: right; }

.quiz-body { flex-grow: 1; padding: var(--spacing-lg) var(--spacing-md); overflow-y: auto; padding-bottom: 120px; }
.question-container { margin-bottom: var(--spacing-lg); }
#question-text { font-size: 1.2rem; line-height: 1.6; font-weight: 600; color: #1e293b; }

/* Options Layout (Radio button trick for large tap areas) */
.options-container { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.option-label { cursor: pointer; display: block; -webkit-tap-highlight-color: transparent; }
.option-label input[type="radio"] { display: none; }
.option-box {
    display: flex; align-items: center; padding: 16px; border: 2px solid var(--border-color);
    border-radius: var(--radius-md); background: white; transition: all 0.2s ease; gap: 14px;
}
.option-letter {
    width: 36px; height: 36px; border-radius: 50%; background: var(--bg-main); border: 1px solid #cbd5e1;
    display: flex; align-items: center; justify-content: center; font-weight: bold;
    color: var(--text-muted); flex-shrink: 0; transition: all 0.2s; font-size: 1.1rem;
}
.option-text { font-size: 1.05rem; line-height: 1.5; color: var(--text-main); flex-grow: 1; }

.option-label input[type="radio"]:checked + .option-box { border-color: var(--primary-color); background: var(--primary-light); }
.option-label input[type="radio"]:checked + .option-box .option-letter { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* Review Mode Specifics */
.option-box.correct-option { border-color: var(--success); background: var(--success-light); }
.option-box.correct-option .option-letter { background: var(--success); color: white; border-color: var(--success); }
.option-box.wrong-option { border-color: var(--error); background: var(--error-light); }
.option-box.wrong-option .option-letter { background: var(--error); color: white; border-color: var(--error); }

.review-action-container { display: flex; justify-content: flex-end; margin-bottom: 24px; }
.btn-bookmark { font-size: 0.95rem; font-weight: 600; color: #64748b; background: #f1f5f9; padding: 8px 16px; border-radius: 8px; }
.btn-bookmark.flagged { color: #f59e0b; background: #fef3c7; border: 1px solid #fde68a; }

.ai-explanation { background: #f8fafc; border: 1px solid #e2e8f0; border-left: 4px solid var(--primary-color); border-radius: 8px; padding: 16px; margin-top: 8px; }
.ai-explanation h4 { color: var(--primary-color); font-size: 1rem; margin-bottom: 8px; }
.ai-explanation p { color: var(--text-main); font-size: 0.95rem; line-height: 1.5; }

/* Quiz Footer (Single Action Next/Submit) */
.single-action-footer {
    position: fixed; bottom: 0; left: 0; right: 0; background: white;
    padding: 16px var(--spacing-md);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05); max-width: 480px; margin: 0 auto; z-index: 20; border-top: 1px solid var(--border-color);
}

/* ========================================================
   12. VIEW 7: REPORT & SCORECARD
   ======================================================== */
.report-scroll-area { padding: var(--spacing-md); padding-bottom: 100px; overflow-y: auto; }

.score-card-hero {
    background: white; border-radius: var(--radius-lg); padding: var(--spacing-lg) var(--spacing-md);
    box-shadow: var(--shadow-sm); text-align: center; margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-color);
}
.score-circle { position: relative; width: 150px; height: 150px; margin: 0 auto 16px; }
.circular-chart { display: block; margin: 0 auto; max-width: 100%; max-height: 250px; }
.circle-bg { fill: none; stroke: var(--bg-main); stroke-width: 3; }
.circle-fill { fill: none; stroke: var(--primary-color); stroke-width: 3.5; stroke-linecap: round; transition: stroke-dasharray 1s ease-out; }
.score-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; }
.score-big { font-size: 3rem; font-weight: 800; color: var(--text-main); line-height: 1; }
.score-total { font-size: 1.1rem; color: var(--text-muted); font-weight: 600; margin-top: 4px; }
.score-verdict h3 { font-size: 1.4rem; color: var(--primary-color); margin-bottom: 4px; }

.stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: var(--spacing-lg); }
.stat-box { padding: 16px; border-radius: var(--radius-md); display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid transparent; }
.success-bg { background: var(--success-light); border-color: #a7f3d0; }
.error-bg { background: var(--error-light); border-color: #fecaca; }
.warning-bg { background: var(--warning-light); border-color: #fde68a; }
.neutral-bg { background: var(--bg-main); border-color: var(--border-color); }
.stat-icon { font-size: 1.4rem; margin-bottom: 6px; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--text-main); line-height: 1; }
.stat-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-top: 4px; }

.report-action-footer {
    position: fixed; bottom: 0; left: 0; right: 0; background: white;
    padding: 16px var(--spacing-md); display: flex; gap: 12px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.08); max-width: 480px; margin: 0 auto; z-index: 10; border-top: 1px solid var(--border-color);
}

/* ========================================================
   13. VIEW 8: STORE / BUY CREDITS
   ======================================================== */
.store-container { padding: 0 0 var(--spacing-lg) 0; }
.wallet-status-box { background: var(--text-main); color: white; padding: 20px; border-radius: var(--radius-lg); display: flex; align-items: center; gap: 16px; margin-bottom: 24px; box-shadow: var(--shadow-md); }
.coin-icon.large { font-size: 2.5rem; background: rgba(255,255,255,0.1); padding: 12px; border-radius: 50%; }
.wallet-text h4 { font-size: 0.9rem; color: #94a3b8; font-weight: 500; margin-bottom: 4px; }
.wallet-text p { font-size: 1.6rem; color: white; font-weight: 800; }
.wallet-text strong { color: var(--warning); }

.pricing-plans { display: flex; flex-direction: column; gap: var(--spacing-md); margin-bottom: 24px; }
.plan-card { background: white; border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--spacing-lg); position: relative; box-shadow: var(--shadow-sm); }
.popular-plan { border: 2px solid var(--primary-color); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15); }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary-color); color: white; font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 12px; text-transform: uppercase; letter-spacing: 1px; }
.plan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.plan-header h3 { font-size: 1.25rem; color: var(--text-main); }
.plan-price { font-size: 1.8rem; font-weight: 800; color: var(--text-main); }
.plan-features { list-style: none; margin-bottom: 20px; }
.plan-features li { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

.checkout-form { background: white; border-radius: var(--radius-lg); padding: var(--spacing-lg); border: 1px solid var(--border-color); box-shadow: var(--shadow-md); margin-bottom: 40px; animation: fadeIn 0.4s ease; }
.legal-checkbox-group { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px; background: #f8fafc; padding: 12px; border-radius: 8px; border: 1px solid #e2e8f0; }
.legal-checkbox-group input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary-color); }
.terms-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; line-height: 1.5; margin: 0; }
.terms-label a { color: var(--primary-color); text-decoration: underline; }
.secure-badge { text-align: center; font-size: 0.8rem; color: var(--success); font-weight: 600; margin-top: 12px; }
