/* ═══════════════════════════════════════════════════════════════════════════
   LEARNING UI STYLES — Skill Map, Tutorial, Guided Practice
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── SKILL MAP SCREEN ── */
.skillmap-body { max-width: 920px; margin: 0 auto; padding: 24px 20px 40px; }

/* Readiness bar */
.readiness-bar { background: #1a1f2e; border-radius: 12px; padding: 18px 20px; margin-bottom: 24px; }
.readiness-label { font-size: 0.85rem; color: #a0aec0; margin-bottom: 8px; display: flex; justify-content: space-between; }
.readiness-track { height: 10px; background: #2d3748; border-radius: 5px; overflow: hidden; }
.readiness-fill { height: 100%; background: linear-gradient(90deg, #667eea, #48bb78); border-radius: 5px; transition: width 0.5s ease; }

/* Recommendation banner */
.recommend-banner { background: linear-gradient(140deg, #1c2640, #1a1f2e); border: 2px solid #667eea; border-radius: 14px; padding: 20px; margin-bottom: 24px; cursor: pointer; transition: border-color 0.15s, transform 0.1s; }
.recommend-banner:hover { border-color: #8b9cf7; transform: translateY(-1px); }
.recommend-tag { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.4px; color: #667eea; font-weight: 700; margin-bottom: 6px; }
.recommend-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.recommend-desc { color: #a0aec0; font-size: 0.85rem; }
.recommend-btn { display: inline-block; margin-top: 12px; background: #667eea; color: #fff; padding: 8px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; }

/* Skill grid */
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 24px; }
.skill-tile { background: #1a1f2e; border: 2px solid #2d3748; border-radius: 12px; padding: 16px 12px; cursor: pointer; text-align: center; transition: border-color 0.15s, background 0.15s, transform 0.1s; position: relative; }
.skill-tile:hover { border-color: #667eea; background: #1f2637; transform: translateY(-2px); }
.skill-tile.mastered { border-color: #d69e2e; background: linear-gradient(140deg, #2a2520, #1a1f2e); }
.skill-tile.in-progress { border-color: #667eea; }
.skill-tile .skill-icon { font-size: 1.8rem; margin-bottom: 6px; display: block; }
.skill-tile .skill-name { font-size: 0.8rem; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.skill-tile .skill-pos { font-size: 0.65rem; color: #718096; }

/* Mastery ring (SVG-based progress indicator) */
.mastery-ring { width: 36px; height: 36px; margin: 0 auto 6px; position: relative; }
.mastery-ring svg { width: 36px; height: 36px; transform: rotate(-90deg); }
.mastery-ring .ring-bg { fill: none; stroke: #2d3748; stroke-width: 3; }
.mastery-ring .ring-fill { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
.mastery-ring .ring-fill.learning { stroke: #667eea; }
.mastery-ring .ring-fill.practicing { stroke: #ed8936; }
.mastery-ring .ring-fill.mastered { stroke: #d69e2e; }
.mastery-ring .ring-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 0.7rem; }

/* Status badge */
.skill-status { font-size: 0.6rem; padding: 2px 8px; border-radius: 4px; display: inline-block; margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.skill-status.st-new { background: #2d3748; color: #718096; }
.skill-status.st-learning { background: #2b3a5e; color: #8b9cf7; }
.skill-status.st-l1 { background: #2d3a2d; color: #68d391; }
.skill-status.st-l2 { background: #3a3528; color: #ed8936; }
.skill-status.st-l3 { background: #3a2d28; color: #fc8181; }
.skill-status.st-mastered { background: #3a3520; color: #d69e2e; }

/* Quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 20px; }
.qa-btn { background: #2d3748; border: 1px solid #4a5568; border-radius: 10px; padding: 14px 16px; cursor: pointer; color: #fff; text-align: center; transition: border-color 0.15s; font-size: 0.9rem; }
.qa-btn:hover { border-color: #667eea; }

/* Test actions (timed round + position practice) */
.test-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 24px; }
.test-action-card { background: #1a1f2e; border: 1px solid #2d3748; border-radius: 12px; padding: 20px; }
.ta-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.ta-desc { font-size: 0.8rem; color: #a0aec0; margin-bottom: 12px; }
.time-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.time-btn { background: #2d3748; border: 2px solid #4a5568; border-radius: 8px; padding: 10px 6px; color: #fff; cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: border-color 0.15s, background 0.15s; text-align: center; }
.time-btn:hover { border-color: #667eea; background: #363e52; }
.ta-start-btn { background: #667eea; color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-size: 0.9rem; font-weight: 600; cursor: pointer; width: 100%; }
.ta-start-btn:hover { background: #7b8ff0; }

/* Position practice screen */
.pos-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; margin: 16px 0; }
.pos-pip { background: #1a1f2e; border: 2px solid #2d3748; border-radius: 8px; padding: 10px 4px; text-align: center; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: border-color 0.15s; }
.pos-pip.current { border-color: #667eea; background: #1c2640; }
.pos-pip.correct { border-color: #48bb78; background: #1a3a2a; color: #48bb78; }
.pos-pip.wrong { border-color: #fc8181; background: #3a1a1a; color: #fc8181; }
.pos-pip.skipped { border-color: #a0aec0; color: #a0aec0; }
.pos-pip .pos-num { font-size: 1rem; font-weight: 700; }
.pos-pip .pos-topic { font-size: 0.55rem; color: #718096; margin-top: 2px; text-transform: uppercase; }

/* ── TUTORIAL (LEARN) SCREEN ── */
.learn-body { max-width: 700px; margin: 0 auto; padding: 24px 20px 40px; }

.learn-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.learn-back { background: none; border: none; color: #667eea; cursor: pointer; font-size: 1rem; padding: 6px 0; font-weight: 600; }
.learn-title { font-size: 1.3rem; font-weight: 700; flex: 1; }
.learn-step-count { font-size: 0.8rem; color: #a0aec0; }

/* Step progress bar */
.step-progress { display: flex; gap: 4px; margin-bottom: 24px; }
.step-dot { flex: 1; height: 4px; border-radius: 2px; background: #2d3748; }
.step-dot.done { background: #667eea; }
.step-dot.current { background: #8b9cf7; }

/* Tutorial card */
.tutorial-card { background: #1a1f2e; border-radius: 14px; padding: 28px 24px; margin-bottom: 16px; }
.tutorial-card h3 { font-size: 1.1rem; margin-bottom: 12px; color: #e2e8f0; }
.tutorial-card p { color: #a0aec0; font-size: 0.95rem; line-height: 1.6; margin-bottom: 12px; }
.tutorial-card .highlight { color: #667eea; font-weight: 600; }

/* Worked example box */
.example-box { background: #0f1419; border: 1px solid #2d3748; border-radius: 10px; padding: 20px; margin: 16px 0; font-family: 'SF Mono', 'Fira Code', monospace; }
.example-box .ex-problem { font-size: 1.3rem; font-weight: 700; color: #e2e8f0; margin-bottom: 12px; text-align: center; }
.example-box .ex-step { padding: 8px 0; border-bottom: 1px solid #1a1f2e; color: #a0aec0; font-size: 0.9rem; display: flex; align-items: baseline; gap: 10px; }
.example-box .ex-step:last-child { border-bottom: none; }
.example-box .ex-step .step-num { color: #667eea; font-weight: 700; min-width: 28px; }
.example-box .ex-step .step-result { color: #48bb78; font-weight: 700; margin-left: auto; }
.example-box .ex-step.hidden { opacity: 0.15; filter: blur(3px); transition: all 0.3s; }
.example-box .ex-step.revealed { opacity: 1; filter: none; }

/* Key patterns box */
.patterns-box { background: #1c2640; border-left: 3px solid #667eea; border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 16px 0; }
.patterns-box h4 { font-size: 0.85rem; color: #667eea; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.patterns-box li { color: #a0aec0; font-size: 0.9rem; margin-bottom: 4px; padding-left: 4px; }

/* Nav buttons */
.learn-nav { display: flex; gap: 12px; margin-top: 24px; }
.learn-nav button { flex: 1; padding: 14px; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer; border: none; transition: background 0.15s; }
.btn-next { background: #667eea; color: #fff; }
.btn-next:hover { background: #7b8ff0; }
.btn-prev { background: #2d3748; color: #fff; }
.btn-prev:hover { background: #3d4a5e; }

/* Try It section */
.tryit-section { margin-top: 24px; }
.tryit-section h3 { font-size: 1rem; margin-bottom: 16px; }
.tryit-problem { background: #1a1f2e; border-radius: 12px; padding: 20px; margin-bottom: 12px; }
.tryit-q { font-size: 1.2rem; font-weight: 700; text-align: center; margin-bottom: 16px; }
.tryit-input-row { display: flex; gap: 10px; justify-content: center; align-items: center; }
.tryit-input { background: #0f1419; border: 2px solid #2d3748; border-radius: 8px; padding: 10px 14px; color: #fff; font-size: 1.1rem; text-align: center; width: 160px; font-family: inherit; }
.tryit-input:focus { border-color: #667eea; outline: none; }
.tryit-submit { background: #667eea; color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.tryit-hint-btn { background: none; border: 1px solid #4a5568; color: #a0aec0; border-radius: 8px; padding: 8px 14px; font-size: 0.8rem; cursor: pointer; margin-top: 10px; display: block; margin-left: auto; margin-right: auto; }
.tryit-hint { background: #1c2640; border-radius: 8px; padding: 12px; margin-top: 10px; color: #a0aec0; font-size: 0.85rem; text-align: center; }
.tryit-feedback { text-align: center; padding: 10px; border-radius: 8px; margin-top: 10px; font-weight: 600; }
.tryit-feedback.correct { background: #1a3a2a; color: #48bb78; }
.tryit-feedback.wrong { background: #3a1a1a; color: #fc8181; }

/* ── GUIDED PRACTICE SCREEN ── */
.practice-body { max-width: 700px; margin: 0 auto; padding: 24px 20px 40px; }

.practice-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.practice-title { font-size: 1.1rem; font-weight: 700; flex: 1; }
.practice-level-badge { font-size: 0.75rem; padding: 4px 12px; border-radius: 6px; font-weight: 700; text-transform: uppercase; }
.practice-level-badge.lv1 { background: #2d3a2d; color: #68d391; }
.practice-level-badge.lv2 { background: #3a3528; color: #ed8936; }
.practice-level-badge.lv3 { background: #3a2d28; color: #fc8181; }

/* Level progress */
.level-progress { background: #1a1f2e; border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; }
.level-progress-label { font-size: 0.8rem; color: #a0aec0; margin-bottom: 6px; display: flex; justify-content: space-between; }
.level-progress-track { display: flex; gap: 4px; }
.level-pip { flex: 1; height: 6px; border-radius: 3px; background: #2d3748; }
.level-pip.correct { background: #48bb78; }
.level-pip.wrong { background: #fc8181; }

/* Practice problem */
.practice-problem { background: #1a1f2e; border-radius: 14px; padding: 30px 24px; margin-bottom: 16px; text-align: center; }
.practice-q { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; line-height: 1.4; }
.practice-input-row { display: flex; gap: 10px; justify-content: center; align-items: center; max-width: 360px; margin: 0 auto; }
.practice-input { background: #0f1419; border: 2px solid #2d3748; border-radius: 10px; padding: 14px 18px; color: #fff; font-size: 1.3rem; text-align: center; width: 100%; font-family: inherit; }
.practice-input:focus { border-color: #667eea; outline: none; }

.practice-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.practice-actions button { padding: 12px 24px; border-radius: 10px; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; transition: background 0.15s; }
.btn-submit-practice { background: #667eea; color: #fff; }
.btn-submit-practice:hover { background: #7b8ff0; }
.btn-skip-practice { background: #2d3748; color: #a0aec0; }
.btn-show-trick { background: none; border: 1px solid #4a5568; color: #a0aec0; }

/* Practice feedback */
.practice-feedback { border-radius: 12px; padding: 16px 20px; margin-top: 16px; }
.practice-feedback.correct { background: #1a3a2a; border: 1px solid #2d5a3d; }
.practice-feedback.wrong { background: #3a1a1a; border: 1px solid #5a2d2d; }
.practice-feedback h4 { margin-bottom: 8px; }
.practice-feedback.correct h4 { color: #48bb78; }
.practice-feedback.wrong h4 { color: #fc8181; }
.practice-feedback p { color: #a0aec0; font-size: 0.9rem; }
.practice-feedback .solution-steps { margin-top: 10px; }

/* Practice stats bar */
.practice-stats { display: flex; gap: 20px; justify-content: center; padding: 12px; color: #a0aec0; font-size: 0.85rem; }
.practice-stats .stat-item { display: flex; align-items: center; gap: 4px; }

/* Level complete overlay */
.level-complete { background: #1a1f2e; border: 2px solid #48bb78; border-radius: 14px; padding: 30px; text-align: center; margin: 20px 0; }
.level-complete h3 { color: #48bb78; font-size: 1.3rem; margin-bottom: 8px; }
.level-complete p { color: #a0aec0; margin-bottom: 16px; }
.level-complete .btn-next-level { background: #48bb78; color: #0f1419; border: none; border-radius: 10px; padding: 14px 28px; font-size: 1rem; font-weight: 700; cursor: pointer; }

/* Mastery complete */
.mastery-complete { background: linear-gradient(140deg, #2a2520, #1a1f2e); border: 2px solid #d69e2e; border-radius: 14px; padding: 30px; text-align: center; margin: 20px 0; }
.mastery-complete h3 { color: #d69e2e; font-size: 1.5rem; margin-bottom: 8px; }
.mastery-complete .star-burst { font-size: 3rem; margin-bottom: 12px; }

/* Timer for practice */
.practice-timer { font-size: 0.85rem; color: #a0aec0; font-family: 'SF Mono', monospace; }
.practice-timer.warn { color: #ed8936; }

/* ── PROGRESS DASHBOARD ── */
.section-tag { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.4px; color: #667eea; font-weight: 700; margin-bottom: 10px; margin-top: 8px; }

/* Stat cards */
.dash-stat-card { background: #1a1f2e; border: 1px solid #2d3748; border-radius: 12px; padding: 18px 16px; text-align: center; }
.dash-stat-val { font-size: 1.8rem; font-weight: 800; color: #e2e8f0; margin-bottom: 2px; }
.dash-stat-label { font-size: 0.75rem; color: #718096; text-transform: uppercase; letter-spacing: 0.8px; }

/* Weekly activity chart */
.week-chart { display: flex; gap: 6px; align-items: flex-end; background: #1a1f2e; border-radius: 12px; padding: 18px 14px 12px; margin-bottom: 24px; height: 160px; }
.week-day { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.week-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.week-bar { width: 70%; max-width: 36px; background: linear-gradient(180deg, #667eea, #4a5cb8); border-radius: 4px 4px 0 0; min-height: 0; transition: height 0.4s ease; }
.week-label { font-size: 0.7rem; color: #718096; margin-top: 6px; }
.week-count { font-size: 0.65rem; color: #a0aec0; min-height: 14px; }

/* Skill breakdown table */
.skill-table { width: 100%; border-collapse: collapse; background: #1a1f2e; border-radius: 12px; overflow: hidden; margin-bottom: 24px; }
.skill-table thead { background: #151a26; }
.skill-table th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.8px; color: #718096; padding: 12px 10px; text-align: left; font-weight: 600; }
.skill-table td { padding: 10px; font-size: 0.85rem; color: #e2e8f0; border-top: 1px solid #2d3748; }
.skill-table tr:hover { background: #1f2637; }

/* Position practice screen */
.pos-header-stats { display: flex; gap: 16px; justify-content: center; margin-bottom: 12px; font-size: 0.85rem; color: #a0aec0; }
.pos-problem-card { background: #1a1f2e; border-radius: 14px; padding: 28px 24px; margin-bottom: 16px; text-align: center; }
.pos-position-label { font-size: 0.75rem; color: #667eea; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.pos-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin: 16px 0; }
.pos-result-item { background: #1a1f2e; border-radius: 8px; padding: 8px; text-align: center; font-size: 0.8rem; }
.pos-result-item.correct { border: 1px solid #48bb78; color: #48bb78; }
.pos-result-item.wrong { border: 1px solid #fc8181; color: #fc8181; }
.pos-result-item.skipped { border: 1px solid #4a5568; color: #718096; }
