/* ==========================================================================
   Views & Modules Stylesheet (Dashboard, Exams, Lectures, Stats, etc.)
   ========================================================================== */

/* --- Common View Header --- */
.view-header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.view-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.view-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   1. DASHBOARD VIEW
   ========================================================================== */

.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Hero / Welcome Card */
.dashboard-hero-banner {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
  position: relative;
  overflow: hidden;
}

.dashboard-hero-banner::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.hero-left {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 1;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.92;
}

.hero-countdown-box {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  z-index: 1;
}

.hero-days-number {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
}

.hero-days-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

/* Stats Cards Grid */
.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.summary-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.summary-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Quick Subject Practice Cards */
.section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subject-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.subject-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.subject-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.subject-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subject-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

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

.subject-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.subject-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* ==========================================================================
   2. ÇIKMIŞ SORULAR VIEW
   ========================================================================== */

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.filter-tab-btn.active, .filter-tab-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.years-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.year-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  position: relative;
}

.year-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 20px var(--primary-glow);
}

.year-number {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-primary);
}

.year-badge-tag {
  align-self: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   3. FLASHCARDS (BİLGİ KARTLARI) VIEW
   ========================================================================== */

.flashcard-wrapper {
  max-width: 680px;
  margin: 2rem auto;
  perspective: 1000px;
}

.flashcard {
  width: 100%;
  min-height: 360px;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow var(--transition-fast);
  position: relative;
}

.flashcard:hover {
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.15);
}

.flashcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flashcard-body {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  color: var(--text-primary);
  margin: 1.5rem 0;
  white-space: pre-line;
}

.flashcard-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.flashcard-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ==========================================================================
   4. SCORE CALCULATOR (PUAN HESAPLAMA)
   ========================================================================== */

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.calc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.calc-input-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.calc-input {
  width: 100%;
  padding: 0.6rem;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 700;
  color: var(--text-primary);
}

.calc-input:focus {
  border-color: var(--primary);
}

.score-result-badge {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

.score-big-number {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

/* ==========================================================================
   5. SETTINGS & BACKUP (AYARLAR VE YEDEKLEME)
   ========================================================================== */

.settings-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

.settings-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.settings-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.settings-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   6. COMPREHENSIVE LECTURES (KONU ANLATIMI STYLES)
   ========================================================================== */

.lecture-unit-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.lecture-unit-body h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

.lecture-unit-body p {
  color: var(--text-secondary);
}

.lecture-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.88rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.lecture-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-color);
}

.lecture-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.lecture-table tr:hover {
  background: var(--bg-surface-elevated);
}

.alert-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.6;
}

.alert-box.tip {
  background: rgba(245, 158, 11, 0.12);
  border-left: 4px solid #f59e0b;
  color: var(--text-primary);
}

/* Topic Pills Selector */
.topic-pill-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.topic-pill-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.topic-pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Math Formula Cards */
.math-formula-box {
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-color);
  border-left: 5px solid var(--purple);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.formula-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.formula-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* ÖSYM Trap Callout Box */
.osym-trap-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  border-left: 5px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin: 1.25rem 0;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.06);
}

.osym-trap-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--danger);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.osym-trap-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-primary);
}

/* ÖSYM Golden Rule Callout Box */
.osym-golden-rule {
  background: rgba(245, 158, 11, 0.09);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-left: 5px solid var(--warning);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin: 1.25rem 0;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.06);
}

.osym-golden-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #d97706;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.osym-golden-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-primary);
}

/* Mnemonic / Akrostiş Memory Card */
.mnemonic-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.09) 0%, rgba(59, 130, 246, 0.09) 100%);
  border: 1.5px solid rgba(139, 92, 246, 0.35);
  border-left: 5px solid var(--purple);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin: 1.25rem 0;
}

.mnemonic-header {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.mnemonic-code {
  display: inline-block;
  background: var(--purple);
  color: #ffffff;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* Interactive Worked Example Card */
.worked-example-card {
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 1.25rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.worked-example-header {
  padding: 0.9rem 1.25rem;
  background: rgba(59, 130, 246, 0.07);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.worked-example-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.worked-example-body {
  padding: 1.1rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.example-solution-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.example-solution-toggle:hover {
  background: var(--bg-surface-elevated);
}

.example-solution-content {
  display: none;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border-top: 1px dashed var(--border-color);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.example-solution-content.is-open {
  display: block;
}

/* Topic Table of Contents Pills */
.topic-toc-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.topic-toc-pill {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.topic-toc-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-surface);
}

/* Topic Progress & Completion Button */
.topic-progress-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.topic-progress-btn.completed {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}


/* ==========================================================================
   SIDE-BY-SIDE DUAL PANEL LECTURE SELECTOR
   ========================================================================== */

.lectures-control-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .lectures-control-grid {
    grid-template-columns: 1fr;
  }
}

.panel-header-mini {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* SOL PANEL: DERS SEÇİMİ */
.branch-selector-panel {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.branch-list-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.branch-btn-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.branch-btn-item:hover {
  background: var(--bg-surface-elevated);
}

.branch-btn-item.active {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 2px 10px var(--primary-glow);
}

.branch-btn-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.branch-btn-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.branch-btn-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.branch-btn-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.branch-btn-arrow {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.branch-btn-item.active .branch-btn-arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* SAĞ PANEL: KONU SEÇİMİ & ARAMA */
.topic-selector-panel {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.topic-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.lecture-search-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  flex: 1;
  max-width: 380px;
}

.lecture-search-wrapper input {
  border: none;
  background: transparent;
  font-size: 0.88rem;
  color: var(--text-primary);
  width: 100%;
}

.lecture-search-wrapper input:focus {
  outline: none;
}

.topic-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}

.topic-chip-card {
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: all var(--transition-fast);
}

.topic-chip-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.topic-chip-card.active {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.chip-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.topic-chip-card.active .chip-title {
  color: var(--primary);
}

.chip-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}



/* ==========================================================================
   7. MOBILE RESPONSIVE STYLES FOR ALL VIEWS
   ========================================================================== */

@media (max-width: 900px) {
  .content-container {
    padding: 1.25rem 1rem;
    padding-bottom: 5.5rem; /* Space for mobile navigation bar */
  }

  .dashboard-hero-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
  }

  .hero-countdown-box {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
  }

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

  .calc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .view-title {
    font-size: 1.35rem;
  }

  .exam-list-card {
    padding: 1rem !important;
    gap: 1rem !important;
  }

  .exam-list-card > div:nth-child(2) {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .filter-tabs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .filter-tab-btn {
    flex-shrink: 0;
  }

  .lecture-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

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

  .hero-title {
    font-size: 1.35rem;
  }

  .calc-input-row {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    font-size: 0.82rem;
  }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.06);
  z-index: 950;
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 900px) {
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.mobile-nav-btn svg {
  width: 20px;
  height: 20px;
}

.mobile-nav-btn.active {
  color: var(--primary);
}

.mobile-nav-btn.active svg {
  stroke-width: 2.5;
}

/* ==========================================================================
   8. POMODORO FLOATING WIDGET
   ========================================================================== */

.pomodoro-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  z-index: 900;
  transition: all var(--transition-fast);
}

.pomodoro-pill:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.pomo-icon {
  font-size: 1.15rem;
}

.pomo-timer {
  font-family: monospace;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.pomo-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--text-muted);
}

.pomo-dot.running {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 1.5s infinite;
}

.pomodoro-modal {
  display: none;
  position: fixed;
  bottom: 75px;
  right: 24px;
  width: 300px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 1.25rem;
  z-index: 900;
  flex-direction: column;
}

.pomodoro-modal.active {
  display: flex;
}

.pomo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.6rem;
  margin-bottom: 0.85rem;
}

.pomo-modes {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.pomo-mode-btn {
  flex: 1;
  font-size: 0.72rem;
  padding: 0.35rem 0.2rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
}

.pomo-mode-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pomo-big-clock {
  font-family: monospace;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-primary);
  text-align: center;
  margin: 0.5rem 0 1rem;
}

.pomo-controls {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .pomodoro-pill {
    bottom: 74px; /* Above mobile bottom bar */
    right: 16px;
  }
  .pomodoro-modal {
    bottom: 125px;
    right: 16px;
  }
}

/* ==========================================================================
   9. PRINT STYLESHEET (PDF & PAPER PRINT)
   ========================================================================== */

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .sidebar,
  .app-header,
  .mobile-bottom-nav,
  .pomodoro-pill,
  .pomodoro-modal,
  .filter-bar,
  .btn,
  .quiz-top-bar,
  #modal-container {
    display: none !important;
  }

  .app-main {
    margin: 0 !important;
    padding: 0 !important;
  }

  .question-card {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 1.5rem;
    padding: 1rem !important;
  }

  .option-item {
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #000 !important;
  }

  .option-key {
    background: #eee !important;
    color: #000 !important;
    border: 1px solid #999 !important;
  }
}



