/* ============================================
   STUDENT TOOLS — Tool-specific styles
   Component styles for the individual tools (graphs, flashcards, quizzes,
   grammar checker, game study, timers...). Shared layout, design tokens and
   base components (cards, forms, buttons, results) live in site.css.
   ============================================ */

/* ---- GRAPH CANVAS ---- */
.graph-container {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
  margin-top: 16px;
  position: relative;
}

.graph-container canvas {
  width: 100%;
  border-radius: var(--radius-sm);
}

/* ---- UNIT CIRCLE ---- */
.unit-circle-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.unit-circle-container canvas {
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

/* ---- STATS TABLE ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.stat-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.stat-card .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
}

.stat-card .stat-value {
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  color: var(--accent-cyan);
}

/* ---- TOGGLE BUTTONS ---- */
.toggle-group {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.toggle-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-btn.active {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
}

.toggle-btn:hover:not(.active) {
  color: var(--text-primary);
}


/* ---- TABS WITHIN TOOLS ---- */
.tool-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0;
}

.tool-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
}

.tool-tab:hover { color: var(--text-primary); }
.tool-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- SPECIAL ANIMATIONS ---- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,135,92,0.2); }
  50% { box-shadow: 0 0 20px 4px rgba(232,135,92,0.1); }
}

.pulse { animation: pulse-glow 2s infinite; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: slideUp 0.4s ease forwards;
}


/* ============================================
   STUDY TOOLS — Flashcards & Quizzes
   ============================================ */

/* ---- DECK / SET GRID ---- */
.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.deck-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.deck-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.deck-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.deck-card:hover::after { opacity: 1; }

.deck-card .deck-emoji { font-size: 24px; margin-bottom: 8px; }

.deck-card .deck-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.deck-card .deck-count {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.deck-card .deck-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.deck-card .deck-actions button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.deck-card .deck-actions button:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
.deck-card .deck-actions .btn-danger:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* ---- CREATE DECK CARD (+ button) ---- */
.deck-card-new {
  background: var(--bg-card);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  min-height: 140px;
}

.deck-card-new:hover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.deck-card-new .plus-icon {
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}
.deck-card-new:hover .plus-icon { color: var(--accent-cyan); }

.deck-card-new span {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}


/* ---- FLASHCARD FLIP ---- */
.flashcard-scene {
  perspective: 1000px;
  width: 100%;
  max-width: 560px;
  height: 320px;
  margin: 0 auto 24px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard-inner.flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-subtle);
}

.flashcard-front {
  background: var(--bg-card);
  border-top: 3px solid var(--accent-cyan);
}

.flashcard-back {
  background: var(--bg-card);
  transform: rotateY(180deg);
  border-top: 3px solid var(--accent-purple);
}

.flashcard-side-label {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.flashcard-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  max-height: 200px;
  overflow-y: auto;
  word-wrap: break-word;
  width: 100%;
}

.flashcard-back .flashcard-text {
  color: var(--accent-green);
}

/* ---- FLASHCARD CONTROLS ---- */
.fc-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fc-controls .btn {
  min-width: 110px;
}

.fc-progress {
  text-align: center;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.fc-progress-bar {
  width: 100%;
  max-width: 400px;
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  margin: 8px auto 0;
  overflow: hidden;
}

.fc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ---- CARD EDITOR ---- */
.card-editor-list {
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.card-editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.card-editor-row:last-child { border-bottom: none; }

.card-editor-row .card-num {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-muted);
  grid-column: 1 / -1;
  margin-bottom: -4px;
}

.card-delete-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-delete-btn:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: rgba(200,122,112,0.12);
}

/* ---- QUIZ STYLES ---- */
.quiz-question-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  transition: all var(--transition-smooth);
}

.quiz-question-block.correct {
  border-color: var(--accent-green);
  background: rgba(122,153,104,0.07);
}

.quiz-question-block.incorrect {
  border-color: var(--accent-red);
  background: rgba(200,122,112,0.07);
}

.quiz-q-number {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.quiz-q-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 14px;
  color: var(--text-secondary);
}

.quiz-option:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  background: var(--accent-cyan-dim);
}

.quiz-option.selected {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.quiz-option.reveal-correct {
  border-color: var(--accent-green) !important;
  color: var(--accent-green) !important;
  background: rgba(122,153,104,0.12) !important;
}

.quiz-option.reveal-wrong {
  border-color: var(--accent-red) !important;
  color: var(--accent-red) !important;
  background: rgba(200,122,112,0.12) !important;
}

.quiz-option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.quiz-option.selected .quiz-option-letter {
  background: var(--accent-cyan);
  color: var(--on-accent);
  border-color: var(--accent-cyan);
}

.quiz-option.reveal-correct .quiz-option-letter {
  background: var(--accent-green);
  color: #000;
  border-color: var(--accent-green);
}

.quiz-option.reveal-wrong .quiz-option-letter {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

/* True/False special */
.quiz-tf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quiz-tf-row .quiz-option {
  justify-content: center;
  font-weight: 600;
  font-family: var(--font-display);
}

/* ---- QUIZ SCORE ---- */
.quiz-score-box {
  text-align: center;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}

.quiz-score-number {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.quiz-score-label {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.quiz-score-message {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-top: 16px;
  color: var(--text-primary);
}

/* ---- QUIZ EDITOR ---- */
.quiz-editor-question {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
}

.quiz-editor-question .qe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.quiz-editor-question .qe-number {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.qe-type-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
}

.qe-type-btn {
  padding: 4px 12px;
  font-size: 11px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.qe-type-btn.active {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
}

.quiz-editor-question .qe-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.qe-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qe-option-row input[type="text"] {
  flex: 1;
}

.qe-correct-radio {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-subtle);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  position: relative;
}

.qe-correct-radio:checked {
  border-color: var(--accent-green);
  background: var(--accent-green);
}

.qe-correct-radio:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: #000;
  font-weight: 700;
}

.qe-correct-radio:hover {
  border-color: var(--accent-green);
}

/* ---- STUDY MODE SHUFFLE BADGE ---- */
.shuffle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  border-radius: 20px;
  font-size: 11px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 15px;
  font-family: var(--font-display);
  margin-bottom: 20px;
  color: var(--text-secondary);
}

/* ---- MODAL OVERLAY ---- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* ---- BACK BUTTON ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 20px;
  transition: color var(--transition-fast);
  background: none;
  border: none;
}
.back-link:hover { color: var(--accent-cyan); }

/* ---- SEPARATOR WITH LABEL ---- */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.section-divider span {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================
   GRAMMAR CHECKER — Writing Tool Styles
   ============================================ */

/* ---- TEXTAREA ENHANCEMENTS ---- */
#gc-input {
  min-height: 220px;
  line-height: 1.8;
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
}

.gc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.gc-word-count {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- SCORE RING ---- */
.gc-score-row {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.gc-score-circle {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.gc-score-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gc-ring-bg {
  fill: none;
  stroke: var(--bg-input);
  stroke-width: 8;
}

.gc-ring-fill {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s ease;
}

.gc-score-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.gc-score-info {
  flex: 1;
  min-width: 200px;
}

.gc-score-label {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.gc-score-detail {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---- FILTER BUTTONS ---- */
.gc-filter-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.gc-filter-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gc-filter-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.gc-filter-btn.active {
  background: var(--accent-cyan-dim);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ---- ISSUE CARDS ---- */
.gc-issue {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 10px;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.gc-issue::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
}

.gc-issue[data-type="grammar"]::before { background: var(--accent-red); }
.gc-issue[data-type="spelling"]::before { background: var(--accent-orange); }
.gc-issue[data-type="punctuation"]::before { background: var(--accent-yellow); }
.gc-issue[data-type="style"]::before { background: var(--accent-purple); }

.gc-issue:hover {
  border-color: var(--border-accent);
}

.gc-issue.gc-issue-fixed {
  opacity: 0.4;
  pointer-events: none;
}

.gc-issue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.gc-issue-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gc-issue[data-type="grammar"] .gc-issue-badge {
  background: rgba(200,122,112,0.14);
  color: var(--accent-red);
}
.gc-issue[data-type="spelling"] .gc-issue-badge {
  background: rgba(212,149,106,0.14);
  color: var(--accent-orange);
}
.gc-issue[data-type="punctuation"] .gc-issue-badge {
  background: rgba(201,168,74,0.14);
  color: var(--accent-yellow);
}
.gc-issue[data-type="style"] .gc-issue-badge {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
}

.gc-issue-context {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.gc-issue-context .gc-highlight-bad {
  background: rgba(200,122,112,0.15);
  color: var(--accent-red);
  padding: 1px 4px;
  border-radius: 3px;
  text-decoration: line-through;
  text-decoration-color: rgba(200,122,112,0.4);
}

.gc-issue-context .gc-highlight-good {
  background: rgba(122,153,104,0.14);
  color: var(--accent-green);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 500;
}

.gc-issue-explain {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.gc-issue-actions {
  display: flex;
  gap: 6px;
}

.gc-issue-actions button {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.gc-issue-actions button.gc-fix-btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(122,153,104,0.1);
}

.gc-issue-actions button.gc-ignore-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ---- CORRECTED TEXT BOX ---- */
.gc-corrected-text {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ---- COPY TOAST ---- */
.gc-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--accent-green);
  color: #000;
  padding: 10px 24px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  z-index: 600;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.gc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- ANNOTATED TEXT VIEW ---- */
.gc-annotated-text {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  min-height: 220px;
  max-height: 420px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  cursor: default;
  user-select: text;
}

.gc-annotated-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.gc-errors-found {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---- ERROR UNDERLINES ---- */
.gc-error-span {
  cursor: pointer;
  border-bottom: 2px solid transparent;
  padding-bottom: 1px;
  transition: background 0.15s ease;
}
.gc-error-span:hover {
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
}
.gc-error-spelling {
  border-bottom-color: var(--accent-red);
  border-bottom-style: wavy;
}
.gc-error-grammar {
  border-bottom-color: var(--accent-cyan);
  border-bottom-style: solid;
}
.gc-error-punctuation {
  border-bottom-color: var(--accent-yellow);
  border-bottom-style: wavy;
}
.gc-error-style {
  border-bottom-color: var(--accent-purple);
  border-bottom-style: wavy;
}

/* ---- LOADING OVERLAY ---- */
.gc-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14,14,22,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: var(--radius-md);
  z-index: 20;
}
.gc-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: gc-spin 0.7s linear infinite;
}
@keyframes gc-spin { to { transform: rotate(360deg); } }
.gc-loading-msg {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---- INLINE POPUP ---- */
.gc-inline-popup {
  position: fixed;
  z-index: 700;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 220px;
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.gc-popup-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}

.gc-popup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.gc-popup-label {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.gc-popup-suggestion {
  margin-bottom: 10px;
}

.gc-popup-apply-word-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--accent-cyan);
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.gc-popup-apply-word-btn:hover { color: var(--accent-cyan); }

.gc-popup-actions {
  display: flex;
  gap: 6px;
}

.gc-popup-ignore-btn,
.gc-popup-more-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.gc-popup-ignore-btn:hover { border-color: var(--text-muted); color: var(--text-primary); }
.gc-popup-more-btn:hover   { border-color: var(--accent-cyan); color: var(--accent-cyan); }

/* ---- PROOFREAD PANEL ---- */
.gc-pd-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}

.gc-pd-close-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color var(--transition-fast);
}
.gc-pd-close-btn:hover { color: var(--text-primary); }

.gc-pd-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.gc-pd-apply-btn {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--accent-orange);
  color: #000;
  transition: all var(--transition-fast);
}
.gc-pd-apply-btn:hover { opacity: 0.88; transform: translateY(-1px); }

.gc-pd-ignore-btn {
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.gc-pd-ignore-btn:hover { border-color: var(--text-muted); color: var(--text-primary); }

.gc-pd-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.gc-pd-nav-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-fast);
}
.gc-pd-nav-btn:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }

.gc-pd-counter {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- FIX ERRORS BUTTON ---- */
.gc-fix-errors-btn {
  background: var(--accent-green);
  color: #000;
  border: 1px solid var(--accent-green);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.gc-fix-errors-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.gc-fix-errors-btn.gc-fix-errors-done {
  background: var(--bg-input);
  color: var(--accent-green);
  border-color: var(--accent-green);
  cursor: default;
  transform: none;
  opacity: 1;
}

/* Contenteditable placeholder + focus */
#gc-input:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}
#gc-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-dim);
  cursor: text;
}
#gc-input { cursor: text; }

/* Proofread panel rule text + context snippet */
.gc-pd-rule {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}
.gc-pd-context-snippet {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.gc-pd-context-snippet mark {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border-radius: 3px;
  padding: 1px 3px;
}

/* Active + ignored error span states */
.gc-error-span.gc-error-active { background: rgba(255,255,255,0.08); border-radius: 2px; }
.gc-error-span.gc-error-ignored { border-bottom-color: transparent !important; cursor: default; pointer-events: none; }

/* ---- CHARACTER CUTTER ---- */
.lt-char-cutter {
  margin-bottom: 12px;
}

.lt-char-bar-wrap {
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.lt-char-fill {
  height: 100%;
  width: 0;
  background: var(--accent-cyan);
  border-radius: 2px;
  transition: width 0.15s ease, background 0.3s ease;
}

.lt-char-fill.lt-char-warn {
  background: var(--accent-orange);
}

.lt-char-fill.lt-char-over {
  background: var(--accent-red);
}

.lt-char-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lt-char-label {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-muted);
}

.lt-char-warning {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--accent-orange);
  padding: 8px 12px;
  background: rgba(255, 140, 0, 0.08);
  border: 1px solid rgba(255, 140, 0, 0.25);
  border-radius: 6px;
  margin-bottom: 12px;
}


/* ============================================
   GAME STUDY — Quiz Blaster arcade styles
   ============================================ */
.gs-source-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 18px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}
.gs-tab-btn {
  flex: 1 1 140px;
  min-height: 42px;
  padding: 10px 14px;
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.gs-tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}
.gs-tab-btn.active {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}
.gs-tab-panel { display: none; }
.gs-tab-panel.active { display: block; animation: gsFade 0.25s ease; }

.gs-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
}
.gs-hint code {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-cyan);
}

.gs-settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 560px) {
  .gs-settings-row { grid-template-columns: 1fr; }
}

.gs-highscore-card {
  margin-top: 18px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(201,168,74,0.12), rgba(122,153,104,0.12));
  border: 1px solid rgba(201,168,74,0.3);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.gs-hs-label {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent-yellow);
  text-transform: uppercase;
}
.gs-hs-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-yellow);
}

/* -- HUD -- */
.gs-hud {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.gs-hud-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  min-width: 0;
}
.gs-hud-label {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.gs-hud-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
@media (max-width: 560px) {
  .gs-hud { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .gs-hud-item { padding: 8px 4px; }
  .gs-hud-label { font-size: 9px; letter-spacing: 0.5px; }
  .gs-hud-value { font-size: 16px; }
}

/* -- Timer bar -- */
.gs-timer-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}
.gs-timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  transition: width 0.1s linear, background 0.3s ease;
}

/* -- Stage -- */
.gs-stage {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.gs-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(232,135,92,0.08), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(122,153,104,0.08), transparent 40%);
  pointer-events: none;
}

.gs-question-card {
  position: relative;
  background: var(--bg-input);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: 0 0 24px rgba(232,135,92,0.08) inset;
}
.gs-q-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  word-break: break-word;
}
@media (max-width: 560px) {
  .gs-q-text { font-size: 18px; }
  .gs-question-card { padding: 18px 14px; min-height: 80px; }
  .gs-stage { padding: 16px; }
}

.gs-pulse { animation: gsPulse 0.4s ease; }
.gs-shake { animation: gsShake 0.4s ease; }
@keyframes gsPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(122,153,104,0); }
  50% { transform: scale(1.02); box-shadow: 0 0 40px rgba(122,153,104,0.35); }
  100% { transform: scale(1); }
}
@keyframes gsShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
@keyframes gsFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.gs-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
}
@media (max-width: 560px) {
  .gs-options-grid { grid-template-columns: 1fr; gap: 10px; }
}

.gs-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  min-height: 60px;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.gs-option-btn:hover:not(:disabled) {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(232,135,92,0.18);
}
.gs-option-btn:active:not(:disabled) {
  transform: translateY(0);
}
.gs-option-btn:disabled {
  cursor: default;
  opacity: 0.85;
}
.gs-option-letter {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--accent-cyan);
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.gs-option-text {
  flex: 1;
  word-break: break-word;
}
.gs-option-btn.gs-correct {
  border-color: var(--accent-green);
  background: rgba(122,153,104,0.15);
  color: var(--accent-green);
  animation: gsPulse 0.4s ease;
}
.gs-option-btn.gs-correct .gs-option-letter {
  background: var(--accent-green);
  color: #000;
}
.gs-option-btn.gs-wrong {
  border-color: var(--accent-red);
  background: rgba(200,122,112,0.15);
  color: var(--accent-red);
}
.gs-option-btn.gs-wrong .gs-option-letter {
  background: var(--accent-red);
  color: #fff;
}

.gs-feedback {
  text-align: center;
  margin-top: 14px;
  min-height: 24px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 600;
}
.gs-fb-correct { color: var(--accent-green); }
.gs-fb-wrong { color: var(--accent-red); }

/* -- Game Over -- */
.gs-gameover-box {
  max-width: 520px;
  margin: 40px auto;
  background: linear-gradient(160deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.gs-gameover-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}
.gs-gameover-score {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  color: var(--accent-yellow);
  line-height: 1;
  margin: 12px 0;
  text-shadow: 0 0 30px rgba(201,168,74,0.35);
}
.gs-gameover-msg {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}
.gs-gameover-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.gs-stat {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.gs-stat span { color: var(--text-muted); }
.gs-stat b {
  color: var(--accent-cyan);
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 15px;
}
@media (max-width: 560px) {
  .gs-gameover-box { padding: 24px 18px; }
  .gs-gameover-score { font-size: 48px; }
  .gs-gameover-stats { grid-template-columns: 1fr; }
}

/* ============================================
   STUDY TIME TRACKER
   ============================================ */

/* Stats Dashboard */
.st-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.st-stat-card {
  background: linear-gradient(135deg, var(--accent-cyan-dim) 0%, rgba(0,0,0,0.05) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
}

.st-stat-card.active {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  color: white;
  border-color: var(--accent-cyan);
}

.st-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.st-stat-card.active .st-stat-label {
  color: rgba(255,255,255,0.8);
}

.st-stat-value {
  font-size: 18px;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent-cyan);
}

.st-stat-card.active .st-stat-value {
  color: white;
}

/* Session Grid */
.st-session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.st-session-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.st-session-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.st-session-card.st-active-session {
  background: linear-gradient(135deg, var(--accent-cyan-dim) 0%, var(--bg-card) 100%);
  border-color: var(--accent-cyan);
}

.st-session-badge {
  display: inline-block;
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.st-session-badge.active {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
}

.st-session-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-session-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.st-session-duration {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.st-new-session-card {
  background: linear-gradient(135deg, var(--accent-cyan-dim) 0%, var(--accent-purple-dim) 100%);
  border: 2px dashed var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 32px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 120px;
}

.st-new-session-card:hover {
  border-style: solid;
  transform: scale(1.02);
}

.st-new-session-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.st-new-session-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Active Session Container */
.st-session-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  max-width: 420px;
  margin: 40px auto;
}

.st-active-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-paused-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-orange);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: none;
}

.st-timer-display {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 72px;
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1;
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.st-timer-display.paused {
  color: var(--accent-orange);
  opacity: 0.7;
}

.st-session-info {
  margin-bottom: 24px;
}

.st-session-name {
  width: 100%;
  text-align: center;
  font-size: 16px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

.st-session-name::placeholder {
  color: var(--text-muted);
}

.st-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.st-controls .btn {
  min-width: 140px;
}

/* Session Details Modal */
.st-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.st-detail-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.st-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.st-detail-item {
  background: var(--bg-input);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.st-detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.st-detail-value {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.st-detail-notes {
  margin-top: 20px;
}

.st-detail-notes-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

.st-detail-notes-text {
  background: var(--bg-input);
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  min-height: 60px;
}

.st-detail-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.st-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 4px;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.st-delete-btn:hover {
  color: var(--accent-red);
}

/* Responsive */
@media (max-width: 768px) {
  .st-session-container {
    padding: 24px;
    margin: 20px auto;
  }

  .st-timer-display {
    font-size: 48px;
  }

  .st-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .st-session-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .st-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   CITATION FORMATTER
   ============================================ */

.cf-style-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cf-style-btn {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.cf-style-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.cf-style-btn.active {
  background: var(--accent-cyan-dim);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.cf-citation-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 16px 0;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-primary);
  word-wrap: break-word;
  white-space: normal;
}

/* ============================================
   WORD COUNTER TOOL
   ============================================ */

.wc-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.wc-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  transition: border-color var(--transition-fast);
}

.wc-stat-box:hover {
  border-color: var(--border-accent);
}

.wc-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1.1;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
}

.wc-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.wc-readability-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .wc-readability-row {
    grid-template-columns: 1fr;
  }
}

.wc-read-block {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.wc-read-score {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.wc-read-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.wc-read-detail {
  font-size: 12px;
  color: var(--accent-purple);
  font-weight: 600;
  margin-bottom: 6px;
}

.wc-read-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.wc-top-words-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.wc-word-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wc-word-chip-count {
  font-size: 11px;
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border-radius: 999px;
  padding: 1px 7px;
  font-weight: 600;
}

/* ============================================================
   ESSAY OUTLINE BUILDER
   ============================================================ */

.ob-field-group {
  margin-bottom: 14px;
}

.ob-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.ob-field-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  min-height: 44px;
  cursor: text;
  transition: border-color 0.15s, color 0.15s;
  outline: none;
  word-break: break-word;
}

.ob-field-input:focus {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.ob-field-input:focus,
.ob-field-input:not(:empty) {
  color: var(--text-primary);
}

/* ============================================
   POMODORO TIMER
   ============================================ */

.pom-phase-label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.pom-round-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pom-ring-wrap {
  position: relative;
  display: inline-block;
  width: 200px;
  height: 200px;
}

.pom-ring {
  width: 200px;
  height: 200px;
  transform: rotate(-90deg);
}

.pom-ring-bg {
  fill: none;
  stroke: var(--bg-input);
  stroke-width: 12;
}

.pom-ring-fill {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s linear, stroke 0.4s;
}

.pom-ring-fill.pom-break {
  stroke: var(--accent-purple);
}

.pom-time-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.pom-skip-wrap {
  margin-top: 12px;
}

.pom-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}

.pom-stat-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
}

.pom-stat-value {
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-cyan);
  line-height: 1;
  margin-bottom: 4px;
}

.pom-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pom-guide {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 2;
}

.pom-guide strong {
  color: var(--accent-cyan);
}

@media (max-width: 600px) {
  .pom-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pom-ring-wrap, .pom-ring {
    width: 160px;
    height: 160px;
  }
  .pom-time-display {
    font-size: 2rem;
  }
}

/* ============================================
   CORNELL NOTES
   ============================================ */
.cn-columns {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  margin-top: 16px;
}

.cn-col-wrap {
  display: flex;
  flex-direction: column;
}

.cn-col-header {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cn-col-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cn-textarea {
  flex: 1;
  min-height: 220px;
  resize: vertical;
}

@media (max-width: 640px) {
  .cn-columns {
    grid-template-columns: 1fr;
  }
}

/* ---- THESIS BUILDER ---- */
.tb-point-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.tb-point-row .form-input {
  flex: 1;
  margin-bottom: 0;
}

.tb-remove-btn {
  flex-shrink: 0;
  padding: 8px 10px;
  line-height: 1;
}

