/* ==========================================================================
   LUCAS 3A LEARNING HUB - DESIGN SYSTEM & STYLESHEET
   Brand: SISS Sydney International School System
   ========================================================================== */

:root {
  /* Brand Palettes */
  --siss-primary: #8A1538;
  --siss-primary-hover: #A31C44;
  --siss-primary-light: rgba(138, 21, 56, 0.15);
  --siss-gold: #E5A823;

  /* Neutrals & Surfaces */
  --bg-dark: #090D16;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-card-hover: rgba(26, 35, 54, 0.95);
  --bg-surface: #111726;
  --bg-surface-elevated: #1A2234;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(138, 21, 56, 0.5);

  /* Typography Colors */
  --text-main: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #090D16;

  /* Subject Accent Colors */
  --subj-english: #38BDF8;
  --subj-english-bg: rgba(56, 189, 248, 0.12);
  --subj-maths: #A855F7;
  --subj-maths-bg: rgba(168, 85, 247, 0.12);
  --subj-toan: #C084FC;
  --subj-toan-bg: rgba(192, 132, 252, 0.12);
  --subj-science: #34D399;
  --subj-science-bg: rgba(52, 211, 153, 0.12);
  --subj-khtn: #2DD4BF;
  --subj-khtn-bg: rgba(45, 212, 191, 0.12);
  --subj-hsie: #FBBF24;
  --subj-hsie-bg: rgba(251, 191, 36, 0.12);
  --subj-van: #FB7185;
  --subj-van-bg: rgba(251, 113, 133, 0.12);
  --subj-sudia: #FB923C;
  --subj-sudia-bg: rgba(251, 146, 60, 0.12);
  --subj-pdhpe: #F87171;
  --subj-pdhpe-bg: rgba(248, 113, 113, 0.12);
  --subj-ict: #22D3EE;
  --subj-ict-bg: rgba(34, 211, 238, 0.12);
  --subj-arts: #F472B6;
  --subj-arts-bg: rgba(244, 114, 182, 0.12);
  --subj-music: #818CF8;
  --subj-music-bg: rgba(129, 140, 248, 0.12);

  /* Shadows & Glass */
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-hover: 0 20px 35px -10px rgba(0, 0, 0, 0.7), 0 0 15px rgba(138, 21, 56, 0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-normal: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Glow Orbs */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.orb-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--siss-primary) 0%, transparent 70%);
  top: -150px;
  left: -150px;
}
.orb-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #1E3A8A 0%, transparent 70%);
  top: 40%;
  right: -100px;
}
.orb-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #0F766E 0%, transparent 70%);
  bottom: -150px;
  left: 20%;
}

/* App Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ================= HEADER ================= */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-crest {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--siss-primary) 0%, #4E0B1E 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: #FFF;
  box-shadow: 0 4px 15px rgba(138, 21, 56, 0.4);
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.school-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--siss-gold);
  text-transform: uppercase;
}

.portal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #FFF;
  line-height: 1.2;
}

.student-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 40px;
}

.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: #FFF;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.student-info {
  display: flex;
  flex-direction: column;
}

.student-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-role {
  background: var(--siss-primary);
  color: #FFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.student-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-clock-card {
  text-align: right;
}

.clock-time {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.clock-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sync-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10B981;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ================= NAVIGATION ================= */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

.tab-icon {
  width: 18px;
  height: 18px;
}

.nav-tab:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: #FFF;
  background: linear-gradient(135deg, var(--siss-primary) 0%, #680E28 100%);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(138, 21, 56, 0.35);
}

.tab-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #FFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

.tab-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}
.nav-tab.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFF;
}

.day-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switcher-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.custom-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: var(--transition-normal);
}
.custom-select:focus {
  border-color: var(--siss-primary);
  box-shadow: 0 0 0 2px rgba(138, 21, 56, 0.2);
}

/* ================= TAB PANES ================= */
.content-wrapper {
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}
.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= TAB 1: PREPARATION WIZARD ================= */
.prep-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(138, 21, 56, 0.25) 0%, rgba(18, 24, 38, 0.9) 60%, rgba(30, 58, 138, 0.2) 100%);
  border: 1px solid rgba(138, 21, 56, 0.3);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.prep-sub-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--siss-gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.prep-main-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 8px;
}

.prep-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 680px;
}

.prep-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  min-width: 380px;
}

.prep-stat-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  transition: var(--transition-normal);
}
.prep-stat-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.prep-stat-icon {
  font-size: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prep-stat-info {
  display: flex;
  flex-direction: column;
}

.prep-stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFF;
  line-height: 1.2;
}

.prep-stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.prep-section-block {
  margin-bottom: 24px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-icon {
  width: 20px;
  height: 20px;
  color: var(--siss-gold);
}

.section-tag {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

/* Period Cards in Prep View - 2 Column Grid */
.tomorrow-periods-grid,
.tomorrow-periods-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.period-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.period-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.period-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--subj-accent, #3B82F6);
}

.period-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.period-time-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.period-badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--subj-accent-bg, rgba(59, 130, 246, 0.15));
  color: var(--subj-accent, #38BDF8);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.period-subject-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 6px;
}

.period-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.prep-instructions-box {
  background: linear-gradient(135deg, rgba(229, 168, 35, 0.1) 0%, rgba(20, 26, 40, 0.6) 100%);
  border-left: 4px solid var(--siss-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #F1F5F9;
  margin-bottom: 14px;
  border-top: 1px solid rgba(229, 168, 35, 0.15);
  border-right: 1px solid rgba(229, 168, 35, 0.1);
  border-bottom: 1px solid rgba(229, 168, 35, 0.1);
}
.prep-prep-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--siss-gold);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.prep-prep-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.45;
}

/* Attached Files inside Period Card */
.attached-docs-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.attached-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.attached-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attached-file-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: var(--transition-normal);
  text-decoration: none;
  color: inherit;
}
.attached-file-pill:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.15);
}

.attached-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.file-ext-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.file-ext-badge.pptx { background: #E11D48; color: #FFF; }
.file-ext-badge.pdf { background: #DC2626; color: #FFF; }
.file-ext-badge.docx { background: #2563EB; color: #FFF; }

.attached-file-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.btn-open-file {
  font-size: 0.75rem;
  font-weight: 700;
  color: #38BDF8;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  cursor: pointer;
  transition: var(--transition-normal);
}
.btn-open-file:hover {
  background: #38BDF8;
  color: #090D16;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--siss-gold);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-normal);
}
.btn-text-action:hover {
  color: #FFF;
  transform: translateX(3px);
}

/* ================= SECTION 3: ESSENTIAL REMINDERS GRID ================= */
.prep-reminders-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.reminder-card-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
}
.reminder-card-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.reminder-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.reminder-text-box {
  flex: 1;
}

.reminder-item-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 4px;
}

.reminder-item-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.reminder-item-desc strong {
  color: var(--siss-gold);
}

/* ================= TAB 2: TIMETABLE VIEW ================= */
.timetable-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFF;
}
.section-subheading {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.day-filter-pills {
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.pill {
  padding: 6px 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-normal);
}
.pill:hover {
  color: #FFF;
}
.pill.active {
  background: var(--siss-primary);
  color: #FFF;
}

.timetable-grid-view {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.timetable-day-col {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.timetable-day-col.today {
  border-color: var(--siss-primary);
  box-shadow: 0 0 20px rgba(138, 21, 56, 0.25);
}

.day-col-header {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFF;
}
.day-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--siss-primary-light);
  color: #FFA5B8;
}

.timetable-period-block {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-normal);
  position: relative;
}
.timetable-period-block:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.timetable-period-block.break-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  padding: 8px 12px;
}

.block-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.block-subject {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.block-teacher {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.block-room {
  font-size: 0.68rem;
  color: var(--siss-gold);
  font-weight: 600;
  margin-top: 2px;
}

/* ================= TAB 3: RESOURCE LIBRARY ================= */
.resources-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  min-width: 320px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.search-box input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #FFF;
  font-size: 0.85rem;
  outline: none;
}
.search-box input:focus {
  border-color: var(--siss-primary);
}

.filter-dropdowns {
  display: flex;
  gap: 8px;
}

.resource-summary-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.resource-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: var(--transition-normal);
}
.resource-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-hover);
}

.res-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.res-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.res-icon-box.pptx { background: rgba(225, 29, 72, 0.2); color: #FB7185; border: 1px solid rgba(225, 29, 72, 0.4); }
.res-icon-box.pdf { background: rgba(220, 38, 38, 0.2); color: #F87171; border: 1px solid rgba(220, 38, 38, 0.4); }
.res-icon-box.docx { background: rgba(37, 99, 235, 0.2); color: #60A5FA; border: 1px solid rgba(37, 99, 235, 0.4); }

.res-details {
  overflow: hidden;
}

.res-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFF;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.res-folder {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.res-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.res-meta-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.res-size {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.res-subject-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.res-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-card-open {
  background: var(--siss-primary-light);
  border: 1px solid rgba(138, 21, 56, 0.3);
  color: #FFA5B8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition-normal);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.btn-card-open:hover {
  background: var(--siss-primary);
  color: #FFF;
}

.btn-card-canvas {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.25) 0%, rgba(159, 18, 57, 0.35) 100%);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #FECDD3;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition-normal);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.btn-card-canvas:hover {
  background: #E11D48;
  color: #FFF;
  border-color: #E11D48;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.btn-open-canvas {
  font-size: 0.75rem;
  font-weight: 700;
  color: #FDA4AF;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(225, 29, 72, 0.18);
  border: 1px solid rgba(225, 29, 72, 0.35);
  cursor: pointer;
  transition: var(--transition-normal);
  white-space: nowrap;
}
.btn-open-canvas:hover {
  background: #E11D48;
  color: #FFF;
}

.res-week-tag {
  background: rgba(14, 165, 233, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(14, 165, 233, 0.3);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

/* ================= TAB 4: TASK TRACKER ================= */
.tasks-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
}

.task-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.custom-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-group textarea,
.form-group input[type="date"] {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: #FFF;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}
.form-group textarea:focus,
.form-group input[type="date"]:focus {
  border-color: var(--siss-primary);
}

.form-row {
  display: flex;
  gap: 12px;
}
.col-half {
  flex: 1;
}

.btn-primary-full {
  background: linear-gradient(135deg, var(--siss-primary) 0%, var(--siss-primary-hover) 100%);
  border: none;
  color: #FFF;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-normal);
  margin-top: 8px;
}
.btn-primary-full:hover {
  box-shadow: 0 4px 15px rgba(138, 21, 56, 0.4);
}

.task-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.task-filter-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.task-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition-normal);
}
.task-tab-btn:hover {
  color: #FFF;
}
.task-tab-btn.active {
  color: #FFF;
  background: var(--bg-surface-elevated);
}

.tasks-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-card-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
}
.task-card-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.task-card-item.done {
  opacity: 0.6;
}

.task-main-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  margin-top: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.task-card-item.done .task-checkbox {
  background: #10B981;
  border-color: #10B981;
}

.task-desc-block {
  flex: 1;
}
.task-title-line {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}
.task-card-item.done .task-title-line {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.priority-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}
.priority-pill.high { background: rgba(239, 68, 68, 0.2); color: #F87171; }
.priority-pill.medium { background: rgba(234, 179, 8, 0.2); color: #FACC15; }
.priority-pill.low { background: rgba(16, 185, 129, 0.2); color: #34D399; }

.btn-delete-task {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.btn-delete-task:hover {
  color: #EF4444;
}

/* ================= TOMORROW VOCABULARY FOCUS WIDGET ================= */
.tomorrow-vocab-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  margin-top: 20px;
}

.tomorrow-vocab-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.tomorrow-vocab-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
}
.tomorrow-vocab-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(3px);
}

.tv-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.tv-subject-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.tv-term-block {
  display: flex;
  flex-direction: column;
}

.tv-term-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.tv-term {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.96rem;
  color: #FFFFFF;
}

.tv-phonetic {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.tv-pos {
  font-size: 0.7rem;
  color: #94A3B8;
  font-weight: 500;
}

.tv-meaning {
  font-size: 0.82rem;
  color: #CBD5E1;
  margin-top: 2px;
  line-height: 1.35;
}

.tv-audio-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #38BDF8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.tv-audio-btn:hover {
  background: #38BDF8;
  color: #0B1120;
  transform: scale(1.1);
}

.empty-vocab-hint {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ================= BNSW VOCABULARY HERO & STATS ================= */
.vocab-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, rgba(138, 21, 56, 0.25) 0%, rgba(30, 41, 59, 0.6) 100%);
  border: 1px solid rgba(138, 21, 56, 0.35);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 24px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.vocab-hero-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(138, 21, 56, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.vocab-hero-main {
  max-width: 680px;
}

.vocab-hero-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 6px 0 10px;
  letter-spacing: -0.3px;
}

.vocab-hero-desc {
  font-size: 0.88rem;
  color: #CBD5E1;
  line-height: 1.55;
}

.vocab-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.btn-primary-accent {
  background: linear-gradient(135deg, #8A1538 0%, #B91C1C 100%);
  color: #FFFFFF;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(138, 21, 56, 0.4);
  transition: var(--transition-fast);
}
.btn-primary-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 21, 56, 0.6);
  background: linear-gradient(135deg, #A81D46 0%, #DC2626 100%);
}

.vocab-quick-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.vstat-item strong {
  color: #FFFFFF;
  font-weight: 700;
}
.vstat-dot {
  color: rgba(255, 255, 255, 0.2);
}

/* ================= VOCABULARY TOOLBAR ================= */
.vocab-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.vocab-toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.vocab-subject-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vpill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}
.vpill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}
.vpill.active {
  background: #FFFFFF;
  color: #090D16;
  border-color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
}

/* Subject Specific Accents */
.vpill-eng.active { background: #A855F7; color: #FFFFFF; border-color: #A855F7; box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4); }
.vpill-sci.active { background: #10B981; color: #042F2E; border-color: #10B981; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4); }
.vpill-mat.active { background: #38BDF8; color: #082F49; border-color: #38BDF8; box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4); }
.vpill-hsi.active { background: #F97316; color: #FFFFFF; border-color: #F97316; box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4); }
.vpill-custom.active { background: #EC4899; color: #FFFFFF; border-color: #EC4899; box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4); }

.vocab-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.vocab-search {
  flex: 1;
  min-width: 280px;
}

.vocab-select {
  min-width: 240px;
}

.vocab-toolbar-right {
  display: flex;
  align-items: center;
}

.view-mode-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}
.view-btn:hover {
  color: var(--text-primary);
}
.view-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

/* ================= 3D FLASHCARD SPOTLIGHT ================= */
.flashcard-spotlight-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
}

.spotlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.spotlight-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
}

.spotlight-counter {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.flashcard-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 18px;
}

.fc-nav-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.fc-nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.08);
}
.fc-nav-btn svg {
  width: 22px;
  height: 22px;
}

.flashcard-3d-wrap {
  width: 100%;
  max-width: 640px;
  height: 350px;
  perspective: 1200px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: var(--radius-xl);
}

.flashcard-3d-wrap.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  user-select: none;
}

/* Front Face */
.flashcard-front {
  background: linear-gradient(145deg, rgba(26, 36, 56, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.fc-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fc-subject-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.6px;
}
.fc-subject-tag.eng { background: rgba(168, 85, 247, 0.2); color: #C084FC; border: 1px solid rgba(168, 85, 247, 0.3); }
.fc-subject-tag.sci { background: rgba(16, 185, 129, 0.2); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }
.fc-subject-tag.mat { background: rgba(56, 189, 248, 0.2); color: #38BDF8; border: 1px solid rgba(56, 189, 248, 0.3); }
.fc-subject-tag.hsi { background: rgba(249, 115, 22, 0.2); color: #FB923C; border: 1px solid rgba(249, 115, 22, 0.3); }
.fc-subject-tag.custom { background: rgba(236, 72, 153, 0.2); color: #F472B6; border: 1px solid rgba(236, 72, 153, 0.3); }

.fc-pos-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  font-style: italic;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

.fc-center-content {
  text-align: center;
  margin: auto 0;
}

.fc-term {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.fc-phonetic-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.fc-phonetic {
  font-size: 1.05rem;
  color: #94A3B8;
  font-family: 'Outfit', sans-serif;
}

.fc-audio-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38BDF8;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.fc-audio-btn:hover {
  background: #38BDF8;
  color: #0B1120;
  transform: scale(1.12);
}

.fc-audio-btn-sm {
  width: 30px;
  height: 30px;
}

.fc-topic-label {
  display: inline-block;
  font-size: 0.78rem;
  color: #64748B;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 12px;
  border-radius: 20px;
}

.fc-flip-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Back Face */
.flashcard-back {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.99));
  border: 1px solid rgba(138, 21, 56, 0.5);
  transform: rotateY(180deg);
}

.fc-back-meaning-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #F43F5E;
  letter-spacing: 0.5px;
}

.fc-back-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: auto 0;
}

.fc-meaning-vi {
  font-size: 1.15rem;
  font-weight: 700;
  color: #F8FAFC;
  line-height: 1.4;
}

.fc-definition-en {
  font-size: 0.85rem;
  color: #94A3B8;
  line-height: 1.45;
  font-style: italic;
}

.fc-example-box {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid #8A1538;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
}

.fc-ex-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #CBD5E1;
  margin-bottom: 4px;
}

.fc-example-text {
  font-size: 0.86rem;
  color: #E2E8F0;
  line-height: 1.4;
}

.fc-source-meta {
  font-size: 0.72rem;
  color: #64748B;
}

.spotlight-controls {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.btn-subtle-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-subtle-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

/* ================= VOCABULARY CARDS GRID ================= */
.vocab-grid-header {
  margin-top: 32px;
  margin-bottom: 18px;
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.vocab-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
  position: relative;
}
.vocab-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.vc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vc-term-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vc-term {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.vc-phonetic-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.vc-phonetic {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.vc-meaning-vi {
  font-size: 0.9rem;
  font-weight: 600;
  color: #F1F5F9;
  line-height: 1.4;
  margin-top: 4px;
}

.vc-definition-en {
  font-size: 0.78rem;
  color: #94A3B8;
  line-height: 1.35;
  font-style: italic;
}

.vc-example {
  background: rgba(0, 0, 0, 0.2);
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
  font-size: 0.78rem;
  color: #CBD5E1;
  line-height: 1.35;
}

.vc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-delete-custom-vocab {
  background: none;
  border: none;
  color: #EF4444;
  cursor: pointer;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.btn-delete-custom-vocab:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* ================= VOCABULARY TABLE VIEW ================= */
.vocab-table-view {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.custom-vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.custom-vocab-table th {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.custom-vocab-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #CBD5E1;
  vertical-align: middle;
}

.custom-vocab-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.vt-term {
  font-weight: 700;
  color: #FFFFFF;
  font-size: 0.95rem;
}

.vt-phonetic {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

/* ================= MODAL: ADD CUSTOM VOCABULARY ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-card {
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon-badge {
  font-size: 1.4rem;
  background: rgba(138, 21, 56, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.btn-close-modal:hover {
  color: #FFFFFF;
}

.modal-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.btn-subtle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.required {
  color: #EF4444;
}

/* ================= FOOTER ================= */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4px 8px;
  margin-top: 32px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .prep-hero-card {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .prep-summary-stats {
    min-width: unset;
    width: 100%;
  }
  .prep-reminders-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tasks-layout-grid {
    grid-template-columns: 1fr;
  }
  .timetable-grid-view {
    grid-template-columns: repeat(2, 1fr);
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 860px) {
  .tomorrow-periods-grid {
    grid-template-columns: 1fr;
  }
  .prep-reminders-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 12px;
  }
  .prep-summary-stats {
    grid-template-columns: 1fr;
  }
  .timetable-grid-view {
    grid-template-columns: 1fr;
  }
  .main-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-tabs {
    flex-wrap: wrap;
  }
}


/* ==========================================================================
   LUCAS 3A - DAILY PRACTICE & REVISION SYSTEM STYLES
   ========================================================================== */

/* Hero Banner */
.practice-hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)),
              radial-gradient(circle at top right, rgba(99, 102, 241, 0.2), transparent 50%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.practice-hero-banner::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-left {
  flex: 1;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.hero-desc {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  max-width: 750px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.btn-handbook-open {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-handbook-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.star-counter-box {
  background: rgba(254, 240, 138, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.35);
  padding: 10px 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}

.star-icon {
  font-size: 1.5rem;
  animation: pulseStar 2s infinite ease-in-out;
}

@keyframes pulseStar {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(8deg); }
}

.star-number {
  font-size: 1.6rem;
  font-weight: 900;
  color: #facc15;
  line-height: 1;
}

.star-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fef08a;
  text-transform: uppercase;
}

/* Schedule Card */
.daily-schedule-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.sch-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.day-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-day-btn {
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-day-btn:hover {
  background: rgba(71, 85, 105, 0.8);
  color: #fff;
}

.filter-day-btn.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Practice Controls Card */
.practice-controls-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.control-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #cbd5e1;
  min-width: 170px;
}

/* Level Switcher Group */
.level-switcher-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-level-btn {
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.filter-level-btn .btn-count-pill {
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  color: #94a3b8;
}

.filter-level-btn:hover {
  background: rgba(71, 85, 105, 0.8);
  color: #fff;
}

.filter-level-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #60a5fa;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.filter-level-btn.btn-lvl-core.active {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.filter-level-btn.btn-lvl-adv.active {
  background: linear-gradient(135deg, #f97316, #dc2626);
  border-color: #fb923c;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

/* Subject Filter Group */
.subject-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-sub-btn {
  background: rgba(51, 65, 85, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-sub-btn:hover {
  background: rgba(71, 85, 105, 0.7);
  color: #fff;
}

.filter-sub-btn.active {
  background: #475569;
  color: #38bdf8;
  border-color: #38bdf8;
  font-weight: 700;
}

/* Practice Meta Row */
.practice-meta-row {
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.search-box-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.search-box-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.9rem;
}

.search-box-wrap input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px 8px 36px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-box-wrap input:focus {
  border-color: #38bdf8;
}

.practice-utility-actions {
  display: flex;
  gap: 10px;
}

.btn-subtle {
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-subtle:hover {
  background: rgba(71, 85, 105, 0.8);
  color: #fff;
}

.btn-subtle.btn-muted {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

/* Practice Stats Bar */
.practice-stats-bar {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.stats-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1.1;
}

.stat-lbl {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.progress-track-wrap {
  flex: 1;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(51, 65, 85, 0.5);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #38bdf8);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: right;
}

.active-filter-badge {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* Practice Cards Stream */
.practice-cards-stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.practice-question-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.practice-question-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.practice-question-card.answered-correct {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.practice-question-card.answered-incorrect {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.q-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.subject-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}

.badge-maths {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-science {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-english {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-vietnamese {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.level-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}

.level-badge.core-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.level-badge.advanced-badge {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(220, 38, 38, 0.2));
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.q-index-pill {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.q-status-icon {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-won-star {
  font-size: 0.75rem;
  font-weight: 800;
  color: #facc15;
  background: rgba(250, 204, 21, 0.15);
  padding: 2px 6px;
  border-radius: 6px;
}

.q-prompt {
  font-size: 1.08rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.55;
  margin-bottom: 16px;
}

/* Options Grid */
.q-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 640px) {
  .q-options-grid {
    grid-template-columns: 1fr;
  }
}

.q-opt-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: #e2e8f0;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
}

.q-opt-btn:hover:not([disabled]) {
  background: rgba(51, 65, 85, 0.7);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.opt-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #cbd5e1;
  flex-shrink: 0;
}

.opt-text {
  flex: 1;
  line-height: 1.4;
}

.q-opt-btn.opt-correct {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #a7f3d0 !important;
}

.q-opt-btn.opt-correct .opt-letter {
  background: #10b981 !important;
  color: #ffffff !important;
}

.q-opt-btn.opt-incorrect {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

.q-opt-btn.opt-incorrect .opt-letter {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.q-opt-btn.opt-dimmed {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Explanation Box */
.q-explanation-box {
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 10px;
  animation: slideDownExpl 0.25s ease-out;
}

@keyframes slideDownExpl {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.q-explanation-box.box-correct {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.q-explanation-box.box-review {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.expl-header {
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: #f1f5f9;
}

.expl-body p {
  margin: 4px 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.expl-vi {
  color: #e2e8f0;
}

.expl-en {
  color: #cbd5e1;
  font-style: italic;
}

/* Empty State Card */
.empty-state-card {
  text-align: center;
  padding: 48px 24px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 16px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state-card h3 {
  font-size: 1.2rem;
  color: #fff;
  margin: 0 0 8px 0;
}

.empty-state-card p {
  color: #94a3b8;
  margin: 0 0 16px 0;
}

/* ==========================================================================
   HANDBOOK MODAL STYLES
   ========================================================================== */

.handbook-modal .modal-dialog {
  max-width: 850px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.handbook-modal-body {
  overflow-y: auto;
  padding: 20px 24px;
}

.handbook-tabs-nav {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px 12px;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.handbook-nav-tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.handbook-nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.handbook-nav-tab.active {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.handbook-subject-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.handbook-subject-hero .h-icon {
  font-size: 2.2rem;
}

.handbook-subject-hero h3 {
  margin: 0 0 4px 0;
  font-size: 1.25rem;
  color: #fff;
}

.handbook-subject-hero .h-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.handbook-pillars-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pillar-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
}

.pillar-card h4 {
  color: #38bdf8;
  font-size: 1.05rem;
  margin: 0 0 10px 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 6px;
}

.pillar-card ul {
  margin: 0;
  padding-left: 20px;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.6;
}

.pillar-card li {
  margin-bottom: 6px;
}


/* ==========================================================================
   TODAY & TOMORROW DUAL PREP & HOMEWORK STYLES
   ========================================================================== */

/* Mode Switcher Bar */
.prep-mode-switcher-bar {
  display: flex;
  gap: 12px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.prep-mode-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.prep-mode-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.prep-mode-btn.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.prep-mode-badge {
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  color: #e2e8f0;
}

/* Today & Tomorrow Section Blocks */
.today-section-block {
  border-left: 4px solid #3b82f6;
  padding-left: 18px;
  margin-bottom: 32px;
}

.tomorrow-section-block {
  border-left: 4px solid #10b981;
  padding-left: 18px;
  margin-bottom: 32px;
}

.section-badge-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: inline-block;
}

.section-badge-pill.today-pill {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.section-badge-pill.tomorrow-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.today-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.title-left {
  display: flex;
  flex-direction: column;
}

/* Homework Progress Track */
.hw-progress-track {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 240px;
}

.hw-progress-info {
  display: flex;
  justify-content: flex-end;
}

.hw-progress-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
}

.hw-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(51, 65, 85, 0.5);
  border-radius: 4px;
  overflow: hidden;
}

.hw-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Homework Celebration Banner */
.hw-celebration-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.25));
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  animation: bounceCelebration 0.4s ease-out;
}

@keyframes bounceCelebration {
  0% { transform: scale(0.95); opacity: 0; }
  60% { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); }
}

.hw-celebration-banner .celeb-icon {
  font-size: 2.2rem;
}

.hw-celebration-banner h4 {
  margin: 0 0 4px 0;
  color: #a7f3d0;
  font-size: 1.05rem;
}

.hw-celebration-banner p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
}

/* Today Periods Grid */
.today-periods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .today-periods-grid {
    grid-template-columns: 1fr;
  }
}

/* Today Period Card */
.today-period-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.today-period-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.today-period-card.hw-done {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.06);
}

/* Homework Interactive Box */
.hw-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hw-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hw-label-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hw-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.hw-status-badge.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hw-status-badge.status-done {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.hw-toggle-btn {
  background: rgba(51, 65, 85, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  width: 100%;
  justify-content: center;
}

.hw-toggle-btn:hover {
  background: rgba(71, 85, 105, 0.9);
  color: #fff;
}

.hw-toggle-btn.checked {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.hw-note-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hw-note-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: #cbd5e1;
  width: 100%;
  outline: none;
}

.hw-note-input:focus {
  border-color: #38bdf8;
}


/* ==========================================================================
   POKEMON COMPANION HERO & HOMEWORK TRACKER (NOTEDII SHEET)
   ========================================================================== */
.pokemon-companion-hero {
  background: linear-gradient(135deg, #111726, #1A233A);
  border: 1.5px solid rgba(249, 115, 22, 0.35);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.pokemon-companion-hero::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12), transparent 70%);
  pointer-events: none;
}

.poke-hero-sprite-col {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.poke-sprite-frame {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.6));
  border: 2px solid rgba(249, 115, 22, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.poke-glow-aura {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.3), transparent 70%);
  animation: poke-pulse 3s infinite alternate;
}

@keyframes poke-pulse {
  0% { transform: scale(0.95); opacity: 0.4; }
  100% { transform: scale(1.15); opacity: 0.9; }
}

.poke-active-sprite {
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
  animation: poke-float 3s ease-in-out infinite;
}

@keyframes poke-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.poke-stage-badge {
  position: absolute;
  bottom: -10px;
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #FFF;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4);
  white-space: nowrap;
  z-index: 3;
}

.poke-hero-info-col {
  flex: 1;
  min-width: 280px;
}

.poke-trainer-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.poke-level-badge {
  background: rgba(234, 179, 8, 0.18);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #EAB308;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.poke-type-badge {
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #FB923C;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.poke-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.poke-hero-name {
  font-size: 1.55rem;
  font-weight: 800;
  color: #FFFFFF;
}

.poke-hero-status {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38BDF8;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.poke-hero-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Pokemon EXP Progress Bar */
.poke-exp-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.poke-exp-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.poke-exp-text strong {
  color: #38BDF8;
}

.poke-next-evo-hint {
  color: #EAB308;
  font-weight: 600;
}

.poke-progress-track {
  position: relative;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: visible;
}

.poke-progress-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #F97316, #EAB308, #10B981);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.6);
}

.poke-marker {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 18px;
  background: rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Starter Selector & Actions */
.poke-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.poke-starter-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.selector-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.starter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.starter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFF;
}

.starter-btn.active {
  background: #F97316;
  color: #FFF;
  border-color: #F97316;
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.4);
}

.btn-open-poke-tracker {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFF;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-open-poke-tracker:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.poke-sparkle {
  display: inline-block;
  animation: sparkle-twinkle 1.5s infinite ease-in-out alternate;
}

@keyframes sparkle-twinkle {
  0% { transform: scale(0.8) rotate(0deg); opacity: 0.7; }
  100% { transform: scale(1.2) rotate(15deg); opacity: 1; }
}


/* ==========================================================================
   POKEMON HOMEWORK TRACKER MODAL (NOTEDII GOOGLE SHEET RECREATION)
   ========================================================================== */
.poke-tracker-modal-wrap .poke-tracker-dialog {
  width: 95vw;
  max-width: 1100px;
  max-height: 92vh;
  background: #0E131F;
  border: 2px solid #F97316;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  z-index: 9999;
}

.poke-dh-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 24px;
  background: #141B2D;
  border-bottom: 1px solid rgba(249, 115, 22, 0.3);
}

.poke-dh-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #F97316;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.poke-dh-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFF;
  margin-bottom: 4px;
}

.poke-dh-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.btn-close-poke {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
}

.btn-close-poke:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.1);
}

.poke-sheet-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  background: rgba(249, 115, 22, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.psh-avatar-box {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid #F97316;
  display: flex;
  align-items: center;
  justify-content: center;
}

.psh-sprite {
  max-width: 54px;
  max-height: 54px;
  object-fit: contain;
}

.psh-info {
  flex: 1;
  min-width: 240px;
}

.psh-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.psh-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFF;
}

.psh-level {
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(234, 179, 8, 0.2);
  color: #EAB308;
  padding: 2px 8px;
  border-radius: 6px;
}

.psh-status-pill {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.18);
  color: #38BDF8;
  padding: 2px 8px;
  border-radius: 6px;
}

.psh-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.psh-progress-bar-wrap {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.psh-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F97316, #EAB308, #10B981);
  transition: width 0.3s ease;
}

.psh-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-psh-tool {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-psh-tool:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFF;
}

/* Spreadsheet Table */
.poke-sheet-table-container {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 20px;
}

.poke-sheet-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.88rem;
}

.poke-sheet-table th {
  background: #192238;
  color: #94A3B8;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.poke-sheet-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.poke-sheet-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.poke-sheet-table tr.row-done td {
  background: rgba(16, 185, 129, 0.06);
}

.poke-sheet-table tr.row-done .poke-hw-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.poke-hw-num {
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.poke-hw-subj-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}

.poke-hw-title-input {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: inherit;
  font-size: 0.88rem;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.poke-hw-title-input:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.poke-hw-title-input:focus {
  border-color: #38BDF8;
  background: rgba(0, 0, 0, 0.3);
  outline: none;
}

.poke-hw-due {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Custom Square Checkbox matching Google Sheet */
.poke-hw-check-cell {
  text-align: center;
}

.poke-hw-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.poke-hw-checkbox:hover {
  border-color: #F97316;
  transform: scale(1.1);
}

.poke-hw-checkbox.checked {
  background: #10B981;
  border-color: #10B981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.poke-sheet-footer-row td {
  background: #141B2D;
  border-top: 2px solid rgba(249, 115, 22, 0.5);
  padding: 14px;
  font-weight: 700;
}

.psf-label {
  font-size: 0.95rem;
  color: #FFF;
}

.psf-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #10B981;
  text-align: center;
}


/* ==========================================================================
   POKEMON EVOLUTION CELEBRATION MODAL
   ========================================================================== */
.poke-evo-modal-wrap .poke-evo-dialog {
  width: 90vw;
  max-width: 520px;
  background: linear-gradient(135deg, #111827, #1E293B);
  border: 2px solid #EAB308;
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(234, 179, 8, 0.3);
  z-index: 10000;
}

.poke-confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.evo-sunburst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  margin-top: -300px;
  margin-left: -300px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.15) 0%, transparent 60%);
  animation: evo-spin 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes evo-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.evo-content {
  position: relative;
  z-index: 2;
}

.evo-badge-celebrate {
  display: inline-block;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFF;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.evo-sprite-wrap {
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.evo-sprite-img {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
  animation: evo-bounce 0.8s ease-in-out infinite alternate;
}

@keyframes evo-bounce {
  0% { transform: scale(0.95); }
  100% { transform: scale(1.08); }
}

.evo-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.evo-title-rank {
  font-size: 0.95rem;
  font-weight: 700;
  color: #EAB308;
  margin-bottom: 14px;
}

.evo-message {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.btn-evo-continue {
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #FFF;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-evo-continue:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}



/* Mini Companion Bar in Tab 1 */
.poke-mini-companion-bar {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(30, 41, 59, 0.95));
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
}

.poke-mini-companion-bar:hover {
  border-color: rgba(245, 158, 11, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.2);
}

.pm-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pm-sprite {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  animation: floatSprite 3s ease-in-out infinite;
}

@keyframes floatSprite {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.pm-title {
  font-size: 0.98rem;
  color: #fff;
}

.pm-lvl {
  background: #f59e0b;
  color: #000;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
}

.pm-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  display: block;
  margin-top: 2px;
}

.pm-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.pm-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

.pm-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(51, 65, 85, 0.5);
  border-radius: 4px;
  overflow: hidden;
}

.pm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.pm-progress-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  text-align: right;
}

.btn-pm-open {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pm-open:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-1px);
}

/* ==========================================================================
   MODULE: POKEMON DAILY CATCH & POKEDEX COLLECTION SYSTEM (LUCAS 3A)
   ========================================================================== */

/* Daily Catch Banner in Tab 1 & Tab 6 */
.dcc-catch-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(24, 20, 36, 0.95), rgba(30, 27, 75, 0.95));
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dcc-catch-banner:hover {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dcc-sparkles {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(15px);
}

.dcc-left {
  flex: 1;
  min-width: 280px;
}

.dcc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FBBF24;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.dcc-badge-icon {
  font-size: 0.95rem;
}

.dcc-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 8px 0;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dcc-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 16px 0;
}

.dcc-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dcc-date-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
}

.dcc-status-pill {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #F87171;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dcc-status-pill.caught {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34D399;
}

.dcc-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.dcc-creature-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(17, 24, 39, 0.6) 70%);
  border: 2px dashed rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease;
  animation: dcc-pulse 3s infinite alternate;
}

@keyframes dcc-pulse {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(245, 158, 11, 0.1); }
  100% { transform: scale(1.04); box-shadow: 0 0 24px rgba(245, 158, 11, 0.35); }
}

.dcc-pod-icon {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.dcc-pod-sprite {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.dcc-pod-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #FBBF24;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

.dcc-action-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 190px;
}

.btn-dcc-catch {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #0F172A;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.btn-dcc-catch:hover {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.6);
}

.btn-dcc-dex {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-dcc-dex:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* ==========================================================================
   MODAL: POKEMON REVEAL (POKEBALL POPUP CELEBRATION)
   ========================================================================== */
.pokemon-reveal-modal-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  background: rgba(5, 7, 15, 0.85);
}

.pokemon-reveal-dialog {
  position: relative;
  width: 90%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #111827 0%, #0F172A 100%);
  border: 2px solid rgba(245, 158, 11, 0.5);
  border-radius: 28px;
  padding: 32px 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 50px rgba(245, 158, 11, 0.25);
  z-index: 10001;
  text-align: center;
  animation: modalPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPopIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.pk-confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  border-radius: 28px;
}

.pk-sunburst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  margin-top: -250px;
  margin-left: -250px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
  animation: sunburstRotate 20s linear infinite;
}

@keyframes sunburstRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pk-dialog-content {
  position: relative;
  z-index: 2;
}

.pk-badge {
  display: inline-block;
  background: linear-gradient(90deg, #F59E0B, #EF4444);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.pk-card-hero {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 24px 20px 18px 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.pk-avatar-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  position: relative;
}

.pk-avatar-wrap::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px dashed rgba(245, 158, 11, 0.4);
  animation: spinSlow 12s linear infinite;
}

@keyframes spinSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pk-sprite-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  animation: pokeBounce 2.5s ease-in-out infinite;
}

@keyframes pokeBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}

.pk-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 4px 0;
}

.pk-title-vi {
  font-size: 1rem;
  font-weight: 700;
  color: #FBBF24;
  margin-bottom: 10px;
}

.pk-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.pk-tier-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pk-tier-pill.tier-common {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34D399;
}

.pk-tier-pill.tier-rare {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #60A5FA;
}

.pk-tier-pill.tier-epic {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #C084FC;
}

.pk-tier-pill.tier-legendary {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(239, 68, 68, 0.3));
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #FDE047;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.pk-type-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}

.pk-lore-text {
  font-size: 0.86rem;
  color: #CBD5E1;
  font-style: italic;
  line-height: 1.5;
  margin: 0;
  padding: 0 8px;
}

/* Core Knowledge Box inside Reveal Modal */
.pk-knowledge-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 22px;
  text-align: left;
}

.pkk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pkk-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #38BDF8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pkk-term-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.pkk-term {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
}

.pkk-pos {
  font-size: 0.75rem;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

.btn-pkk-audio {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38BDF8;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  margin-left: auto;
  transition: all 0.15s ease;
}

.btn-pkk-audio:hover {
  background: #38BDF8;
  color: #0F172A;
  transform: scale(1.1);
}

.pkk-phonetic-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
  color: #94A3B8;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.pkk-ipa {
  font-family: monospace;
  color: #FBBF24;
}

.pkk-reading-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #FCD34D;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
}

.pkk-meaning-vi {
  font-size: 0.92rem;
  font-weight: 600;
  color: #E2E8F0;
  margin-bottom: 8px;
}

.pkk-fact {
  font-size: 0.82rem;
  color: #94A3B8;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #F59E0B;
  padding: 6px 10px;
  border-radius: 0 8px 8px 0;
  margin: 0;
}

.pk-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-pk-collect {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}

.btn-pk-collect:hover {
  background: linear-gradient(135deg, #34D399, #10B981);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.6);
}

.btn-pk-dex {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pk-dex:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

/* ==========================================================================
   MODAL: POKEDEX BESTIARY GRID (SỔ TAY 20 POKEMON LỚP 3A)
   ========================================================================== */
.pokedex-modal-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  background: rgba(8, 11, 20, 0.88);
}

.pokedex-dialog {
  position: relative;
  width: 92%;
  max-width: 1050px;
  height: 88vh;
  display: flex;
  flex-direction: column;
  background: #0F172A;
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 26px;
  padding: 26px 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(245, 158, 11, 0.15);
  z-index: 10000;
}

.pdx-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.pdx-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FBBF24;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
}

.pdx-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 4px 0;
}

.pdx-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Dex Toolbar & Filters */
.pdx-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pdx-progress-summary {
  flex: 1;
  min-width: 240px;
}

.pdx-ps-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.pdx-ps-text strong {
  color: #FBBF24;
  font-weight: 700;
}

.pdx-bar-wrap {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.pdx-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #3B82F6, #A855F7, #F59E0B);
  border-radius: 8px;
  transition: width 0.4s ease;
}

.pdx-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pdx-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pdx-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.pdx-pill.active {
  background: #F59E0B;
  border-color: #F59E0B;
  color: #0F172A;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.pdx-pill.tier-common.active { background: #10B981; border-color: #10B981; color: #FFFFFF; }
.pdx-pill.tier-rare.active { background: #3B82F6; border-color: #3B82F6; color: #FFFFFF; }
.pdx-pill.tier-epic.active { background: #A855F7; border-color: #A855F7; color: #FFFFFF; }
.pdx-pill.tier-legendary.active { background: #F59E0B; border-color: #F59E0B; color: #0F172A; }

/* 20 Pokémon Grid */
.pdx-grid-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Individual Pokémon Card */
.pdx-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  transition: all 0.25s ease;
  overflow: hidden;
  cursor: pointer;
}

.pdx-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.pdx-card.caught {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.pdx-card.caught.tier-common { border-color: rgba(16, 185, 129, 0.4); }
.pdx-card.caught.tier-rare { border-color: rgba(59, 130, 246, 0.4); }
.pdx-card.caught.tier-epic { border-color: rgba(168, 85, 247, 0.45); }
.pdx-card.caught.tier-legendary {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.pdx-card-count-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(245, 158, 11, 0.9);
  color: #0F172A;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
}

.pdx-card-tier-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: uppercase;
}

.pdx-card.tier-common .pdx-card-tier-tag { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.pdx-card.tier-rare .pdx-card-tier-tag { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
.pdx-card.tier-epic .pdx-card-tier-tag { background: rgba(168, 85, 247, 0.2); color: #C084FC; }
.pdx-card.tier-legendary .pdx-card-tier-tag { background: rgba(245, 158, 11, 0.2); color: #FCD34D; }

.pdx-card-sprite-wrap {
  width: 80px;
  height: 80px;
  margin: 18px auto 8px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdx-card-sprite {
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.pdx-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 2px 0;
}

.pdx-card-title-vi {
  font-size: 0.78rem;
  color: #FBBF24;
  font-weight: 600;
  margin-bottom: 8px;
}

.pdx-card-knowledge-preview {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.76rem;
  color: #CBD5E1;
  text-align: left;
  line-height: 1.4;
}

.pdx-card-knowledge-preview strong {
  color: #38BDF8;
}

/* Locked / Mysterious Pokémon Card */
.pdx-card.locked {
  background: rgba(15, 23, 42, 0.4);
  border: 1.5px dashed rgba(255, 255, 255, 0.12);
  cursor: default;
}

.pdx-card.locked:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.2);
}

.pdx-card.locked .pdx-card-sprite {
  filter: brightness(0) invert(0.2) opacity(0.4);
}

.pdx-card.locked .pdx-card-name {
  color: #64748B;
  letter-spacing: 2px;
}

.pdx-card.locked .pdx-card-title-vi {
  color: #475569;
}

.pdx-locked-hint {
  font-size: 0.72rem;
  color: #94A3B8;
  font-style: italic;
  margin-top: 6px;
}

@media (max-width: 768px) {
  .dcc-catch-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
  }
  .dcc-right {
    justify-content: space-between;
  }
  .pokedex-dialog {
    padding: 20px 16px;
    height: 94vh;
  }
  .pdx-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ==========================================================================
   AMO OLYMPIC MATHEMATICS MODULE - LUCAS 3A LEARNING HUB
   Design System: Olympic Gold (#F59E0B), Deep Royal Navy (#0F172A, #1E293B)
   ========================================================================== */

/* Navigation Tab Enhancement */
.nav-tab-amo {
  position: relative;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.08)) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}
.nav-tab-amo:hover, .nav-tab-amo.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.18)) !important;
  border-color: #F59E0B !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25) !important;
}

/* Main Container */
#tab-amo {
  padding-bottom: 60px;
}

/* Hero Banner */
.amo-hero-banner {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #1A2E05 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-xl, 20px);
  padding: 28px 32px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.amo-hero-banner::before {
  content: "🏆";
  position: absolute;
  right: -20px;
  bottom: -25px;
  font-size: 130px;
  opacity: 0.12;
  pointer-events: none;
  transform: rotate(-12deg);
}
.amo-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FBBF24;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}
.amo-hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 8px 0;
  line-height: 1.25;
}
.amo-hero-title span {
  background: linear-gradient(135deg, #FBBF24, #F59E0B, #EA580C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.amo-hero-desc {
  font-size: 0.95rem;
  color: #94A3B8;
  max-width: 850px;
  line-height: 1.55;
  margin: 0;
}

/* Sub-Tab Navigation Bar */
.amo-subtab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.amo-subtab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94A3B8;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.amo-subtab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}
.amo-subtab-btn.active {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #0F172A;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
.amo-subtab-pane {
  display: none;
}
.amo-subtab-pane.active {
  display: block;
  animation: amoFadeIn 0.3s ease;
}
@keyframes amoFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Top Control Bar in Exam Mode */
.amo-exam-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.amo-exam-selector-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}
.amo-exam-selector-wrap label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #CBD5E1;
  white-space: nowrap;
}
.amo-select-exam {
  width: 100%;
  max-width: 440px;
  background: #0F172A;
  color: #F8FAFC;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  outline: none;
}
.amo-select-exam:focus {
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

/* Timer Display */
.amo-timer-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 14px;
  border-radius: 12px;
}
.amo-timer-icon {
  font-size: 1.25rem;
}
.amo-timer-display {
  font-family: 'JetBrains Mono', monospace, monospace;
  font-size: 1.4rem;
  font-weight: 800;
  color: #38BDF8;
  letter-spacing: 1px;
}
.amo-timer-display.timer-warning {
  color: #EF4444;
  animation: amoPulseTimer 1s infinite;
}
@keyframes amoPulseTimer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.amo-btn-timer-ctrl {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #CBD5E1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.amo-btn-timer-ctrl:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

/* Exam Action Buttons */
.amo-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.amo-btn-submit-exam {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}
.amo-btn-submit-exam:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
}

/* Active Exam Info Card */
.amo-exam-info-card {
  background: rgba(30, 41, 59, 0.6);
  border-left: 4px solid #F59E0B;
  padding: 12px 18px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 20px;
}
.amo-exam-info-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #F59E0B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.amo-exam-info-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0 0 4px 0;
}
.amo-exam-info-desc {
  font-size: 0.85rem;
  color: #94A3B8;
  margin: 0;
}

/* Exam Mode Layout (2 columns) */
.amo-exam-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 24px;
}
@media (max-width: 960px) {
  .amo-exam-layout {
    grid-template-columns: 1fr;
  }
}

/* Question Card Main View */
.amo-question-card {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 24px 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  min-height: 480px;
}
.amo-q-meta-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}
.amo-q-badges-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.amo-badge-qnum {
  background: #F59E0B;
  color: #0F172A;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
}
.amo-badge-sec {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60A5FA;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
}
.amo-badge-pts {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34D399;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
}
.amo-badge-topic {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #C084FC;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
}
.amo-btn-flag {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94A3B8;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.amo-btn-flag:hover {
  border-color: #F59E0B;
  color: #F59E0B;
}
.amo-btn-flag.flagged-active {
  background: rgba(249, 115, 22, 0.2);
  border-color: #F97316;
  color: #FB923C;
  font-weight: 700;
}

/* Question Content Presentation */
.amo-q-content-box {
  margin-bottom: 24px;
}
.amo-q-text-en {
  font-size: 1.18rem;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.6;
  margin-bottom: 14px;
}
.amo-q-text-vi {
  font-size: 1.02rem;
  color: #CBD5E1;
  background: rgba(15, 23, 42, 0.5);
  border-left: 3px solid #38BDF8;
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  line-height: 1.55;
}

/* Multiple Choice Option Cards */
.amo-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.amo-option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.amo-option-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateX(3px);
}
.amo-option-card.selected {
  background: rgba(245, 158, 11, 0.12);
  border-color: #F59E0B;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}
.amo-opt-letter {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.amo-option-card.selected .amo-opt-letter {
  background: #F59E0B;
  color: #0F172A;
}
.amo-opt-text {
  font-size: 1.05rem;
  color: #F1F5F9;
  font-weight: 500;
}

/* Numeric Open-Ended Input Box */
.amo-numeric-input-wrap {
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
}
.amo-input-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #94A3B8;
  margin-bottom: 10px;
}
.amo-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.amo-numeric-field {
  flex: 1;
  background: #1E293B;
  border: 2px solid rgba(245, 158, 11, 0.4);
  color: #F8FAFC;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  outline: none;
}
.amo-numeric-field:focus {
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}
.amo-btn-save-ans {
  background: #F59E0B;
  color: #0F172A;
  border: none;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}
.amo-btn-clear-ans {
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

/* Touch Keypad for iPad */
.amo-keypad-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.amo-keypad-btn {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.amo-keypad-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #F59E0B;
}
.keypad-backspace {
  grid-column: span 2;
  font-size: 0.9rem;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
}

/* Question Navigation Footer */
.amo-q-nav-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.amo-btn-nav-prev, .amo-btn-nav-next {
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.amo-btn-nav-prev {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #CBD5E1;
}
.amo-btn-nav-prev:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}
.amo-btn-nav-prev:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.amo-btn-nav-next {
  background: #3B82F6;
  border: none;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.amo-btn-nav-next:hover {
  background: #2563EB;
  transform: translateX(2px);
}
.amo-btn-nav-next.btn-submit-mode {
  background: linear-gradient(135deg, #10B981, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* Right Sidebar: Question Palette */
.amo-palette-box {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  height: fit-content;
}
.amo-palette-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0 0 6px 0;
}
.amo-palette-summary {
  font-size: 0.82rem;
  color: #94A3B8;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.amo-palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.amo-palette-btn {
  aspect-ratio: 1;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #CBD5E1;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.amo-palette-btn:hover {
  border-color: #F59E0B;
  color: #FFFFFF;
}
.amo-palette-btn.active {
  border-color: #F59E0B;
  box-shadow: 0 0 0 2px #F59E0B;
  background: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
}
.amo-palette-btn.answered {
  background: #059669;
  border-color: #10B981;
  color: #FFFFFF;
}
.amo-palette-btn.flagged::after {
  content: "🚩";
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 10px;
}
.amo-palette-legend {
  font-size: 0.78rem;
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.dot-current { background: #F59E0B; }
.dot-answered { background: #10B981; }
.dot-flagged { background: #F97316; }
.dot-unanswered { background: #0F172A; border: 1px solid rgba(255, 255, 255, 0.2); }

/* Exam Results & Solution Review Screen */
.amo-result-card {
  background: #1E293B;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.amo-result-header {
  padding: 36px 32px;
  text-align: center;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
}
.amo-medal-badge {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 12px;
  animation: amoMedalBounce 1s ease;
}
@keyframes amoMedalBounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.amo-result-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 6px 0;
}
.amo-result-desc {
  font-size: 0.95rem;
  color: #94A3B8;
  max-width: 600px;
  margin: 0 auto 24px auto;
}
.amo-score-ribbon {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 16px 24px;
  display: inline-block;
  margin-bottom: 24px;
}
.score-main {
  font-size: 2.5rem;
  font-weight: 900;
  color: #FBBF24;
}
.score-max {
  font-size: 1.25rem;
  color: #CBD5E1;
  font-weight: 600;
}
.score-pct {
  font-size: 0.95rem;
  color: #F8FAFC;
  margin-top: 4px;
}
.amo-stats-summary-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}
.stat-pill {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
}
.stat-correct { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-wrong { background: rgba(239, 68, 68, 0.15); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.stat-unans { background: rgba(148, 163, 184, 0.15); color: #94A3B8; border: 1px solid rgba(148, 163, 184, 0.3); }
.stat-time { background: rgba(56, 189, 248, 0.15); color: #38BDF8; border: 1px solid rgba(56, 189, 248, 0.3); }

.amo-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.amo-btn-primary {
  background: #F59E0B;
  color: #0F172A;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.amo-btn-secondary {
  background: #3B82F6;
  color: #FFFFFF;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}
.amo-btn-outline {
  background: transparent;
  color: #CBD5E1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Detailed Review List */
.amo-review-section {
  padding: 28px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.amo-review-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.amo-review-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}
.amo-filter-tabs {
  display: flex;
  gap: 6px;
}
.review-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.review-filter-btn.active {
  background: #38BDF8;
  color: #0F172A;
  border-color: #38BDF8;
  font-weight: 700;
}

.amo-review-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.amo-review-item {
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px 24px;
  border-left: 4px solid #64748B;
}
.amo-review-item.status-correct { border-left-color: #10B981; }
.amo-review-item.status-wrong { border-left-color: #EF4444; }
.amo-review-item.status-unanswered { border-left-color: #F59E0B; }

.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.review-q-num {
  font-weight: 800;
  font-size: 1.05rem;
  color: #F8FAFC;
}
.review-sec {
  font-weight: normal;
  font-size: 0.85rem;
  color: #94A3B8;
}
.review-status-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}
.badge-correct { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.badge-wrong { background: rgba(239, 68, 68, 0.2); color: #F87171; }
.badge-unanswered { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }

.review-q-content {
  margin-bottom: 16px;
}
.review-text-en {
  font-size: 1.05rem;
  color: #FFFFFF;
  line-height: 1.55;
  margin-bottom: 6px;
}
.review-text-vi {
  font-size: 0.92rem;
  color: #94A3B8;
}
.review-answers-compare {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(30, 41, 59, 0.5);
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.ans-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}
.ans-label { color: #94A3B8; }
.ans-val { font-weight: 700; }
.text-green { color: #34D399; }
.text-red { color: #F87171; }

.review-hint-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #FCD34D;
  margin-bottom: 14px;
}

.review-solution-box {
  background: rgba(30, 41, 59, 0.7);
  border-radius: 10px;
  padding: 14px 18px;
}
.solution-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: #38BDF8;
  margin-bottom: 8px;
}
.solution-vi {
  font-size: 0.92rem;
  color: #E2E8F0;
  line-height: 1.6;
  margin-bottom: 10px;
}
.solution-en {
  font-size: 0.86rem;
  color: #94A3B8;
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Thematic Drills Styles */
.amo-topic-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.amo-topic-pill {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}
.amo-topic-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}
.amo-topic-pill.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15));
  border-color: #F59E0B;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}
.topic-icon { font-size: 1.25rem; }
.topic-name { font-weight: 700; font-size: 0.92rem; }
.topic-count {
  background: rgba(255, 255, 255, 0.1);
  color: #FCD34D;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.amo-drills-header {
  margin-bottom: 20px;
  background: #1E293B;
  border-left: 4px solid #38BDF8;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
}
.amo-drills-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 6px 0;
}
.amo-drills-header p {
  font-size: 0.9rem;
  color: #94A3B8;
  margin: 0;
}

.amo-drills-stream {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.amo-drill-card {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}
.amo-drill-card.drill-done-correct {
  border-color: #10B981;
  background: linear-gradient(180deg, #1E293B 0%, rgba(16, 185, 129, 0.05) 100%);
}
.amo-drill-card.drill-done-wrong {
  border-color: rgba(239, 68, 68, 0.5);
}
.drill-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.drill-num-badge {
  background: #0F172A;
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FBBF24;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
}
.drill-pts-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}
.drill-question-box {
  margin-bottom: 16px;
}
.drill-text-en {
  font-size: 1.12rem;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.55;
  margin-bottom: 6px;
}
.drill-text-vi {
  font-size: 0.95rem;
  color: #94A3B8;
}
.drill-interactive-zone {
  margin-top: 14px;
}
.drill-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.drill-input-field {
  flex: 1;
  min-width: 140px;
  max-width: 260px;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
}
.drill-input-field:focus {
  border-color: #38BDF8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
.drill-btn-check {
  background: #3B82F6;
  color: #FFFFFF;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.drill-btn-check:hover {
  background: #2563EB;
}
.drill-btn-hint {
  background: rgba(245, 158, 11, 0.15);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.drill-btn-sol {
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.drill-feedback-msg {
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
}
.feedback-correct { background: rgba(16, 185, 129, 0.2); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.4); }
.feedback-wrong { background: rgba(239, 68, 68, 0.2); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.4); }

.drill-hint-box {
  margin-top: 12px;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #F59E0B;
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  font-size: 0.9rem;
  color: #FDE68A;
  line-height: 1.5;
}
.drill-solution-box {
  margin-top: 12px;
  background: #0F172A;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 16px 18px;
  border-radius: 12px;
}
.sol-heading {
  font-weight: 700;
  color: #38BDF8;
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.sol-vi {
  color: #E2E8F0;
  font-size: 0.92rem;
  line-height: 1.6;
}
.sol-en {
  color: #94A3B8;
  font-size: 0.86rem;
  line-height: 1.5;
}

/* Document Archive Grid */
.amo-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}
.amo-doc-card {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  position: relative;
  transition: all 0.2s ease;
}
.amo-doc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.doc-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FBBF24;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.doc-card-header {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
}
.doc-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.doc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 4px 0;
  line-height: 1.35;
  padding-right: 70px;
}
.doc-authors {
  font-size: 0.8rem;
  color: #94A3B8;
}
.doc-desc {
  font-size: 0.86rem;
  color: #CBD5E1;
  line-height: 1.5;
  margin: 0 0 16px 0;
  flex: 1;
}
.doc-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.meta-tag {
  background: #0F172A;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  color: #94A3B8;
  font-weight: 600;
}
.doc-card-actions {
  display: flex;
  gap: 8px;
}
.doc-btn-open {
  flex: 1;
  background: #F59E0B;
  color: #0F172A;
  text-decoration: none;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.doc-btn-open:hover {
  background: #D97706;
}
.doc-btn-download {
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.doc-btn-download:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

/* History Table */
.amo-empty-history {
  text-align: center;
  padding: 60px 20px;
  background: #1E293B;
  border-radius: 16px;
  color: #94A3B8;
}
.amo-history-table-wrap {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
}
.amo-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.amo-history-table th {
  background: #0F172A;
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  color: #94A3B8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.amo-history-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #F1F5F9;
}
.badge-history-medal {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FBBF24;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
}


