/* ============================================================ */
/* ROUNDS 61-75 — ReviseKit V10 Feature Styles                  */
/* ============================================================ */

/* ============================================================ */
/* ROUND 61: WJEC CONTENT EXPANSION                             */
/* ============================================================ */

.wjec-extra-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 20px;
  font-size: 10px;
  color: #f87171;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ============================================================ */
/* ROUND 62: WRITING DRILLS                                     */
/* ============================================================ */

#screen-writing-drills {
  padding: 0 16px 100px;
}

.wd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 12px;
}

.wd-title-block { flex: 1; }
.wd-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.wd-sub {
  font-size: 13px;
  color: var(--text-muted, #8892a4);
  margin-top: 2px;
}

.wd-progress-bar-track {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin: 0 0 20px;
}
.wd-progress-bar {
  height: 4px;
  background: var(--accent-amber, #ffb800);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.wd-prompt-card {
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255, 184, 0, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.wd-marks-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.3);
  border-radius: 20px;
  font-size: 11px;
  color: var(--accent-amber, #ffb800);
  font-weight: 600;
  margin-bottom: 10px;
}

.wd-subject-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 20px;
  font-size: 11px;
  color: var(--accent-cyan, #00d4ff);
  font-weight: 600;
  margin-bottom: 10px;
  margin-left: 6px;
}

.wd-question-text {
  font-size: 16px;
  color: var(--text-primary, #f0f4ff);
  line-height: 1.6;
  font-weight: 500;
}

.wd-textarea-wrap {
  margin-bottom: 16px;
}

.wd-textarea-label {
  font-size: 12px;
  color: var(--text-muted, #8892a4);
  margin-bottom: 6px;
  display: block;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wd-textarea {
  width: 100%;
  min-height: 140px;
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: var(--text-primary, #f0f4ff);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  padding: 14px;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.wd-textarea:focus {
  outline: none;
  border-color: var(--accent-cyan, #00d4ff);
}

.wd-action-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.wd-submit-btn {
  flex: 1;
  padding: 13px;
  background: var(--accent-amber, #ffb800);
  color: #000;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.wd-submit-btn:hover { opacity: 0.9; }
.wd-submit-btn:active { transform: scale(0.98); }

.wd-skip-btn {
  padding: 13px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text-secondary, #c8d0e0);
  font-size: 14px;
  cursor: pointer;
}

.wd-model-answer-section {
  background: rgba(0, 200, 120, 0.06);
  border: 1px solid rgba(0, 200, 120, 0.2);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}

.wd-ma-title {
  font-size: 12px;
  color: #00c896;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.wd-ma-text {
  font-size: 14px;
  color: var(--text-secondary, #c8d0e0);
  line-height: 1.7;
  white-space: pre-wrap;
}

.wd-mark-scheme {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.wd-ms-title {
  font-size: 11px;
  color: var(--accent-cyan, #00d4ff);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.wd-ms-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 13px;
  color: var(--text-secondary, #c8d0e0);
}
.wd-ms-item::before {
  content: '✓';
  color: #00c896;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.wd-self-assess {
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}

.wd-sa-title {
  font-size: 14px;
  color: var(--text-primary, #f0f4ff);
  font-weight: 600;
  margin-bottom: 12px;
}

.wd-sa-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.wd-sa-btn {
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary, #c8d0e0);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.wd-sa-btn.missed { border-color: rgba(239,68,68,0.4); }
.wd-sa-btn.partial { border-color: rgba(255,184,0,0.4); }
.wd-sa-btn.nailed { border-color: rgba(0,200,120,0.4); }
.wd-sa-btn.missed:hover { background: rgba(239,68,68,0.12); }
.wd-sa-btn.partial:hover { background: rgba(255,184,0,0.12); }
.wd-sa-btn.nailed:hover { background: rgba(0,200,120,0.12); }

.wd-end-screen {
  text-align: center;
  padding: 40px 0;
}
.wd-end-icon { font-size: 52px; margin-bottom: 12px; }
.wd-end-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  margin-bottom: 8px;
}
.wd-end-sub {
  font-size: 14px;
  color: var(--text-muted, #8892a4);
  margin-bottom: 24px;
}
.wd-end-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 28px;
}
.wd-end-stat {
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 80px;
}
.wd-end-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-cyan, #00d4ff);
}
.wd-end-label {
  font-size: 11px;
  color: var(--text-muted, #8892a4);
  margin-top: 2px;
}

/* ============================================================ */
/* ROUND 63: EXAM TIPS                                          */
/* ============================================================ */

#screen-exam-tips {
  padding: 0 16px 100px;
}

.et-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 20px;
}
.et-title-block { flex: 1; }
.et-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.et-sub {
  font-size: 13px;
  color: var(--text-muted, #8892a4);
  margin-top: 2px;
}

.et-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.et-filter-row::-webkit-scrollbar { display: none; }

.et-filter-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--text-secondary, #c8d0e0);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.et-filter-btn.active {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--accent-cyan, #00d4ff);
  font-weight: 600;
}

.et-command-card {
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.et-command-card.expanded {
  border-color: rgba(0, 212, 255, 0.3);
}

.et-command-header {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  user-select: none;
}

.et-command-word {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  flex: 1;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.et-command-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 10px;
}
.et-badge-describe { background: rgba(0,200,120,0.12); color: #00c896; border: 1px solid rgba(0,200,120,0.25); }
.et-badge-explain { background: rgba(0,212,255,0.12); color: var(--accent-cyan, #00d4ff); border: 1px solid rgba(0,212,255,0.25); }
.et-badge-evaluate { background: rgba(255,184,0,0.12); color: var(--accent-amber, #ffb800); border: 1px solid rgba(255,184,0,0.25); }
.et-badge-calculate { background: rgba(139,92,246,0.12); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }
.et-badge-compare { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.et-badge-suggest { background: rgba(251,146,60,0.12); color: #fb923c; border: 1px solid rgba(251,146,60,0.25); }

.et-chevron {
  color: var(--text-muted, #8892a4);
  transition: transform 0.25s;
}
.et-command-card.expanded .et-chevron { transform: rotate(90deg); }

.et-command-body {
  display: none;
  padding: 0 18px 18px;
}
.et-command-card.expanded .et-command-body { display: block; }

.et-section {
  margin-bottom: 14px;
}
.et-section-label {
  font-size: 11px;
  color: var(--text-muted, #8892a4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.et-section-text {
  font-size: 14px;
  color: var(--text-secondary, #c8d0e0);
  line-height: 1.65;
}

.et-mistakes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.et-mistakes-list li {
  font-size: 13px;
  color: #f87171;
  padding: 3px 0 3px 16px;
  position: relative;
}
.et-mistakes-list li::before {
  content: '✗';
  position: absolute;
  left: 0;
  font-weight: 700;
}

.et-example-box {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}
.et-example-q {
  font-size: 13px;
  color: var(--accent-cyan, #00d4ff);
  font-weight: 600;
  margin-bottom: 6px;
}
.et-example-a {
  font-size: 13px;
  color: var(--text-secondary, #c8d0e0);
  line-height: 1.6;
}

.et-marks-breakdown {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.et-mark-pill {
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary, #c8d0e0);
}
.et-mark-pill strong { color: var(--accent-amber, #ffb800); }

/* ============================================================ */
/* ROUND 64: AUDIO PRONUNCIATION                                */
/* ============================================================ */

.pronounce-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 8px;
  color: var(--accent-cyan, #00d4ff);
  cursor: pointer;
  font-size: 15px;
  vertical-align: middle;
  margin-left: 6px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.pronounce-btn:hover {
  background: rgba(0, 212, 255, 0.2);
}
.pronounce-btn.speaking {
  background: rgba(0, 212, 255, 0.25);
  animation: pronouncePulse 0.8s ease infinite alternate;
}
@keyframes pronouncePulse {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

.card-answer-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

/* ============================================================ */
/* ROUND 65: MISTAKE PATTERNS                                   */
/* ============================================================ */

#screen-mistake-patterns {
  padding: 0 16px 100px;
}

.mp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 20px;
}
.mp-title-block { flex: 1; }
.mp-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.mp-sub {
  font-size: 13px;
  color: var(--text-muted, #8892a4);
  margin-top: 2px;
}

.mp-section {
  margin-bottom: 24px;
}
.mp-section-title {
  font-size: 13px;
  color: var(--text-muted, #8892a4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.mp-missed-card {
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mp-missed-rank {
  width: 28px;
  height: 28px;
  background: rgba(239,68,68,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #f87171;
  flex-shrink: 0;
}
.mp-missed-info { flex: 1; min-width: 0; }
.mp-missed-question {
  font-size: 14px;
  color: var(--text-primary, #f0f4ff);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-missed-topic {
  font-size: 12px;
  color: var(--text-muted, #8892a4);
  margin-top: 2px;
}
.mp-missed-count {
  font-size: 12px;
  font-weight: 700;
  color: #f87171;
  background: rgba(239,68,68,0.1);
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.mp-topic-row {
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 6px;
}
.mp-topic-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.mp-topic-name {
  font-size: 14px;
  color: var(--text-primary, #f0f4ff);
  font-weight: 500;
}
.mp-topic-accuracy {
  font-size: 13px;
  font-weight: 700;
}
.mp-topic-bar-track {
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.mp-topic-bar {
  height: 5px;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.mp-focus-btn {
  width: 100%;
  padding: 14px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 12px;
  color: #f87171;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.15s;
}
.mp-focus-btn:hover {
  background: rgba(239,68,68,0.18);
}

.mp-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted, #8892a4);
}
.mp-empty-icon { font-size: 40px; margin-bottom: 8px; }
.mp-empty-text { font-size: 15px; }

/* Mistake patterns link in stats */
.stats-mistake-patterns-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 12px;
  color: var(--text-primary, #f0f4ff);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  margin-top: 12px;
}
.stats-mistake-patterns-btn svg { color: #f87171; flex-shrink: 0; }

/* ============================================================ */
/* ROUND 66: CUSTOM QUIZ BUILDER                                */
/* ============================================================ */

#screen-custom-quiz {
  padding: 0 16px 100px;
}

.cq-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 20px;
}
.cq-title-block { flex: 1; }
.cq-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.cq-sub {
  font-size: 13px;
  color: var(--text-muted, #8892a4);
  margin-top: 2px;
}

.cq-step {
  margin-bottom: 24px;
}
.cq-step-label {
  font-size: 12px;
  color: var(--text-muted, #8892a4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

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

.cq-subject-btn {
  padding: 12px 8px;
  background: var(--bg-card, #141d32);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--text-secondary, #c8d0e0);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.cq-subject-btn.selected {
  border-color: var(--accent-cyan, #00d4ff);
  background: rgba(0,212,255,0.08);
  color: var(--accent-cyan, #00d4ff);
}
.cq-subject-icon { font-size: 18px; }

.cq-topics-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.cq-topic-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.cq-topic-item:hover { border-color: rgba(0,212,255,0.3); }
.cq-topic-item.selected { border-color: rgba(0,212,255,0.5); background: rgba(0,212,255,0.05); }

.cq-topic-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--accent-cyan, #00d4ff);
  transition: all 0.15s;
}
.cq-topic-item.selected .cq-topic-checkbox {
  background: var(--accent-cyan, #00d4ff);
  border-color: var(--accent-cyan, #00d4ff);
  color: #000;
}
.cq-topic-name {
  font-size: 14px;
  color: var(--text-primary, #f0f4ff);
  font-weight: 500;
  flex: 1;
}

.cq-count-pills {
  display: flex;
  gap: 8px;
}
.cq-count-pill {
  flex: 1;
  padding: 10px;
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text-secondary, #c8d0e0);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.cq-count-pill.active {
  background: rgba(0,212,255,0.1);
  border-color: rgba(0,212,255,0.4);
  color: var(--accent-cyan, #00d4ff);
}

.cq-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.cq-mode-btn {
  padding: 12px 8px;
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text-secondary, #c8d0e0);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.cq-mode-btn .cq-mode-icon { font-size: 20px; display: block; margin-bottom: 4px; }
.cq-mode-btn.active {
  background: rgba(255,184,0,0.1);
  border-color: rgba(255,184,0,0.4);
  color: var(--accent-amber, #ffb800);
}

.cq-launch-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: #000;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s, transform 0.1s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.cq-launch-btn:hover { opacity: 0.9; }
.cq-launch-btn:active { transform: scale(0.99); }
.cq-launch-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Custom Quiz home button */
.home-extra-btn.custom-quiz-btn {}

/* ============================================================ */
/* ROUND 67: ACHIEVEMENTS                                       */
/* ============================================================ */

#screen-achievements {
  padding: 0 16px 100px;
}

.ach-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 20px;
}
.ach-title-block { flex: 1; }
.ach-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.ach-sub {
  font-size: 13px;
  color: var(--text-muted, #8892a4);
  margin-top: 2px;
}

.ach-summary-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.ach-summary-stat {
  flex: 1;
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
}
.ach-summary-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-amber, #ffb800);
}
.ach-summary-label {
  font-size: 11px;
  color: var(--text-muted, #8892a4);
  margin-top: 2px;
}

.ach-category-title {
  font-size: 12px;
  color: var(--text-muted, #8892a4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 16px 0 10px;
}

.ach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.ach-badge {
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.ach-badge.unlocked {
  border-color: rgba(255,184,0,0.35);
  background: rgba(255,184,0,0.04);
}
.ach-badge.locked { opacity: 0.55; }

.ach-badge-icon {
  font-size: 30px;
  margin-bottom: 6px;
  display: block;
}
.ach-badge.locked .ach-badge-icon { filter: grayscale(1); }

.ach-badge-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  margin-bottom: 2px;
}
.ach-badge-desc {
  font-size: 11px;
  color: var(--text-muted, #8892a4);
  line-height: 1.4;
}

.ach-badge-unlocked-label {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,184,0,0.2);
  border-radius: 20px;
  padding: 2px 6px;
  font-size: 9px;
  color: var(--accent-amber, #ffb800);
  font-weight: 700;
}

.ach-progress-bar-track {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.ach-progress-bar {
  height: 4px;
  background: var(--accent-amber, #ffb800);
  border-radius: 2px;
  transition: width 0.5s ease;
}
.ach-badge.locked .ach-progress-bar { background: rgba(255,255,255,0.2); }

.ach-progress-text {
  font-size: 10px;
  color: var(--text-muted, #8892a4);
  margin-top: 4px;
}

/* Achievements link in stats */
.stats-achievements-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,184,0,0.2);
  border-radius: 12px;
  color: var(--text-primary, #f0f4ff);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  margin-top: 12px;
}
.stats-achievements-btn svg { color: var(--accent-amber, #ffb800); flex-shrink: 0; }

/* Achievement toast */
.ach-toast {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ach-toast-icon { font-size: 24px; }
.ach-toast-text { font-size: 13px; color: var(--text-primary, #f0f4ff); }
.ach-toast-text strong { color: var(--accent-amber, #ffb800); }

/* ============================================================ */
/* ROUND 68: PRINT REVISION CARDS                               */
/* ============================================================ */

.print-cards-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  color: var(--accent-cyan, #00d4ff);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.15s;
}
.print-cards-btn:hover { background: rgba(0,212,255,0.14); }

@media print {
  /* Hide everything except the print container */
  body > * { display: none !important; }
  #print-cards-container { display: block !important; }

  #print-cards-container {
    display: block;
    margin: 0;
    padding: 0;
  }

  .print-cards-page {
    page-break-after: always;
  }

  .print-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 10mm;
  }

  .print-card-item {
    border: 1px solid #ccc;
    padding: 8mm 6mm;
    min-height: 55mm;
    display: flex;
    flex-direction: column;
    page-break-inside: avoid;
    position: relative;
  }

  .print-card-front {
    border-bottom: 1px dashed #ccc;
    padding-bottom: 4mm;
    margin-bottom: 4mm;
  }

  .print-card-subject {
    font-size: 7pt;
    color: #666;
    margin-bottom: 2mm;
    font-weight: bold;
  }
  .print-card-q {
    font-size: 9pt;
    font-weight: bold;
    color: #000;
    line-height: 1.5;
  }
  .print-card-a {
    font-size: 8.5pt;
    color: #222;
    line-height: 1.5;
    font-style: italic;
  }
  .print-card-num {
    position: absolute;
    bottom: 3mm;
    right: 4mm;
    font-size: 7pt;
    color: #aaa;
  }

  .print-header {
    font-size: 14pt;
    font-weight: bold;
    padding: 5mm 10mm 3mm;
    border-bottom: 1px solid #ccc;
    margin-bottom: 3mm;
  }
}

/* Screen print container is hidden */
#print-cards-container {
  display: none;
}

/* ============================================================ */
/* ROUND 70: EQUATION BALANCER                                  */
/* ============================================================ */

#screen-equation-balancer {
  padding: 0 16px 100px;
}

.eb-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 12px;
}
.eb-title-block { flex: 1; }
.eb-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.eb-sub {
  font-size: 13px;
  color: var(--text-muted, #8892a4);
  margin-top: 2px;
}

.eb-difficulty-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.eb-diff-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary, #c8d0e0);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.eb-diff-btn.active.easy {
  background: rgba(0,200,120,0.1);
  border-color: rgba(0,200,120,0.4);
  color: #00c896;
}
.eb-diff-btn.active.hard {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.4);
  color: #f87171;
}

.eb-score-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.eb-score-stat {
  flex: 1;
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.eb-score-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-cyan, #00d4ff);
}
.eb-score-label {
  font-size: 11px;
  color: var(--text-muted, #8892a4);
}

.eb-equation-card {
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.eb-eq-display {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
  min-height: 60px;
}

.eb-eq-symbol {
  font-size: 18px;
  color: var(--text-secondary, #c8d0e0);
  font-weight: 500;
}
.eb-eq-arrow {
  font-size: 20px;
  color: var(--accent-amber, #ffb800);
}

.eb-formula-group {
  display: flex;
  align-items: center;
  gap: 2px;
}
.eb-coeff-input {
  width: 36px;
  height: 36px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 7px;
  color: var(--accent-cyan, #00d4ff);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}
.eb-coeff-input:focus { border-color: var(--accent-cyan, #00d4ff); background: rgba(0,212,255,0.14); }
.eb-coeff-input.correct { border-color: #00c896; color: #00c896; background: rgba(0,200,120,0.1); }
.eb-coeff-input.wrong { border-color: #f87171; color: #f87171; background: rgba(239,68,68,0.1); }

.eb-formula-text {
  font-size: 16px;
  color: var(--text-primary, #f0f4ff);
  font-weight: 600;
  padding: 0 2px;
}

.eb-atom-count {
  background: var(--bg-deep, #080e1c);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12px;
}
.eb-atom-title {
  color: var(--text-muted, #8892a4);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.eb-atom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.eb-atom-pill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.eb-atom-pill.balanced { background: rgba(0,200,120,0.12); color: #00c896; border: 1px solid rgba(0,200,120,0.25); }
.eb-atom-pill.unbalanced { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }

.eb-check-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent-cyan, #00d4ff);
  color: #000;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}
.eb-next-btn {
  width: 100%;
  padding: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text-secondary, #c8d0e0);
  font-size: 14px;
  cursor: pointer;
  display: none;
}

.eb-result-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.eb-result-banner.success { background: rgba(0,200,120,0.1); border: 1px solid rgba(0,200,120,0.3); color: #00c896; }
.eb-result-banner.fail { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }

.eb-home-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text-secondary, #c8d0e0);
  font-size: 13px;
  cursor: pointer;
  margin-top: 12px;
}

/* ============================================================ */
/* ROUND 71: SMART INTERLEAVING                                 */
/* ============================================================ */

.si-session-summary {
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
  margin-top: 12px;
}
.si-summary-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  margin-bottom: 10px;
}
.si-topic-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}
.si-topic-row:last-child { border-bottom: none; }
.si-topic-name { color: var(--text-secondary, #c8d0e0); }
.si-topic-pct {
  font-weight: 700;
  font-size: 13px;
}

/* ============================================================ */
/* ROUND 72: STUDENT NOTES                                      */
/* ============================================================ */

.note-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255,184,0,0.08);
  border: 1px solid rgba(255,184,0,0.2);
  border-radius: 8px;
  color: var(--accent-amber, #ffb800);
  cursor: pointer;
  font-size: 13px;
  vertical-align: middle;
  margin-left: 6px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.note-icon-btn:hover { background: rgba(255,184,0,0.16); }
.note-icon-btn.has-note {
  background: rgba(255,184,0,0.18);
  border-color: rgba(255,184,0,0.4);
}

/* Notes modal */
.notes-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
}
.notes-modal {
  background: var(--bg-base, #0f1729);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 32px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.notes-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  margin-bottom: 4px;
}
.notes-modal-card-q {
  font-size: 13px;
  color: var(--text-muted, #8892a4);
  margin-bottom: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notes-modal-textarea {
  width: 100%;
  min-height: 100px;
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--text-primary, #f0f4ff);
  font-size: 14px;
  line-height: 1.6;
  padding: 12px;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
}
.notes-modal-textarea:focus { outline: none; border-color: var(--accent-amber, #ffb800); }
.notes-modal-actions {
  display: flex;
  gap: 10px;
}
.notes-save-btn {
  flex: 1;
  padding: 11px;
  background: var(--accent-amber, #ffb800);
  color: #000;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.notes-cancel-btn {
  padding: 11px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text-secondary, #c8d0e0);
  font-size: 14px;
  cursor: pointer;
}
.notes-delete-btn {
  padding: 11px 16px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 10px;
  color: #f87171;
  font-size: 14px;
  cursor: pointer;
}

/* My Notes screen */
#screen-my-notes {
  padding: 0 16px 100px;
}
.mn-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 16px;
}
.mn-title-block { flex: 1; }
.mn-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f0f4ff);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.mn-sub {
  font-size: 13px;
  color: var(--text-muted, #8892a4);
  margin-top: 2px;
}

.mn-search-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  gap: 10px;
  margin-bottom: 16px;
}
.mn-search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary, #f0f4ff);
  font-size: 14px;
  outline: none;
}
.mn-search-input::placeholder { color: var(--text-muted, #8892a4); }

.mn-note-card {
  background: var(--bg-card, #141d32);
  border: 1px solid rgba(255,184,0,0.15);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.mn-note-card:hover { border-color: rgba(255,184,0,0.35); }
.mn-note-q {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-amber, #ffb800);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mn-note-text {
  font-size: 13px;
  color: var(--text-secondary, #c8d0e0);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mn-note-meta {
  font-size: 11px;
  color: var(--text-muted, #8892a4);
  margin-top: 6px;
}
.mn-empty {
  text-align: center;
  padding: 48px 20px;
}
.mn-empty-icon { font-size: 40px; margin-bottom: 10px; }
.mn-empty-text { color: var(--text-muted, #8892a4); font-size: 15px; }

/* ============================================================ */
/* ROUND 73: QUICK ACTIONS FAB                                  */
/* ============================================================ */

.qa-fab-wrap {
  position: fixed;
  bottom: 90px;
  right: 16px;
  z-index: 900;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
}

.qa-main-fab {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent-cyan, #00d4ff), #0099cc);
  border: none;
  border-radius: 50%;
  color: #000;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 2;
}
.qa-main-fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0,212,255,0.45); }
.qa-main-fab.open { transform: rotate(45deg); }

.qa-actions {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
}
.qa-actions.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.qa-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qa-action-label {
  background: var(--bg-deep, #080e1c);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary, #f0f4ff);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.qa-action-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.qa-action-btn:hover { transform: scale(1.1); }
.qa-btn-quiz { background: rgba(0,212,255,0.15); color: var(--accent-cyan, #00d4ff); border: 1px solid rgba(0,212,255,0.3); }
.qa-btn-review { background: rgba(0,200,120,0.15); color: #00c896; border: 1px solid rgba(0,200,120,0.3); }
.qa-btn-slop { background: rgba(255,184,0,0.15); color: var(--accent-amber, #ffb800); border: 1px solid rgba(255,184,0,0.3); }
.qa-btn-random { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }

.qa-backdrop {
  position: fixed;
  inset: 0;
  z-index: 899;
  display: none;
}
.qa-backdrop.open { display: block; }

/* ============================================================ */
/* ROUND 74: ANALYTICS EXPORT                                   */
/* ============================================================ */

.export-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 200, 120, 0.08);
  border: 1px solid rgba(0, 200, 120, 0.2);
  border-radius: 12px;
  color: #00c896;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.15s;
  width: 100%;
}
.export-btn:hover { background: rgba(0,200,120,0.14); }
.export-btn svg { flex-shrink: 0; }

/* ============================================================ */
/* ROUND 75: RESPONSIVE DESKTOP LAYOUT                          */
/* ============================================================ */

/* Tablet (768px+) */
@media (min-width: 768px) {
  #app {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
  }

  .navbar {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .bottom-nav {
    display: none !important;
  }

  /* Sidebar */
  .desktop-sidebar {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    background: var(--bg-base, #0f1729);
    border-right: 1px solid rgba(255,255,255,0.07);
    padding: 20px 12px;
    display: flex !important;
    flex-direction: column;
    gap: 4px;
  }

  .sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    background: none;
    color: var(--text-secondary, #c8d0e0);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    width: 100%;
  }
  .sidebar-nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary, #f0f4ff);
  }
  .sidebar-nav-item.active {
    background: rgba(0,212,255,0.1);
    color: var(--accent-cyan, #00d4ff);
    font-weight: 600;
  }
  .sidebar-nav-item svg, .sidebar-nav-item .sidebar-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 8px 4px;
  }

  .sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted, #8892a4);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 6px 14px 2px;
  }

  /* Main content column */
  .screens-wrap {
    grid-column: 2;
    grid-row: 2;
    overflow-y: auto;
    min-width: 0;
  }

  /* Wider cards and grids */
  .subject-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .topics-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cq-subject-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ach-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .wd-sa-buttons {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Flashcard larger on desktop */
  .card-scene {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Screen padding */
  .screen {
    padding-bottom: 40px !important;
  }

  /* Wider screens */
  #screen-home,
  #screen-topics,
  #screen-stats,
  #screen-exam-tips,
  #screen-custom-quiz,
  #screen-achievements,
  #screen-my-notes,
  #screen-mistake-patterns,
  #screen-writing-drills,
  #screen-equation-balancer {
    max-width: 860px;
    margin: 0 auto;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .home-extras {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stats-hero-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .qa-fab-wrap {
    bottom: 24px;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  #app {
    grid-template-columns: 240px 1fr;
  }

  #screen-home,
  #screen-topics,
  #screen-stats,
  #screen-exam-tips,
  #screen-custom-quiz,
  #screen-achievements,
  #screen-my-notes,
  #screen-mistake-patterns,
  #screen-writing-drills,
  #screen-equation-balancer {
    max-width: 920px;
  }

  .subject-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* Mobile (<768px) bottom padding for FABs */
@media (max-width: 767px) {
  .desktop-sidebar { display: none !important; }
  .screens-wrap { min-height: 0; }
  .qa-fab-wrap { bottom: 90px; }
}

/* ============================================================ */
/* SHARED UTILITY STYLES                                        */
/* ============================================================ */

.r61-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--accent-cyan, #00d4ff), #0099cc);
  color: #000;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.r61-btn-primary:hover { opacity: 0.9; }
.r61-btn-primary:active { transform: scale(0.98); }

.r61-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: var(--text-secondary, #c8d0e0);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.r61-btn-secondary:hover { background: rgba(255,255,255,0.1); }

.r61-screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 20px;
}

/* ============================================================
   DESKTOP OVERHAUL: rounds61to75.css additional enhancements
   These add to the existing Round 75 responsive rules.
   ============================================================ */

@media (min-width: 768px) {
  /* Sidebar scrollbar styling */
  .desktop-sidebar::-webkit-scrollbar { width: 4px; }
  .desktop-sidebar::-webkit-scrollbar-track { background: transparent; }
  .desktop-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

  /* Sidebar nav items larger hover area */
  .sidebar-nav-item {
    padding: 11px 16px;
    font-size: 14px;
    border-radius: 12px;
  }

  /* Writing drills grid on desktop */
  #screen-writing-drills .wd-prompts-grid,
  .wd-sa-buttons {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Exam tips: wider layout */
  .et-grid {
    max-width: 900px;
    margin: 0 auto;
  }

  /* Custom quiz: wider form */
  .cq-screen {
    max-width: 900px;
    margin: 0 auto;
  }

  /* Achievements: wider grid */
  .ach-grid {
    max-width: 900px;
    margin: 0 auto;
  }

  /* My Notes: wider */
  .notes-container {
    max-width: 900px;
    margin: 0 auto;
  }

  /* Mistake patterns: wider */
  .mp-content {
    max-width: 900px;
    margin: 0 auto;
  }

  /* Screen padding for inline-styled screens - override with !important */
  #screen-writing-drills,
  #screen-exam-tips,
  #screen-mistake-patterns,
  #screen-custom-quiz,
  #screen-achievements,
  #screen-equation-balancer,
  #screen-my-notes {
    padding: 32px 32px 80px !important;
  }
}

@media (min-width: 1024px) {
  /* Main content area: ensure screens are wide */
  .screens-wrap .screen {
    max-width: 1200px;
    padding: 40px 48px 80px;
  }

  /* Sidebar slightly wider on large screens */
  .desktop-sidebar {
    padding: 24px 16px;
  }

  /* Screen headers inside rounds61-75 screens */
  .r61-screen-header {
    padding: 20px 0 24px;
  }

  /* Equation balancer: centred content */
  .eb-container {
    max-width: 800px;
    margin: 0 auto;
  }

  /* Writing drills 3-column on large desktop */
  .wd-sa-buttons {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Screen-specific padding override */
  #screen-writing-drills,
  #screen-exam-tips,
  #screen-mistake-patterns,
  #screen-custom-quiz,
  #screen-achievements,
  #screen-equation-balancer,
  #screen-my-notes {
    padding: 40px 48px 80px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
  }
}

