:root{--red: #d52b1e;--red-dark: #b02218;--red-light: #f5e6e5;--white: #ffffff;--black: #111111;--gray-50: #f9fafb;--gray-100: #f3f4f6;--gray-200: #e5e7eb;--gray-400: #9ca3af;--gray-600: #4b5563;--gray-800: #1f2937;--green: #16a34a;--green-light: #dcfce7;--orange: #ea580c;--orange-light: #ffedd5;--radius: 8px;--radius-lg: 16px;--shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);--shadow-md: 0 4px 6px rgba(0, 0, 0, .07), 0 2px 4px rgba(0, 0, 0, .06);--shadow-lg: 0 10px 15px rgba(0, 0, 0, .1), 0 4px 6px rgba(0, 0, 0, .05)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html{font-size:16px}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,sans-serif;background:var(--gray-50);color:var(--gray-800);line-height:1.6}button{cursor:pointer;font:inherit;border:none;background:none}a{color:inherit;text-decoration:none}img{max-width:100%}.app-wrapper{display:flex;flex-direction:column;min-height:100vh}.header{background:var(--red);color:var(--white);box-shadow:var(--shadow-md);position:sticky;top:0;z-index:100}.header-inner{max-width:1200px;margin:0 auto;padding:0 1rem;height:60px;display:flex;align-items:center;gap:1rem}.logo-btn{font-size:1.2rem;font-weight:700;color:var(--white);display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:.25rem;white-space:nowrap}.logo-btn:hover{opacity:.9}.nav{display:flex;align-items:center;gap:.25rem;margin-left:auto}.nav-link{color:#ffffffd9;padding:.4rem .7rem;border-radius:var(--radius);font-size:.9rem;transition:background .15s}.nav-link:hover,.nav-link.active{background:#fff3;color:var(--white)}.hamburger{display:none;color:var(--white);font-size:1.4rem;padding:.4rem;margin-left:auto}.main-content{flex:1}.footer{background:var(--gray-800);color:var(--gray-400);text-align:center;padding:1.5rem;font-size:.85rem}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.5rem 1.2rem;border-radius:var(--radius);font-weight:600;font-size:.9rem;transition:all .15s;white-space:nowrap}.btn-primary{background:var(--red);color:var(--white)}.btn-primary:hover{background:var(--red-dark)}.btn-secondary{background:var(--gray-200);color:var(--gray-800)}.btn-secondary:hover{background:var(--gray-400)}.btn-danger{background:#dc2626;color:var(--white)}.btn-danger:hover{background:#b91c1c}.btn-outline{background:none;border:2px solid var(--gray-200);color:var(--gray-600)}.btn-outline:hover{border-color:var(--red);color:var(--red)}.btn-outline-small{background:none;border:1.5px solid var(--gray-200);color:var(--gray-600);padding:.25rem .7rem;border-radius:var(--radius);font-size:.8rem}.btn-outline-small:hover{border-color:var(--red);color:var(--red)}.btn-lg{padding:.75rem 2rem;font-size:1rem}.btn-sm{padding:.25rem .7rem;font-size:.8rem;border-radius:6px}.btn-correct-mark{background:var(--green);color:var(--white)}.btn-correct-mark:hover,.btn-correct-mark.active{background:#15803d;box-shadow:0 0 0 3px var(--green-light)}.btn-wrong-mark{background:#dc2626;color:var(--white)}.btn-wrong-mark:hover,.btn-wrong-mark.active{background:#b91c1c;box-shadow:0 0 0 3px #fecaca}.btn-shuffle{background:var(--gray-200);color:var(--gray-800);padding:.5rem .9rem;border-radius:var(--radius)}.btn-shuffle:hover{background:var(--gray-400)}.btn:disabled{opacity:.5;cursor:not-allowed}.page{max-width:900px;margin:0 auto;padding:2rem 1rem 4rem}.page-header{margin-bottom:1.5rem}.page-header h1{font-size:1.8rem;margin-bottom:.25rem}.page-subtitle{color:var(--gray-600);font-size:1rem}.home-page{max-width:1100px}.hero{text-align:center;padding:3rem 1rem 2.5rem;background:linear-gradient(135deg,var(--white) 0%,#fff5f5 100%);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);margin-bottom:2rem}.hero-flag{display:flex;justify-content:center;align-items:center;gap:0;margin-bottom:1rem;width:120px;height:66px;margin:0 auto 1.2rem;border:2px solid var(--gray-200);border-radius:4px;overflow:hidden}.flag-red{flex:1;background:var(--red);height:100%}.flag-white{flex:2;background:var(--white);height:100%;display:flex;align-items:center;justify-content:center}.flag-maple{font-size:2rem;line-height:1}.hero-title{font-size:2.2rem;font-weight:800;color:var(--red);margin-bottom:.75rem}.hero-subtitle{font-size:1.05rem;color:var(--gray-600);max-width:580px;margin:0 auto 1.75rem}.hero-actions{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;margin-bottom:2rem}.info-card{background:var(--white);border-radius:var(--radius);padding:1.25rem;box-shadow:var(--shadow);text-align:center}.info-card h3{font-size:1rem;margin:.5rem 0 .25rem}.info-card p{font-size:.85rem;color:var(--gray-600)}.info-icon{font-size:1.8rem}.stats-bar{display:flex;align-items:center;gap:2rem;background:var(--white);border-radius:var(--radius);padding:1.25rem 1.5rem;box-shadow:var(--shadow);margin-bottom:2rem;flex-wrap:wrap}.stat{text-align:center}.stat-num{display:block;font-size:1.8rem;font-weight:800;color:var(--red)}.stat-label{font-size:.8rem;color:var(--gray-600)}.topics-section h2{font-size:1.4rem;margin-bottom:1rem}.topics-grid{display:flex;flex-wrap:wrap;gap:.5rem}.topic-tag{background:var(--red-light);color:var(--red);border-radius:999px;padding:.3rem .85rem;font-size:.85rem;font-weight:600}.progress-summary{display:flex;align-items:center;gap:.5rem;font-size:.9rem;margin-top:.25rem}.dot{color:var(--gray-400)}.text-green{color:var(--green);font-weight:600}.text-red{color:var(--red);font-weight:600}.test-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:.75rem}.test-card{background:var(--white);border-radius:var(--radius);padding:1rem .75rem;box-shadow:var(--shadow);text-align:center;display:flex;flex-direction:column;align-items:center;gap:.4rem;transition:box-shadow .15s,transform .1s;border:2px solid transparent;cursor:pointer}.test-card:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}.test-number{font-weight:700;font-size:.95rem}.test-card.status-passed{border-color:var(--green)}.test-card.status-failed{border-color:var(--red)}.test-card.status-in-progress{border-color:var(--orange)}.test-status{font-size:.75rem;font-weight:600;border-radius:999px;padding:.2rem .5rem}.status-not-started .test-status{background:var(--gray-100);color:var(--gray-600)}.status-passed .test-status{background:var(--green-light);color:var(--green)}.status-failed .test-status{background:var(--red-light);color:var(--red)}.status-in-progress .test-status{background:var(--orange-light);color:var(--orange)}.retry-btn{font-size:.75rem;color:var(--gray-400);background:none;border:none;cursor:pointer}.retry-btn:hover{color:var(--red)}.quiz-page{max-width:760px}.quiz-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem;gap:1rem}.quiz-title{font-size:1.2rem;font-weight:700;color:var(--red)}.quiz-timer{font-size:.95rem;font-weight:600;color:var(--gray-600);background:var(--gray-100);padding:.3rem .75rem;border-radius:999px}.timer-warning{color:var(--red);background:var(--red-light);animation:pulse 1s infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.6}}.quiz-qcount{font-size:.9rem;color:var(--gray-600)}.progress-bar-wrap{background:var(--gray-200);border-radius:999px;height:6px;overflow:hidden;margin-bottom:1rem}.progress-bar-fill{background:var(--red);height:100%;border-radius:999px;transition:width .3s}.progress-bar-lg{height:10px}.q-dots{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:1.25rem}.q-dot{width:22px;height:22px;border-radius:50%;background:var(--gray-200);border:none;cursor:pointer;transition:all .1s;font-size:.7rem}.q-dot-current{background:var(--red);transform:scale(1.2)}.q-dot-correct{background:var(--green)}.q-dot-wrong{background:#dc2626}.question-card{background:var(--white);border-radius:var(--radius-lg);padding:1.75rem;box-shadow:var(--shadow-md);margin-bottom:1.25rem}.question-meta{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.question-category{font-size:.8rem;color:var(--gray-600);background:var(--gray-100);padding:.2rem .6rem;border-radius:999px}.question-num{font-size:.8rem;color:var(--gray-400)}.question-text{font-size:1.1rem;font-weight:600;margin-bottom:1.25rem;line-height:1.5}.options-list{display:flex;flex-direction:column;gap:.65rem}.option-btn{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-radius:var(--radius);border:2px solid var(--gray-200);background:var(--white);text-align:left;transition:all .15s;cursor:pointer}.option-btn:not(:disabled):hover{border-color:var(--red);background:var(--red-light)}.option-correct{border-color:var(--green)!important;background:var(--green-light)!important;color:var(--green);font-weight:600}.option-wrong{border-color:#dc2626!important;background:#fef2f2!important;color:#dc2626;font-weight:600}.option-disabled{opacity:.6}.option-letter{font-weight:700;font-size:.85rem;width:24px;height:24px;border-radius:50%;background:var(--gray-200);display:flex;align-items:center;justify-content:center;flex-shrink:0}.option-correct .option-letter{background:var(--green);color:var(--white)}.option-wrong .option-letter{background:#dc2626;color:var(--white)}.option-text{flex:1}.option-icon{font-size:1.1rem}.feedback-box{margin-top:1rem;padding:1rem;border-radius:var(--radius);font-size:.9rem}.feedback-correct{background:var(--green-light);border-left:4px solid var(--green);color:#166534}.feedback-wrong{background:#fef2f2;border-left:4px solid #dc2626;color:#991b1b}.feedback-box strong{display:block;margin-bottom:.3rem}.feedback-source{margin-top:.65rem;padding:.6rem .75rem;background:#0000000d;border-radius:6px;font-size:.82rem;display:flex;flex-wrap:wrap;align-items:flex-start;gap:.35rem;line-height:1.5}.source-icon{flex-shrink:0}.source-text{white-space:pre-line;font-style:italic;color:inherit;opacity:.85;flex:1}.source-page{flex-basis:100%;font-weight:600;font-size:.78rem;opacity:.75;padding-left:1.2rem}.quiz-nav{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}.results-page{max-width:760px}.score-card{text-align:center;padding:2.5rem 2rem;border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);margin-bottom:1.5rem}.score-passed{background:linear-gradient(135deg,#dcfce7,#bbf7d0)}.score-failed{background:linear-gradient(135deg,#fef2f2,#fecaca)}.score-icon{font-size:3rem;margin-bottom:.5rem}.score-result{font-size:2rem;font-weight:800;margin-bottom:.75rem}.score-passed .score-result{color:var(--green)}.score-failed .score-result{color:#dc2626}.score-numbers{display:flex;align-items:baseline;justify-content:center;gap:.2rem;margin-bottom:.25rem}.score-big{font-size:4rem;font-weight:900;line-height:1}.score-passed .score-big{color:var(--green)}.score-failed .score-big{color:#dc2626}.score-denom{font-size:1.5rem;color:var(--gray-600)}.score-pct{font-size:1.3rem;font-weight:700;color:var(--gray-600);margin-bottom:.75rem}.score-message{font-size:.95rem;color:var(--gray-600);max-width:480px;margin:0 auto .5rem}.score-date{font-size:.8rem;color:var(--gray-400)}.results-actions{display:flex;gap:.75rem;flex-wrap:wrap;margin-bottom:2rem}.answer-review h2{font-size:1.3rem;margin-bottom:1rem}.review-item{background:var(--white);border-radius:var(--radius);padding:1.25rem;margin-bottom:.75rem;box-shadow:var(--shadow);border-left:4px solid transparent}.review-correct{border-left-color:var(--green)}.review-wrong{border-left-color:#dc2626}.review-header{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem;flex-wrap:wrap}.review-num{font-weight:700;font-size:.9rem}.review-cat{font-size:.78rem;color:var(--gray-600);background:var(--gray-100);padding:.15rem .5rem;border-radius:999px}.review-badge{font-size:.78rem;font-weight:700;padding:.15rem .5rem;border-radius:999px;margin-left:auto}.badge-correct{background:var(--green-light);color:var(--green)}.badge-wrong{background:#fef2f2;color:#dc2626}.review-question{font-weight:600;margin-bottom:.65rem}.review-options{display:flex;flex-direction:column;gap:.35rem;margin-bottom:.5rem}.review-option{display:flex;align-items:center;gap:.5rem;font-size:.88rem;padding:.4rem .6rem;border-radius:6px}.review-option-correct{background:var(--green-light);color:#166534;font-weight:600}.review-option-wrong{background:#fef2f2;color:#991b1b;text-decoration:line-through}.review-tick{color:var(--green);font-weight:700}.review-cross{color:#dc2626;font-weight:700}.review-explanation{font-size:.85rem;color:var(--gray-600);background:var(--gray-50);padding:.6rem .75rem;border-radius:var(--radius)}.flashcards-page{max-width:700px}.fc-stats{display:flex;align-items:center;gap:2rem;background:var(--white);border-radius:var(--radius);padding:1rem 1.5rem;box-shadow:var(--shadow);margin-bottom:1.25rem;flex-wrap:wrap}.fc-stat{text-align:center}.fc-stat-num{display:block;font-size:1.5rem;font-weight:800}.fc-stat-label{font-size:.75rem;color:var(--gray-600)}.confirm-dialog{background:var(--white);border:2px solid #dc2626;border-radius:var(--radius);padding:1rem;display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-bottom:1rem}.confirm-inline{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.fc-filter{display:flex;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}.filter-btn{padding:.35rem .9rem;border-radius:999px;font-size:.85rem;font-weight:600;border:2px solid var(--gray-200);color:var(--gray-600);background:var(--white);transition:all .15s}.filter-btn:hover{border-color:var(--red);color:var(--red)}.filter-active{border-color:var(--red)!important;background:var(--red)!important;color:var(--white)!important}.fc-progress-label{text-align:center;font-size:.85rem;color:var(--gray-600);margin-bottom:.35rem}.fc-empty{text-align:center;padding:3rem;color:var(--gray-600)}.flashcard{width:100%;height:280px;perspective:1000px;cursor:pointer;margin:1rem 0}.fc-front,.fc-back{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--white);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);padding:2rem;display:flex;flex-direction:column;justify-content:center;backface-visibility:hidden;transition:transform .5s}.fc-front{transform:rotateY(0)}.fc-back{transform:rotateY(180deg);background:#fffbeb}.flashcard{position:relative;transform-style:preserve-3d;transition:transform .5s}.flashcard.flipped{transform:rotateY(180deg)}.fc-category{font-size:.78rem;color:var(--gray-400);text-transform:uppercase;letter-spacing:.05em;margin-bottom:.5rem}.fc-question{font-size:1.1rem;font-weight:600;line-height:1.5}.fc-hint{font-size:.8rem;color:var(--gray-400);margin-top:auto;text-align:center}.fc-answer{font-size:1.05rem;font-weight:600;color:var(--green);margin-bottom:.75rem}.fc-explanation{font-size:.9rem;color:var(--gray-600)}.fc-mark-btns{display:flex;align-items:center;justify-content:center;gap:1rem;margin-bottom:1rem}.fc-nav{display:flex;justify-content:center;gap:1rem}.progress-page{max-width:900px}.progress-stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.75rem;margin-bottom:1.5rem}.progress-stat-card{background:var(--white);border-radius:var(--radius);padding:1rem;box-shadow:var(--shadow);text-align:center;border-top:3px solid var(--gray-200)}.stat-passed{border-top-color:var(--green)}.stat-failed{border-top-color:var(--red)}.ps-num{font-size:1.7rem;font-weight:800;line-height:1}.ps-denom{font-size:1rem;font-weight:400;color:var(--gray-400)}.ps-label{font-size:.78rem;color:var(--gray-600);margin-top:.25rem}.overall-progress{background:var(--white);border-radius:var(--radius);padding:1.25rem;box-shadow:var(--shadow);margin-bottom:1.5rem}.op-label{font-size:.9rem;font-weight:600;margin-bottom:.5rem}.progress-list-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;flex-wrap:wrap;gap:.75rem}.progress-list-header h2{font-size:1.3rem}.progress-test-list{display:flex;flex-direction:column;gap:.5rem}.pt-row{display:grid;grid-template-columns:80px 1fr 50px 70px 80px;align-items:center;gap:.75rem;background:var(--white);border-radius:var(--radius);padding:.75rem 1rem;box-shadow:var(--shadow)}.pt-name{font-weight:600;font-size:.9rem}.pt-bar-wrap{background:var(--gray-100);border-radius:999px;height:8px;overflow:hidden}.pt-bar-fill{height:100%;border-radius:999px;transition:width .3s}.bar-passed{background:var(--green)}.bar-failed{background:var(--red)}.bar-empty{background:var(--gray-200)}.pt-score{font-size:.85rem;font-weight:600;text-align:center}.pt-badge{font-size:.75rem;font-weight:700;padding:.2rem .5rem;border-radius:999px;text-align:center}.badge-passed{background:var(--green-light);color:var(--green)}.badge-failed{background:var(--red-light);color:var(--red)}.badge-not-started{background:var(--gray-100);color:var(--gray-600)}@media(max-width:768px){.hamburger{display:flex}.nav{display:none;flex-direction:column;gap:0;position:absolute;top:60px;left:0;right:0;background:var(--red);padding:.5rem;box-shadow:var(--shadow-md);z-index:99}.nav-open{display:flex}.nav-link{padding:.7rem 1rem;border-radius:var(--radius);width:100%}.header{position:relative}.hero-title{font-size:1.6rem}.hero-subtitle{font-size:.95rem}.test-grid{grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}.quiz-nav{justify-content:center}.results-actions,.fc-mark-btns{flex-direction:column}.flashcard{height:340px}.pt-row{grid-template-columns:70px 1fr 45px 60px 72px;font-size:.85rem}.progress-stats-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:480px){.page{padding:1rem .75rem 3rem}.hero{padding:2rem .75rem 1.5rem}.hero-actions{flex-direction:column;align-items:center}.info-grid{grid-template-columns:1fr 1fr}.stats-bar{gap:1rem}.test-grid{grid-template-columns:repeat(auto-fill,minmax(85px,1fr))}.pt-row{grid-template-columns:1fr 1fr;gap:.4rem}.pt-bar-wrap,.pt-score{display:none}.progress-stats-grid{grid-template-columns:repeat(2,1fr)}}
