/* ==========================================================================
   English Reading Platform - Quiz & Word Bank Stylesheet
   Focus: Minimalist Comprehension Cards, Flashcard Deck, Table Layouts
   ========================================================================== */

/* Comprehension Quiz Container */
.reader-quiz-section {
  margin-bottom: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--bg-tertiary);
}

.quiz-panel-header {
  margin-bottom: 1.5rem;
}

.quiz-panel-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.quiz-panel-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.quiz-questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.quiz-question-card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: background-color 0.2s ease;
}

.question-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.question-number {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.question-text {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

/* Options */
.question-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option-btn {
  background-color: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.92rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background-color 0.15s ease;
}

.quiz-option-btn:hover {
  background-color: var(--bg-hover);
}

.quiz-option-btn.selected {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  font-weight: 600;
}

.quiz-option-btn.selected .option-marker {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.option-marker {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Correct / Wrong States after Submission */
.quiz-option-btn.opt-correct {
  background-color: var(--success-bg) !important;
  color: var(--success-text) !important;
  font-weight: 600;
}

.quiz-option-btn.opt-correct .option-marker {
  background-color: var(--success-text);
  color: var(--success-bg);
}

.quiz-option-btn.opt-wrong {
  background-color: var(--error-bg) !important;
  color: var(--error-text) !important;
  font-weight: 600;
}

.quiz-option-btn.opt-wrong .option-marker {
  background-color: var(--error-text);
  color: var(--error-bg);
}

/* Explanation Box */
.quiz-explanation-box {
  margin-top: 1.25rem;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.explanation-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.explanation-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.45;
}

/* Submit & Results */
.quiz-submit-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-summary-box {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.quiz-summary-box.passed {
  background-color: var(--success-bg);
  color: var(--success-text);
}

.quiz-summary-box.needs-review {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.summary-score-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.summary-score-desc {
  font-size: 0.95rem;
}

.quiz-action-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* ==========================================================================
   Word Bank & Flashcards View
   ========================================================================== */

.wordbank-header {
  margin-bottom: 2rem;
}

.deck-container {
  max-width: 580px;
  margin: 0 auto 3.5rem;
}

.deck-top-bar,
.deck-controls-top {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.card-counter {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 0;
  letter-spacing: 0.06em;
}

.fc-shuffle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fc-shuffle-btn:hover {
  color: var(--accent);
  background: var(--bg-secondary);
}

.fc-shuffle-btn.active {
  color: var(--accent);
  font-weight: 700;
  background: var(--bg-secondary);
}

.fc-card-audio-btn {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  background-color: var(--bg-tertiary);
  border: 1px solid transparent;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  z-index: 10;
}

.fc-card-audio-btn:hover {
  background-color: var(--bg-primary);
  border-color: var(--bg-tertiary);
  color: var(--text-primary);
  transform: scale(1.08);
}

/* 3D Flashcard Flip (NO gradients, NO glowing strokes) */
.flashcard-wrapper {
  perspective: 1000px;
  width: 100%;
  height: 300px;
  margin-bottom: 1.5rem;
  cursor: pointer;
  user-select: none;
}

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

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

.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.fc-front-tag,
.fc-back-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.fc-word {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.fc-phonetics {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.fc-pos {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.fc-flip-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.fc-definition {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.fc-example {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1rem;
}

.fc-source-btn {
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-source-btn:hover {
  background: var(--bg-primary);
  border-color: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.deck-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

/* Words Table Toolbar & Search */
.word-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.table-filter-tabs {
  display: inline-flex;
  align-items: center;
  height: 36px;
  box-sizing: border-box;
  background: var(--bg-secondary);
  padding: 0.2rem;
  border-radius: var(--radius-md);
  border: none;
  gap: 0.2rem;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.filter-tab:hover {
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.table-export-wrap {
  position: relative;
  display: inline-flex;
  height: 36px;
}

.btn-table-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  box-sizing: border-box;
  gap: 0.45rem;
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-table-export:hover,
.table-export-wrap.active .btn-table-export {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--bg-tertiary);
}

.export-caret {
  transition: transform 0.2s ease;
}

.table-export-wrap.active .export-caret {
  transform: rotate(180deg);
}

.export-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: var(--bg-primary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  padding: 0.35rem;
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  transform-origin: top left;
  animation: dropdownPop 0.15s ease-out;
}

@keyframes dropdownPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.table-export-wrap.active .export-dropdown-menu {
  display: flex;
}

.export-opt-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-primary);
  text-align: left;
  transition: all 0.15s ease;
}

.export-opt-btn:hover {
  background: var(--bg-tertiary);
  color: var(--accent);
}

.export-opt-text {
  display: flex;
  flex-direction: column;
}

.export-opt-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.export-opt-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.12rem;
}

.table-search-box {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  min-width: 240px;
}

.table-search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.table-search-box input {
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  background: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 0 2rem 0 2.2rem;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease;
}

.table-search-box input:focus {
  border-color: #0284c7;
}

.table-search-box .search-clear-btn {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  line-height: 1;
}

.table-search-box .search-clear-btn:hover {
  color: var(--text-primary);
}

.empty-search-msg {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Empty Vocabulary Hub Box */
.empty-vocab-hub-box {
  background-color: var(--bg-secondary);
  border: 1px dashed var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  margin: 0.5rem 0 2rem;
}

.empty-vocab-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  color: var(--accent-primary, #2563eb);
  margin-bottom: 1.25rem;
}

.empty-vocab-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.empty-vocab-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 1.75rem;
}

.empty-vocab-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Words Table */
.table-header-row {
  margin-bottom: 1rem;
}

.table-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.words-table-wrapper {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.words-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.words-table th {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
}

.words-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--bg-tertiary);
  color: var(--text-primary);
  vertical-align: middle;
}

.words-table tr:last-child td {
  border-bottom: none;
}

.cell-word {
  font-weight: 700;
  white-space: nowrap;
}

.table-word-text {
  margin-right: 0.4rem;
}

.table-audio-btn {
  background: var(--bg-tertiary);
  border: none;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
}

.cell-pos {
  font-style: italic;
  color: var(--text-secondary);
  white-space: nowrap;
}

.cell-phonetics {
  color: var(--text-muted);
  white-space: nowrap;
}

.cell-def {
  min-width: 220px;
  line-height: 1.4;
}

.cell-status {
  white-space: nowrap;
}

.cell-action {
  width: 44px;
  text-align: right;
  padding-left: 0 !important;
  padding-right: 0.85rem !important;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.status-badge.status-toggle-btn {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.status-badge.status-toggle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.status-badge.mastered,
.status-badge.learned {
  background-color: var(--success-bg);
  color: var(--success-text);
}

.status-badge.learning,
.status-badge.studying {
  background-color: rgba(2, 132, 199, 0.12);
  color: #0284c7;
}

[data-theme="dark"] .status-badge.learning,
[data-theme="dark"] .status-badge.studying {
  background-color: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.status-badge.not-started {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
}

.table-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.table-remove-btn:hover {
  opacity: 1;
  background-color: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ==========================================================================
   Stats View
   ========================================================================== */

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .stats-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .stats-summary-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-sizing: border-box;
}

.stat-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--bg-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.stat-unit {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-muted);
}

.section-sub-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.history-title {
  font-weight: 600;
  color: var(--text-primary);
}

.history-level-tag {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.history-score {
  font-weight: 700;
  font-size: 0.95rem;
}

.history-score.good {
  color: var(--success-text);
}

.history-score.fair {
  color: var(--text-primary);
}

/* CEFR Level Mastery Breakdown */
.stats-level-breakdown-card {
  width: 100%;
  box-sizing: border-box;
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.stats-quiz-history {
  width: 100%;
  box-sizing: border-box;
}

.level-breakdown-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.level-breakdown-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.level-breakdown-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.level-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .level-breakdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .level-breakdown-grid {
    grid-template-columns: 1fr;
  }
}

.level-breakdown-col {
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.level-badge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cefr-tag {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.cefr-tag.a2 { background-color: #e0f2fe; color: #0369a1; }
.cefr-tag.b1 { background-color: #fef3c7; color: #b45309; }
.cefr-tag.b2 { background-color: #dcfce7; color: #15803d; }
.cefr-tag.c1 { background-color: #f3e8ff; color: #7e22ce; }

[data-theme="dark"] .cefr-tag.a2 { background-color: rgba(3, 105, 161, 0.25); color: #7dd3fc; }
[data-theme="dark"] .cefr-tag.b1 { background-color: rgba(180, 83, 9, 0.25); color: #fde68a; }
[data-theme="dark"] .cefr-tag.b2 { background-color: rgba(21, 128, 61, 0.25); color: #86efac; }
[data-theme="dark"] .cefr-tag.c1 { background-color: rgba(126, 34, 206, 0.25); color: #d8b4fe; }

.level-col-count {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.level-col-unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.level-col-progress-bar {
  width: 100%;
  height: 4px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.25rem;
}

.level-col-progress-fill {
  height: 100%;
  background-color: var(--accent);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* ==========================================
   Vocabulary Hub & Practice Launchers Grid
   ========================================== */

.vocab-hub-container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.vocab-practice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 960px) {
  .vocab-practice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .vocab-practice-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.launch-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-due-badge {
  background-color: #f59e0b;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .card-due-badge {
  background-color: #d97706;
}



.practice-launch-card {
  background-color: var(--bg-secondary);
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.launch-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: var(--bg-tertiary);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.launch-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.launch-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.launch-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.35;
}

.launch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ==========================================
   Separate Practice Session View
   ========================================== */

.practice-session-container {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 2.5rem;
}

.practice-session-topbar {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.75rem;
  width: 100%;
}

.session-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  padding: 0;
}

.session-close-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  transform: scale(1.08);
}

.session-progress-track {
  flex: 1;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.session-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary, #2563eb), #3b82f6);
  border-radius: 999px;
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.session-counter {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 44px;
  text-align: right;
  letter-spacing: 0.02em;
}

.practice-arena {
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
  min-height: 420px;
}

/* ==========================================
   Session Reinforcement & Multi-Step Progress
   ========================================== */
.session-reinforce-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.session-reinforce-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-tertiary);
}

.reinforce-dots-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.2rem;
}

.reinforce-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reinforce-dot.done {
  background-color: #10b981;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
  transform: scale(1.15);
}

.session-overall-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background-color: var(--bg-secondary);
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-tertiary);
}

/* ==========================================
   Spaced Practice Rating Actions
   ========================================== */
.deck-top-left {
  display: flex;
  align-items: center;
}

.srs-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 530px;
  margin: 1.5rem auto 0;
}

.fc-nav-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--bg-tertiary);
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.fc-nav-arrow-btn:hover:not(:disabled) {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
  transform: translateY(-1px);
}

.fc-nav-arrow-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: var(--bg-tertiary);
}

.btn-srs-rate {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 44px;
  padding: 0 0.85rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Forgot Button */
.btn-srs-forgot {
  background-color: #fff5f5;
  border-color: #fed7d7;
  color: #e53e3e;
}
.btn-srs-forgot:hover {
  background-color: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(229, 62, 62, 0.16);
}

/* Got It Button */
.btn-srs-gotit {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}
.btn-srs-gotit:hover {
  background-color: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.16);
}

/* Know Well Button */
.btn-srs-knowwell {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}
.btn-srs-knowwell:hover {
  background-color: #dcfce7;
  border-color: #86efac;
  color: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.16);
}

/* Dark Mode Theme Support */
[data-theme="dark"] .btn-srs-forgot {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
  color: #fca5a5;
}
[data-theme="dark"] .btn-srs-forgot:hover {
  background-color: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ffffff;
}

[data-theme="dark"] .btn-srs-gotit {
  background-color: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.28);
  color: #93c5fd;
}
[data-theme="dark"] .btn-srs-gotit:hover {
  background-color: rgba(37, 99, 235, 0.22);
  border-color: rgba(37, 99, 235, 0.45);
  color: #ffffff;
}

[data-theme="dark"] .btn-srs-knowwell {
  background-color: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.28);
  color: #86efac;
}
[data-theme="dark"] .btn-srs-knowwell:hover {
  background-color: rgba(22, 163, 74, 0.22);
  border-color: rgba(22, 163, 74, 0.45);
  color: #ffffff;
}

/* ==========================================
   Practice Mini-Games (Fill-in-Blank & Speed Match)
   ========================================== */
.practice-game-container {
  max-width: 680px;
  margin: 0 auto 3rem;
}

.game-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.game-progress-tag,
.game-score-tag,
.speedmatch-timer {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-tertiary);
}

.fillblank-box {
  animation: questionSlideIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.fillblank-box.is-leaving {
  animation: questionSlideOut 0.18s cubic-bezier(0.4, 0, 1, 1) forwards !important;
}

@keyframes questionSlideIn {
  0% {
    opacity: 0;
    transform: translateX(24px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes questionSlideOut {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-24px);
  }
}

.fillblank-sentence-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.fillblank-prompt-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.fillblank-sentence {
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-primary);
}

.fillblank-pos-sub {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.6;
  margin-top: 0.55rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

.fillblank-def-hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--bg-tertiary);
}

/* ==========================================
   Fill in the Blank (Active Recall Writing)
   ========================================== */
.fillblank-write-form {
  margin-bottom: 1.5rem;
}

.fillblank-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.fillblank-write-input {
  flex: 1;
  height: 48px;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0 1.25rem;
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.fillblank-write-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.fillblank-write-input.correct {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.08) !important;
  color: #10b981 !important;
}

.fillblank-write-input.wrong {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.08) !important;
  color: #ef4444 !important;
}

.btn-fillblank-submit {
  height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--radius-lg);
  background-color: var(--accent);
  color: #ffffff;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  font-family: inherit;
}

.btn-fillblank-submit:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.fillblank-feedback-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fillblank-feedback-box.correct {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.fillblank-feedback-box.wrong {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.feedback-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.feedback-badge {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.feedback-badge.correct {
  background-color: #10b981;
  color: #ffffff;
}

.feedback-badge.wrong {
  background-color: #ef4444;
  color: #ffffff;
}

.feedback-word {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feedback-answer-text {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.feedback-answer-text strong {
  color: #ef4444;
  font-size: 1.05rem;
}

.feedback-audio-btn {
  background: var(--bg-tertiary);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.feedback-audio-btn:hover {
  background-color: var(--accent);
  color: #ffffff;
  transform: scale(1.08);
}

.btn-session-next {
  height: 44px;
  padding: 0 1.4rem;
  border-radius: var(--radius-md);
  background-color: var(--accent);
  color: #ffffff;
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.btn-session-next:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

/* ==========================================
   Multiple Choice Test Practice Mode
   ========================================== */
.test-options-grid,
.fillblank-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .test-options-grid,
  .fillblank-options-grid {
    grid-template-columns: 1fr;
  }
}

.test-opt-btn,
.fillblank-opt-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-secondary);
  border: 1.5px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.25rem;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.test-opt-btn:hover:not(:disabled),
.fillblank-opt-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background-color: var(--bg-primary);
  transform: translateY(-1px);
}

.test-opt-btn .opt-letter,
.fillblank-opt-btn .opt-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.test-opt-btn.correct,
.fillblank-opt-btn.correct {
  background-color: rgba(16, 185, 129, 0.12) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
}

.test-opt-btn.correct .opt-letter,
.fillblank-opt-btn.correct .opt-letter {
  background-color: #10b981 !important;
  color: #ffffff !important;
}

.test-opt-btn.wrong,
.fillblank-opt-btn.wrong {
  background-color: rgba(239, 68, 68, 0.1) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

.test-opt-btn.wrong .opt-letter,
.fillblank-opt-btn.wrong .opt-letter {
  background-color: #ef4444 !important;
  color: #ffffff !important;
}

.btn-fillblank-submit.correct {
  background-color: #10b981 !important;
}

.btn-fillblank-submit.wrong {
  background-color: #ef4444 !important;
}

.test-opt-btn.dimmed,
.fillblank-opt-btn.dimmed {
  opacity: 0.45;
}

.test-footer,
.fillblank-footer {
  display: flex;
  justify-content: flex-end;
}

/* Speed Match Board */
.speedmatch-instruction {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

.speedmatch-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 600px) {
  .speedmatch-board {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.speedmatch-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.col-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.match-tile {
  background-color: var(--bg-secondary);
  border: 1.5px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  min-height: 68px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.match-tile:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.match-tile.selected {
  border-color: var(--accent);
  background-color: rgba(3, 105, 161, 0.08);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.15);
}

.match-tile.matched {
  background-color: rgba(16, 185, 129, 0.12) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
  cursor: default;
}

.match-tile.shake-error {
  animation: tileShake 0.4s ease-in-out;
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.1) !important;
}

@keyframes tileShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.tile-check {
  font-weight: 800;
  color: #10b981;
}

/* Game Results Victory Card */
.game-results-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.game-results-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  background-color: #fef3c7;
  color: #b45309;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

[data-theme="dark"] .game-results-badge {
  background-color: rgba(180, 83, 9, 0.25);
  color: #fde68a;
}

.game-results-score {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.game-results-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.game-results-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================
   Progress View: Daily Streak & Consistency Banner
   ========================================= */
.stats-hero-banner {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

@media (max-width: 860px) {
  .stats-hero-banner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.streak-hero-left {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.streak-flame-large {
  font-size: 2.8rem;
  line-height: 1;
  transition: all 0.3s ease;
}

.streak-flame-large.active {
  animation: flameActiveGlow 2.4s infinite alternate ease-in-out;
  filter: drop-shadow(0 4px 14px rgba(234, 88, 12, 0.45));
}

.streak-flame-large.pending {
  animation: flameWarningPulse 2.2s infinite ease-in-out;
  filter: drop-shadow(0 2px 8px rgba(217, 119, 6, 0.35));
}

.streak-flame-large.inactive {
  opacity: 0.35;
  filter: grayscale(0.85);
}

@keyframes flameActiveGlow {
  0% { transform: scale(1); filter: drop-shadow(0 4px 10px rgba(234, 88, 12, 0.35)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 6px 18px rgba(234, 88, 12, 0.6)); }
}

@keyframes flameWarningPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; }
}

.streak-hero-text {
  flex: 1;
}

.streak-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.streak-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

/* Streak Status Badges */
.streak-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.streak-status-badge.secured {
  background-color: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

[data-theme="dark"] .streak-status-badge.secured {
  background-color: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.streak-status-badge.pending {
  background-color: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

[data-theme="dark"] .streak-status-badge.pending {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.streak-status-badge.inactive {
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
}

.streak-hero-sub {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.daily-goal-bar-wrap {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.daily-goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316 0%, #ea580c 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.daily-goal-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.streak-weekly-chart {
  background-color: var(--bg-primary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.weekly-chart-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.weekly-bars-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 90px;
  gap: 0.4rem;
}

.weekly-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 0.45rem;
  position: relative;
  cursor: pointer;
}

.weekly-bar-tooltip {
  position: absolute;
  top: -24px;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s ease;
  z-index: 5;
}

.weekly-bar-col:hover .weekly-bar-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.weekly-bar-track {
  width: 100%;
  max-width: 24px;
  height: 65px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.weekly-bar-fill {
  width: 100%;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  transition: height 0.3s ease;
}

.weekly-bar-col.active .weekly-bar-fill {
  background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
}

.weekly-bar-col.is-today .weekly-bar-track {
  box-shadow: 0 0 0 2px var(--accent);
}

.weekly-bar-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.weekly-bar-col.is-today .weekly-bar-label {
  color: var(--text-primary);
}

/* Flashcard Casual Browse Controls */
.fc-browse-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  width: 100%;
}

.fc-browse-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md, 10px);
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  color: var(--text-primary, #f8fafc);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fc-browse-btn:hover {
  background: var(--bg-tertiary, #334155);
  transform: translateY(-1px);
}

.fc-flip-action-btn {
  background: var(--accent-primary, #2563eb);
  color: #fff;
  border: none;
}

.fc-flip-action-btn:hover {
  background: var(--accent-hover, #1d4ed8);
}

/* Dual Drill Step Badge */
.drill-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent-primary, #3b82f6);
  border: 1px solid rgba(37, 99, 235, 0.2);
  margin-bottom: 0.75rem;
}

/* Diagnostic Test Format Selection Card */
.test-format-selection-card {
  max-width: 620px;
  margin: 1.5rem auto;
  padding: 2.25rem 2rem;
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: var(--radius-xl, 16px);
  text-align: center;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
}

.test-format-badge {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  background: var(--bg-tertiary, #334155);
  color: var(--text-muted, #94a3b8);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.test-format-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary, #f8fafc);
  margin: 0 0 0.5rem;
}

.test-format-header p {
  font-size: 0.92rem;
  color: var(--text-secondary, #cbd5e1);
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

.test-format-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .test-format-options {
    grid-template-columns: 1fr 1fr;
  }
}

.test-format-option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 1.4rem;
  background: var(--bg-tertiary, #334155);
  border: 2px solid transparent;
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  color: var(--text-primary, #f8fafc);
}

.test-format-option-btn:hover {
  border-color: var(--accent-primary, #3b82f6);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -6px rgba(0,0,0,0.3);
}

.format-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.format-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text-primary, #f8fafc);
}

.format-info p {
  font-size: 0.82rem;
  color: var(--text-secondary, #94a3b8);
  margin: 0;
  line-height: 1.4;
}

.format-arrow {
  margin-top: 1rem;
  font-weight: 800;
  color: var(--accent-primary, #3b82f6);
  font-size: 1.2rem;
  align-self: flex-end;
}

/* Test Summary Report */
.test-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 280px;
  overflow-y: auto;
  margin: 1.25rem 0 1.5rem;
  padding: 0.25rem;
  text-align: left;
}

.test-result-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--bg-tertiary, #334155);
  border-radius: var(--radius-md, 8px);
  font-size: 0.9rem;
}

.test-result-row.correct {
  border-left: 3px solid #10b981;
}

.test-result-row.wrong {
  border-left: 3px solid #ef4444;
}

.result-status-icon {
  font-weight: 800;
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.test-result-row.correct .result-status-icon {
  color: #10b981;
}

.test-result-row.wrong .result-status-icon {
  color: #ef4444;
}

.result-word {
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  flex-shrink: 0;
}

.result-user-ans {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  margin-left: auto;
  padding-right: 0.5rem;
}

.result-audio-btn {
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-left: auto;
}

.result-audio-btn:hover {
  color: var(--text-primary, #f8fafc);
}


