* { margin: 0; padding: 0; box-sizing: border-box; }
.hidden { display: none !important; }

:root {
  --primary: #800000;
  --primary-light: #A52A2A;
  --primary-dark: #5C0000;
  --cream: #FFF5E1;
  --cream-dark: #F5E6C8;
  --accent: #C9A227;
  --accent-glow: rgba(201, 162, 39, 0.3);
  --bg: #FFF5E1;
  --surface: #FFFCF2;
  --surface-glass: rgba(255, 245, 225, 0.8);
  --text: #1A1A1A;
  --text-secondary: #4A4A4A;
  --text-light: #7A7A7A;
  --border: rgba(128, 0, 0, 0.08);
  --shadow: 0 4px 20px rgba(128, 0, 0, 0.06);
  --shadow-hover: 0 8px 32px rgba(128, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --gradient: linear-gradient(135deg, #800000, #A52A2A);
  --gradient-warm: linear-gradient(135deg, #800000 0%, #A52A2A 50%, #5C0000 100%);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-bn: 'Noto Sans Bengali', 'Inter', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
  --primary: #B31B1B;
  --primary-light: #D44040;
  --primary-dark: #800000;
  --accent: #D4A830;
  --accent-glow: rgba(212, 168, 48, 0.25);
  --bg: #121212;
  --surface: #1E1E1E;
  --surface-glass: rgba(30, 30, 30, 0.85);
  --text: #EDEDED;
  --text-secondary: #AAAAAA;
  --text-light: #777777;
  --border: rgba(255, 255, 255, 0.06);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.5);
  --gradient: linear-gradient(135deg, #B31B1B, #D44040);
  --gradient-warm: linear-gradient(135deg, #1E1E1E 0%, #2A0A0A 50%, #121212 100%);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  transition: background var(--transition), color var(--transition);
}
#app { padding-bottom: 0; }

/* ===== Header ===== */
header {
  background: var(--gradient);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(128, 0, 0, 0.2);
}
header h1 {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}
header h1 span { color: #FFD700; }
header button {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
header button:hover { background: rgba(255,255,255,0.22); }

/* ===== Sidebar ===== */
#sidebar {
  position: fixed;
  left: 0;
  top: 52px;
  bottom: 56px;
  width: 300px;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 50;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 4px 0 20px rgba(0,0,0,0.06);
}
#sidebar.hidden { transform: translateX(-100%); }
.sidebar-header {
  padding: 14px 14px 12px;
  background: var(--gradient);
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.sidebar-header h2 {
  font-size: .75rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.sidebar-header .search-wrap {
  order: 3;
  flex: 0 0 100%;
  margin-top: 8px;
  position: relative;
}
.sidebar-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.sidebar-close:hover { background: rgba(255,255,255,0.2); }
#searchInput {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  background: rgba(255,255,255,0.15);
  color: #fff;
  outline: none;
  transition: background var(--transition);
}
#searchInput::placeholder { color: rgba(255,255,255,0.5); }
#searchInput:focus { background: rgba(255,255,255,0.25); }
.sidebar-header .search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .8rem;
  opacity: .5;
  pointer-events: none;
}

#chapterList { list-style: none; padding: 8px 0; }
#chapterList li {
  padding: 10px 14px;
  margin: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all .2s;
  border: 1px solid transparent;
}
#chapterList li:hover {
  background: rgba(128, 0, 0, 0.06);
  border-color: rgba(128, 0, 0, 0.12);
  transform: translateX(2px);
}
.dark #chapterList li:hover {
  background: rgba(179, 27, 27, 0.12);
  border-color: rgba(179, 27, 27, 0.2);
}
#chapterList li .ch-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
#chapterList li .ch-num {
  font-size: .65rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(201, 162, 39, 0.1);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#chapterList li .ch-icon { font-size: .9rem; flex-shrink: 0; }
#chapterList li .ch-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
#chapterList li .diff {
  font-size: .6rem;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
#chapterList li .diff.Easy { background: linear-gradient(135deg, #4caf50, #2e7d32); color: #fff; }
#chapterList li .diff.Intermediate { background: linear-gradient(135deg, #e67e22, #d35400); color: #fff; }
#chapterList li .diff.Advanced { background: linear-gradient(135deg, #c0392b, #7b241c); color: #fff; }
#chapterList li .diff.Medium { background: linear-gradient(135deg, #e67e22, #d35400); color: #fff; }
#chapterList li .diff.Expert { background: linear-gradient(135deg, #8e44ad, #5b2c6f); color: #fff; }
#chapterList li .ch-check { font-size: .6rem; opacity: .5; flex-shrink: 0; margin-right: 2px; }
#chapterList li .ch-bm { font-size: .6rem; flex-shrink: 0; }

/* Sidebar category headers */
.sidebar-category {
  padding: 10px 14px 4px;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  font-weight: 700;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  background: var(--surface-glass);
}
.sidebar-category:first-of-type { border-top: none; margin-top: 0; }

/* ===== Tab Bar ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding: 4px 0 env(safe-area-inset-bottom, 4px);
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  transition: all .2s;
  padding: 4px 0;
  position: relative;
}
.tab-item .tab-icon { font-size: 1.2rem; line-height: 1.2; }
.tab-item .tab-label { font-size: .6rem; font-weight: 500; text-transform: uppercase; letter-spacing: .3px; }
.tab-item.active { color: var(--primary); }
.tab-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 30%;
  right: 30%;
  height: 2px;
  background: var(--gradient);
  border-radius: 0 0 2px 2px;
}
.tab-item:hover { color: var(--primary); }
.dark .tab-item.active { color: var(--accent); }
.dark .tab-item.active::after { background: var(--accent); }

/* ===== Main Content ===== */
#mainContent {
  margin-left: 0;
  padding: 20px 20px 72px;
  height: calc(100vh - 52px - 56px);
  overflow-y: auto;
  overflow-x: hidden;
  transition: margin-left var(--transition);
  -webkit-overflow-scrolling: touch;
}
#mainContent > div:last-child { margin-bottom: 0; }

/* ===== Animated Gradient Background ===== */
#welcome {
  position: relative;
  z-index: 0;
}
#welcome::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 20% 50%, rgba(128,0,0,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(201,162,39,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(165,42,42,0.04) 0%, transparent 50%);
  animation: gradientShift 8s ease infinite alternate;
  pointer-events: none;
}
.dark #welcome::before {
  background: radial-gradient(ellipse at 20% 50%, rgba(179,27,27,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(212,168,48,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(30,30,30,0.1) 0%, transparent 50%);
}
@keyframes gradientShift {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.1) rotate(3deg); }
}


/* ===== Welcome Card ===== */
.welcome-card {
  background: linear-gradient(135deg, #1A1A1A 0%, #2A2A2A 100%);
  color: #fff;
  padding: 36px 32px 40px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 0 40px rgba(201, 162, 39, 0.05);
}
.welcome-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(201, 162, 39, 0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(128, 0, 0, 0.08) 0%, transparent 50%);
  pointer-events: none;
}
.welcome-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: shimmer 2s infinite;
}
.welcome-logo { margin-bottom: 8px; position: relative; }
.welcome-logo svg { filter: drop-shadow(0 4px 12px rgba(201,162,39,0.3)); }
.welcome-card h1 { font-size: 1.9rem; margin-bottom: 6px; position: relative; }
.welcome-card h1 span { color: #FFD700; }
.welcome-card .sub {
  opacity: .85;
  font-size: .95rem;
  margin-bottom: 4px;
  position: relative;
}
.welcome-card .creator {
  font-size: .78rem;
  opacity: .65;
  margin-bottom: 20px;
  position: relative;
}
.stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  position: relative;
}
.stat { text-align: center; }
.stat span { display: block; font-size: 1.7rem; font-weight: 700; }
.stat label { font-size: .75rem; opacity: .8; }

.start-btn {
  background: #fff;
  color: #800000;
  border: none;
  padding: 12px 36px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ===== Quick Access ===== */
.quick-access h3 {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 1rem;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.quick-card {
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 18px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px var(--accent-glow), var(--shadow-hover);
  border-color: var(--accent);
}
.quick-card.admission { border-left: 4px solid #2E7D32; }
.quick-card.hsc { border-left: 4px solid #1565C0; }
.quick-card.ssc { border-left: 4px solid #E65100; }

/* ===== Exam Mode ===== */
.exam-mode { margin: 20px 0; }
.exam-mode h3 { margin-bottom: 14px; color: var(--primary); font-size: 1rem; }
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.exam-card {
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all var(--transition);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.exam-card:hover { transform: translateY(-5px); box-shadow: 0 0 24px var(--accent-glow), var(--shadow-hover); }
.exam-card .exam-icon { font-size: 2rem; }
.exam-card .exam-name { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.exam-card .exam-desc { font-size: .7rem; color: var(--text-light); line-height: 1.3; }
.exam-card.ssc { border-color: #E65100; }
.exam-card.ssc:hover { background: #FFF3E0; }
.exam-card.hsc { border-color: #1565C0; }
.exam-card.hsc:hover { background: #E3F2FD; }
.exam-card.admission { border-color: #2E7D32; }
.exam-card.admission:hover { background: #E8F5E9; }
.exam-card.bcs { border-color: #800000; }
.exam-card.bcs:hover { background: #FFF0F0; }
.exam-card.ielts { border-color: #6A1B9A; }
.exam-card.ielts:hover { background: #F3E5F5; }

/* ===== Exam Content View ===== */
.exam-intro { background: var(--surface); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); line-height: 1.7; }
.exam-topic { background: var(--surface); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; border-left: 4px solid var(--accent); box-shadow: var(--shadow); }
.exam-topic h3 { color: var(--primary); font-size: 1.1rem; margin-bottom: 10px; }
.exam-details { line-height: 1.8; margin-bottom: 12px; font-size: .92rem; color: var(--text-secondary); }
.exam-rules, .exam-tips, .exam-points, .exam-examples { margin: 12px 0; padding: 12px; background: var(--cream); border-radius: var(--radius-sm); }
.exam-rules h4, .exam-tips h4, .exam-points h4, .exam-examples h4 { color: var(--primary); font-size: .9rem; margin-bottom: 8px; }
.exam-rules ul, .exam-tips ul, .exam-points ul { padding-left: 20px; }
.exam-rules li, .exam-tips li, .exam-points li { margin-bottom: 6px; line-height: 1.6; font-size: .9rem; }
.exam-examples .example { padding: 8px 12px; margin: 6px 0; background: white; border-radius: var(--radius-sm); border-left: 3px solid var(--accent); }
.exam-examples .example .en { font-weight: 500; }
.exam-examples .example .bn { color: var(--text-secondary); margin: 4px 0; }
.exam-examples .example em { font-size: .85rem; color: var(--text-light); }

/* ===== Chapter View ===== */
#chapterView { max-width: 800px; margin: 0 auto; }
.chapter-header {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.chapter-header h2 { color: var(--primary); font-size: 1.4rem; margin-bottom: 6px; }
.chapter-header .meta { font-size: .82rem; color: var(--text-secondary); }

.chapter-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.chapter-section:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.chapter-section h3 {
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chapter-section p, .chapter-section li {
  line-height: 1.8;
  margin-bottom: 8px;
  font-size: .93rem;
}
.chapter-section .bangla {
  background: rgba(201, 162, 39, 0.08);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 8px 0;
  font-size: .92rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-bn);
  line-height: 1.7;
}
.bn { font-family: var(--font-bn); }
.dark .chapter-section .bangla { background: rgba(212, 168, 48, 0.08); }
.chapter-section ul { padding-left: 20px; }

.chapter-section .example {
  background: var(--bg);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin: 8px 0;
  border-left: 3px solid var(--accent);
  transition: background .2s, transform .2s;
}
.chapter-section .example:hover {
  background: color-mix(in srgb, var(--bg), var(--accent) 4%);
  transform: translateX(2px);
}
.chapter-section .example .en { font-weight: 600; letter-spacing: -0.01em; }
.chapter-section .example .bn { color: var(--text-secondary); font-size: .85rem; line-height: 1.6; }

/* ===== MCQs ===== */
.mcq-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.mcq-card:hover {
  box-shadow: var(--shadow-hover);
}
.mcq-card .q { font-weight: 600; margin-bottom: 10px; }
.mcq-card .options label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  margin: 5px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all .2s;
}
.mcq-card .options label::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  flex-shrink: 0;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mcq-card .options label:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.mcq-card .options label:hover::before { border-color: #fff; }
.mcq-card .options input { display: none; }
.mcq-card .options input:checked + span { font-weight: 700; }
.mcq-card .options input:checked ~ span { font-weight: 700; }
.mcq-card .options input:checked + span::before { display: none; }
.mcq-card .options label:has(input:checked) { border-color: var(--primary); background: rgba(128,0,0,0.06); }
.mcq-card .options label:has(input:checked)::before { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px #fff; }
.dark .mcq-card .options label:has(input:checked) { background: rgba(128,0,0,0.2); }
.mcq-card .explanation {
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(76, 175, 80, 0.1);
  border-left: 3px solid #4caf50;
  display: none;
}
.mcq-card .explanation.show { display: block; }
.dark .mcq-card .explanation { background: rgba(76, 175, 80, 0.08); }

/* ===== Loading ===== */
#loading {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Code Block ===== */
.code-block {
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: .85rem;
  overflow-x: auto;
  margin: 8px 0;
  border: 1px solid var(--border);
}
.dark .code-block { background: #2d2d2d; }

/* ===== Tags ===== */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 600;
  margin: 2px;
}
.tag.bcs { background: #e3f2fd; color: #1565c0; }
.tag.admission { background: #fce4ec; color: #c62828; }
.tag.ielts { background: #e8f5e9; color: #2e7d32; }
.tag.hsc { background: #fff3e0; color: #e65100; }

/* ===== Back Button ===== */
.btn-back {
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 100px;
  cursor: pointer;
  margin-bottom: 16px;
  font-size: .85rem;
  font-weight: 500;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-back:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(128,0,0,0.3); }

/* ===== Responsive ===== */
/* ===== Font Size ===== */
[data-font-size="small"] { --fs-base: 13px; }
[data-font-size="medium"] { --fs-base: 15px; }
[data-font-size="large"] { --fs-base: 17px; }
.font-btn { background: rgba(255,255,255,0.12); border:none; color:#fff; font-size:.8rem; width:28px; height:28px; border-radius:6px; cursor:pointer; opacity:.6; display:flex; align-items:center; justify-content:center; }
.font-btn.active { opacity:1; background:rgba(255,255,255,0.25); }

/* ===== Global Search Overlay ===== */
.gs-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:200; display:flex; flex-direction:column; align-items:center; padding-top:80px; }
.gs-overlay.hidden { display:none; }
.gs-box { width:90%; max-width:600px; display:flex; gap:8px; }
.gs-box input { flex:1; padding:14px 18px; border:none; border-radius:var(--radius); font-size:1.05rem; background:var(--surface); color:var(--text); box-shadow:0 4px 24px rgba(0,0,0,0.15); outline:none; }
.gs-close { width:44px; height:44px; border:none; border-radius:var(--radius); background:var(--primary); color:#fff; font-size:1.2rem; cursor:pointer; }
.gsr-container { width:90%; max-width:600px; margin-top:8px; background:var(--surface); border-radius:var(--radius); box-shadow:0 4px 24px rgba(0,0,0,0.15); max-height:60vh; overflow-y:auto; }
.gsr-container.hidden { display:none; }
.gsr-item { padding:12px 16px; cursor:pointer; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:10px; transition:background .2s; }
.gsr-item:hover { background:rgba(128,0,0,0.05); }
.gsr-item .gsr-type { font-size:.7rem; padding:2px 8px; border-radius:20px; background:var(--accent); color:#fff; font-weight:600; white-space:nowrap; }
.gsr-empty { padding:24px; text-align:center; color:var(--text-light); }

/* ===== Daily Word ===== */
.daily-word-card { background:var(--gradient-warm); color:#fff; border-radius:var(--radius); padding:20px 24px; margin-bottom:20px; position:relative; overflow:hidden; }
.daily-word-card::before { content:''; position:absolute; top:-50%; right:-30%; width:100%; height:200%; background:radial-gradient(ellipse,rgba(201,162,39,0.12),transparent 60%); pointer-events:none; }
.dw-header { font-size:.75rem; text-transform:uppercase; letter-spacing:1px; opacity:.7; margin-bottom:6px; }
.dw-word { font-size:1.5rem; font-weight:700; margin-bottom:2px; }
.dw-meaning { font-size:.95rem; opacity:.9; margin-bottom:6px; }
.dw-example { font-size:.85rem; opacity:.8; margin:6px 0; font-style:italic; }
.dw-actions { display:flex; gap:8px; align-items:center; margin-top:8px; flex-wrap:wrap; }
.dw-btn { background:rgba(255,255,255,0.15); border:none; color:#fff; padding:6px 16px; border-radius:100px; font-size:.82rem; cursor:pointer; transition:background .2s; }
.dw-btn:hover { background:rgba(255,255,255,0.25); }
.dw-tag { font-size:.72rem; background:rgba(255,255,255,0.1); padding:3px 10px; border-radius:20px; }

/* ===== Feature Grid ===== */
.feature-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; margin-bottom:20px; }
.feature-card { background:var(--surface-glass); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); border-radius:var(--radius); padding:16px 10px; text-align:center; border:1px solid var(--border); cursor:pointer; transition:all var(--transition); box-shadow:var(--shadow); font-size:1.4rem; }
.feature-card span { display:block; font-size:.78rem; margin-top:4px; color:var(--text); font-weight:500; }
.feature-card:hover { transform:translateY(-4px); box-shadow:0 0 24px var(--accent-glow), var(--shadow-hover); border-color:var(--accent); }

/* ===== Progress Bar ===== */
.progress-container { margin:16px auto 20px; max-width:400px; }
.progress-bar-bg { height:8px; background:rgba(255,255,255,0.2); border-radius:10px; overflow:hidden; }
.progress-bar-fill { height:100%; background:var(--accent); border-radius:10px; transition:width .5s; }
.progress-label { font-size:.78rem; opacity:.75; margin-top:6px; }

/* ===== Flashcards ===== */
.flashcard-container { display:flex; flex-direction:column; align-items:center; padding:20px 0; }
.flashcard { width:100%; max-width:380px; height:260px; perspective:1000px; cursor:pointer; margin-bottom:20px; transition:transform .2s; }
.flashcard:hover { transform:translateY(-2px); }
.flashcard-inner { position:relative; width:100%; height:100%; transition:transform .6s cubic-bezier(0.4,0,0.2,1); transform-style:preserve-3d; }
.flashcard.flipped .flashcard-inner { transform:rotateY(180deg); }
.flashcard-front, .flashcard-back { position:absolute; inset:0; border-radius:var(--radius); padding:28px 22px; backface-visibility:hidden; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; box-shadow:0 8px 32px rgba(0,0,0,0.15); }
.flashcard-front { background:var(--gradient); color:#fff; }
.flashcard-front .fc-word { font-size:1.7rem; font-weight:700; margin-bottom:8px; letter-spacing:-0.02em; }
.flashcard-front .fc-def { font-size:.92rem; opacity:.85; }
.flashcard-front .fc-hint { position:absolute; bottom:16px; font-size:.72rem; opacity:.5; letter-spacing:.5px; }
.flashcard-back { background:var(--surface); color:var(--text); transform:rotateY(180deg); border:2px solid var(--accent); }
.flashcard-back .fc-bangla { font-size:1.2rem; font-weight:600; margin-bottom:8px; line-height:1.6; }
.flashcard-back .fc-example { font-size:.85rem; color:var(--text-secondary); }
.flashcard-back .fc-syn { font-size:.78rem; color:var(--accent); margin-top:6px; }
.flashcard-nav { display:flex; gap:12px; }

/* ===== Quiz / Mock Test Results ===== */
.mistake { padding:10px 14px; margin:8px 0; border-radius:var(--radius-sm); background:var(--bg); border-left:3px solid #f44336; }
.mistake p { margin:4px 0; line-height:1.6; }

/* ===== Responsive ===== */
/* ===== Animations ===== */
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse { 0%{transform:scale(1)} 50%{transform:scale(1.05)} 100%{transform:scale(1)} }
@keyframes shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInScale { from { opacity:0; transform:scale(0.9) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }
@keyframes popIn { 0%{opacity:0;transform:scale(0.5)} 70%{transform:scale(1.1)} 100%{opacity:1;transform:scale(1)} }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
@keyframes glow { 0%,100%{box-shadow:0 0 8px var(--accent-glow)} 50%{box-shadow:0 0 20px var(--accent-glow),0 0 40px var(--accent-glow)} }
@keyframes slideInLeft { from { opacity:0; transform:translateX(-20px); } to { opacity:1; transform:translateX(0); } }
@keyframes slideInRight { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes buttonPress { 0%{transform:scale(1)} 50%{transform:scale(0.96)} 100%{transform:scale(1)} }

/* Animation utility classes */
.anim-fade-scale { animation: fadeInScale .4s ease forwards; }
.anim-pop { animation: popIn .4s ease forwards; }
.anim-float { animation: float 3s ease infinite; }
.anim-glow { animation: glow 2s ease infinite; }
.anim-slide-left { animation: slideInLeft .3s ease forwards; }
.anim-slide-right { animation: slideInRight .3s ease forwards; }
.anim-stagger-1 { animation: fadeInScale .4s ease .05s forwards; opacity:0; }
.anim-stagger-2 { animation: fadeInScale .4s ease .1s forwards; opacity:0; }
.anim-stagger-3 { animation: fadeInScale .4s ease .15s forwards; opacity:0; }
.anim-stagger-4 { animation: fadeInScale .4s ease .2s forwards; opacity:0; }
.anim-stagger-5 { animation: fadeInScale .4s ease .25s forwards; opacity:0; }
.anim-stagger-6 { animation: fadeInScale .4s ease .3s forwards; opacity:0; }
.anim-stagger-7 { animation: fadeInScale .4s ease .35s forwards; opacity:0; }
.anim-stagger-8 { animation: fadeInScale .4s ease .4s forwards; opacity:0; }

/* Smooth scroll */
#mainContent { scroll-behavior: smooth; }

/* Button press animation */
button:active, .exam-card:active, .feature-card:active, .quick-card:active {
  animation: buttonPress .15s ease !important;
}

/* Card entrance stagger */
.feature-card:nth-child(1) { animation: fadeInScale .4s ease .05s forwards; opacity:0; }
.feature-card:nth-child(2) { animation: fadeInScale .4s ease .1s forwards; opacity:0; }
.feature-card:nth-child(3) { animation: fadeInScale .4s ease .15s forwards; opacity:0; }
.feature-card:nth-child(4) { animation: fadeInScale .4s ease .2s forwards; opacity:0; }
.feature-card:nth-child(5) { animation: fadeInScale .4s ease .25s forwards; opacity:0; }
.feature-card:nth-child(6) { animation: fadeInScale .4s ease .3s forwards; opacity:0; }
.feature-card:nth-child(7) { animation: fadeInScale .4s ease .35s forwards; opacity:0; }
.feature-card:nth-child(8) { animation: fadeInScale .4s ease .4s forwards; opacity:0; }

/* Exam card stagger */
.exam-card:nth-child(1) { animation: fadeInScale .4s ease .1s forwards; opacity:0; }
.exam-card:nth-child(2) { animation: fadeInScale .4s ease .15s forwards; opacity:0; }
.exam-card:nth-child(3) { animation: fadeInScale .4s ease .2s forwards; opacity:0; }
.exam-card:nth-child(4) { animation: fadeInScale .4s ease .25s forwards; opacity:0; }
.exam-card:nth-child(5) { animation: fadeInScale .4s ease .3s forwards; opacity:0; }

/* Quick card stagger */
.quick-grid .quick-card:nth-child(1) { animation: fadeInScale .4s ease .15s forwards; opacity:0; }
.quick-grid .quick-card:nth-child(2) { animation: fadeInScale .4s ease .2s forwards; opacity:0; }
.quick-grid .quick-card:nth-child(3) { animation: fadeInScale .4s ease .25s forwards; opacity:0; }
.quick-grid .quick-card:nth-child(4) { animation: fadeInScale .4s ease .3s forwards; opacity:0; }
.quick-grid .quick-card:nth-child(5) { animation: fadeInScale .4s ease .35s forwards; opacity:0; }

/* Daily word animation */
.daily-word-card { animation: fadeInScale .5s ease .2s forwards; opacity:0; }

/* Streak pulse */
.streak-card { animation: fadeIn .4s ease forwards; }
.streak-card strong { display: inline-block; animation: pulse 2s ease infinite; }

/* Welcome card shimmer line */
.welcome-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Chapter section stagger */
.chapter-section { animation: slideUp .35s ease forwards; opacity:0; }
.chapter-section:nth-child(1) { animation-delay: .05s; }
.chapter-section:nth-child(2) { animation-delay: .1s; }
.chapter-section:nth-child(3) { animation-delay: .15s; }
.chapter-section:nth-child(4) { animation-delay: .2s; }
.chapter-section:nth-child(5) { animation-delay: .25s; }
.chapter-section:nth-child(6) { animation-delay: .3s; }
.chapter-section:nth-child(7) { animation-delay: .35s; }
.chapter-section:nth-child(8) { animation-delay: .4s; }

/* Sidebar list item animation */
#chapterList li { animation: slideInLeft .25s ease forwards; opacity:0; }
#chapterList li:nth-child(1) { animation-delay: .02s; }
#chapterList li:nth-child(2) { animation-delay: .04s; }
#chapterList li:nth-child(3) { animation-delay: .06s; }
#chapterList li:nth-child(4) { animation-delay: .08s; }
#chapterList li:nth-child(5) { animation-delay: .1s; }
#chapterList li:nth-child(6) { animation-delay: .12s; }
#chapterList li:nth-child(7) { animation-delay: .14s; }
#chapterList li:nth-child(8) { animation-delay: .16s; }
#chapterList li:nth-child(9) { animation-delay: .18s; }
#chapterList li:nth-child(10) { animation-delay: .2s; }

/* Stat cards stagger */
.stat { animation: fadeInScale .3s ease forwards; opacity:0; }
.stat:nth-child(1) { animation-delay: .1s; }
.stat:nth-child(2) { animation-delay: .15s; }
.stat:nth-child(3) { animation-delay: .2s; }
.stat:nth-child(4) { animation-delay: .25s; }

/* Quiz/Mock result animation */
.chapter-header { animation: fadeIn .4s ease forwards; }

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
.dark ::-webkit-scrollbar-thumb { background: var(--primary-light); }

/* ===== Splash Screen ===== */
.splash-screen { position:fixed; inset:0; background:var(--gradient-warm); display:flex; align-items:center; justify-content:center; z-index:9999; transition:opacity .5s; }
.splash-screen.hidden { display:none; }
.splash-screen.splash-fade { opacity:0; }
.splash-content { text-align:center; color:#fff; animation:slideUp .8s ease-out; }
.splash-logo { margin-bottom:10px; animation:float 3s ease-in-out infinite; }
.splash-logo svg { filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3)); }
.splash-title { font-size:1.8rem; font-weight:700; margin-bottom:4px; }
.splash-title span { color:#FFD700; }
.splash-sub { font-size:.9rem; opacity:.8; margin-bottom:20px; }
.splash-loader { width:180px; height:3px; background:rgba(255,255,255,0.2); border-radius:10px; margin:0 auto 16px; overflow:hidden; }
.splash-bar { height:100%; width:0; background:#FFD700; border-radius:10px; animation:splashLoad 1.5s ease-in-out forwards; }
@keyframes splashLoad { 0%{width:0} 50%{width:70%} 100%{width:100%} }
.splash-creator { font-size:.75rem; opacity:.6; }

/* ===== Onboarding ===== */
.onboarding { position:fixed; inset:0; background:var(--surface); z-index:500; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:32px; }
.onboarding.hidden { display:none; }
.ob-slides { max-width:400px; width:100%; min-height:300px; position:relative; }
.ob-slide { display:none; flex-direction:column; align-items:center; text-align:center; animation:fadeIn .4s; }
.ob-slide.active { display:flex; }
.ob-icon { font-size:4rem; margin-bottom:16px; animation:pulse 2s infinite; }
.ob-slide h2 { color:var(--primary); font-size:1.3rem; margin-bottom:10px; }
.ob-slide p { color:var(--text-secondary); line-height:1.7; font-size:.92rem; }
.ob-start-btn { margin-top:16px; background:var(--gradient); color:#fff; border:none; padding:12px 32px; border-radius:100px; font-size:1rem; font-weight:600; cursor:pointer; transition:transform .2s; }
.ob-start-btn:hover { transform:scale(1.05); }
.ob-dots { display:flex; gap:8px; margin:20px 0 12px; }
.ob-dot { width:10px; height:10px; border-radius:50%; background:var(--border); cursor:pointer; transition:all .3s; }
.ob-dot.active { background:var(--primary); width:28px; border-radius:10px; }
.ob-nav { display:flex; gap:16px; align-items:center; }
.ob-skip { background:none; border:none; color:var(--text-light); cursor:pointer; font-size:.85rem; padding:8px 16px; }
.ob-next { background:var(--gradient); color:#fff; border:none; padding:10px 28px; border-radius:100px; cursor:pointer; font-size:.92rem; font-weight:500; transition:transform .2s; }
.ob-next:hover { transform:scale(1.04); }

/* ===== Achievements ===== */
.ach-banner { background:var(--gradient-warm); color:#fff; border-radius:var(--radius); padding:14px 20px; margin-bottom:16px; display:flex; align-items:center; gap:14px; cursor:pointer; animation:slideUp .4s; }
.ach-banner.hidden { display:none; }
.ach-banner.ach-banner-hide { opacity:0; transform:translateY(-20px); transition:all .4s; }
.ach-badge { font-size:2rem; }
.ach-info { line-height:1.5; font-size:.88rem; }
.ach-modal { position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:300; display:flex; align-items:center; justify-content:center; padding:20px; }
.ach-modal.hidden { display:none; }
.ach-modal-content { background:var(--surface); border-radius:var(--radius); max-width:500px; width:100%; max-height:80vh; overflow-y:auto; box-shadow:0 8px 40px rgba(0,0,0,0.2); animation:slideUp .3s; }
.ach-modal-header { display:flex; justify-content:space-between; align-items:center; padding:18px 22px; border-bottom:1px solid var(--border); }
.ach-modal-header h2 { color:var(--primary); font-size:1.1rem; }
.ach-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; padding:20px; }
.ach-item { text-align:center; padding:16px 10px; border-radius:var(--radius-sm); border:1px solid var(--border); transition:all .2s; }
.ach-item:hover { border-color:var(--accent); }
.ach-done { background:var(--bg); }
.ach-locked { opacity:.4; }
.ach-icon { font-size:2rem; margin-bottom:6px; }
.ach-name { font-weight:600; font-size:.85rem; color:var(--text); }
.ach-desc { font-size:.72rem; color:var(--text-light); margin-top:2px; }
.ach-done .ach-icon { animation:pulse 3s infinite; }

/* ===== Exam Badge ===== */
.exam-badge { display:inline-block; font-size:.6rem; padding:2px 10px; border-radius:20px; background:var(--accent); color:#fff; font-weight:600; margin-top:4px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  #sidebar { width: 100%; }
  #sidebar.hidden { display: block !important; transform: translateX(-100%); }
  .stats { gap: 16px; }
  .stat span { font-size: 1.4rem; }
  .welcome-card { padding: 28px 20px; }
  .welcome-card h1 { font-size: 1.4rem; }
  .feature-grid { grid-template-columns:repeat(auto-fill,minmax(100px,1fr)); }
  .ach-grid { grid-template-columns:repeat(2,1fr); }
}

@media (min-width: 769px) {
  #sidebar.hidden + #mainContent { margin-left: 0; }
  #sidebar:not(.hidden) ~ #mainContent { margin-left: 300px; }
}

/* ===== Streak Card ===== */
.streak-card {
  background: var(--gradient-warm);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0;
  box-shadow: var(--shadow);
  animation: fadeIn .3s forwards;
}

/* ===== Stats Dashboard ===== */
.stats-dashboard {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: fadeIn .3s forwards;
}
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: .85rem;
}
.stats-detail-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background .2s;
}
.stats-detail-btn:hover { background: rgba(201,162,39,0.1); }
.stats-row {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 8px;
}
.stat-card {
  text-align: center;
  padding: 8px 4px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.stat-card .stat-num {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}
.stat-card .stat-lbl {
  display: block;
  font-size: .65rem;
  color: var(--text-light);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.dark .stat-card { background: rgba(255,255,255,0.04); }
.stat-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: .8rem;
  border-bottom: 1px solid var(--border);
}
.stat-bar-item span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-bar-fill {
  height: 8px;
  background: var(--gradient);
  border-radius: 4px;
  min-width: 4px;
  transition: width .5s;
}

/* ===== Skeleton Loading ===== */
.skeleton-wrap { padding: 16px 0; }
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--surface) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.skeleton-title { height: 24px; width: 60%; }
.skeleton-text { height: 14px; width: 100%; }
.skeleton-text.short { width: 40%; }
.skeleton-block { height: 80px; width: 100%; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ===== Note Editor ===== */
.note-editor {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  resize: vertical;
  font-family: var(--font);
  transition: border-color .2s;
}
.note-editor:focus { border-color: var(--accent); }
.dark .note-editor { background: rgba(255,255,255,0.04); }

/* ===== Premium Modal ===== */
.premium-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .3s;
}
.premium-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.premium-lock { font-size: 3rem; display: block; margin-bottom: 8px; }
.premium-header h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 4px; }
.premium-content p { font-size: .85rem; color: var(--text-secondary); margin: 12px 0; line-height: 1.5; }
.premium-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 16px 0;
}
.premium-price small { font-size: .7rem; font-weight: 400; color: var(--text-light); }
.premium-buy {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  margin-bottom: 8px;
}
.premium-buy:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.premium-skip {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: .8rem;
  cursor: pointer;
  padding: 8px;
}
.premium-skip:hover { color: var(--text); }

/* ===== Premium Themes Grid ===== */
.theme-grid { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin:12px 0; }
.theme-option { width:72px; height:72px; border-radius:var(--radius-sm); border:3px solid var(--border); cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; font-size:.6rem; font-weight:600; transition:all .2s; }
.theme-option:hover { transform:scale(1.08); }
.theme-option.active { border-color:var(--accent); box-shadow:0 0 12px var(--accent-glow); }
.theme-swatch { width:32px; height:32px; border-radius:50%; }
.theme-swatch.default { background:linear-gradient(135deg,#800000,#A52A2A); }
.theme-swatch.midnight { background:linear-gradient(135deg,#1a237e,#283593); }
.theme-swatch.emerald { background:linear-gradient(135deg,#004d40,#00695c); }
.theme-swatch.rosegold { background:linear-gradient(135deg,#880e4f,#ad1457); }

/* ===== Premium Theme Variables ===== */
.theme-midnight { --primary:#1a237e; --primary-light:#283593; --primary-dark:#0f1642; --gradient:linear-gradient(135deg,#1a237e,#283593); --gradient-warm:linear-gradient(135deg,#1a237e 0%,#283593 50%,#0f1642 100%); }
.theme-emerald { --primary:#004d40; --primary-light:#00695c; --primary-dark:#00332a; --gradient:linear-gradient(135deg,#004d40,#00695c); --gradient-warm:linear-gradient(135deg,#004d40 0%,#00695c 50%,#00332a 100%); }
.theme-rosegold { --primary:#880e4f; --primary-light:#ad1457; --primary-dark:#5c0a33; --gradient:linear-gradient(135deg,#880e4f,#ad1457); --gradient-warm:linear-gradient(135deg,#880e4f 0%,#ad1457 50%,#5c0a33 100%); }
.dark.theme-midnight { --primary:#5c6bc0; --primary-light:#7986cb; --gradient:linear-gradient(135deg,#1a237e,#283593); }
.dark.theme-emerald { --primary:#26a69a; --primary-light:#4db6ac; --gradient:linear-gradient(135deg,#004d40,#00695c); }
.dark.theme-rosegold { --primary:#ec407a; --primary-light:#f06292; --gradient:linear-gradient(135deg,#880e4f,#ad1457); }

/* ===== SRS Review ===== */
.srs-card { background:var(--surface); border-radius:var(--radius-sm); padding:14px 16px; margin:8px 0; border:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.srs-card .srs-info { flex:1; }
.srs-card .srs-info h4 { font-size:.9rem; margin-bottom:2px; }
.srs-card .srs-info p { font-size:.75rem; color:var(--text-light); }
.srs-badge { font-size:.65rem; padding:3px 10px; border-radius:20px; font-weight:700; }
.srs-badge.due-soon { background:#fff3e0; color:#e65100; }
.srs-badge.due-today { background:#fce4ec; color:#c62828; }
.srs-badge.reviewed { background:#e8f5e9; color:#2e7d32; }
.dark .srs-badge.due-soon { background:rgba(230,81,0,0.2); }
.dark .srs-badge.due-today { background:rgba(198,40,40,0.2); }
.dark .srs-badge.reviewed { background:rgba(46,125,50,0.2); }

/* ===== Advanced Analytics ===== */
.analytics-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0; }
.analytics-card { background:var(--surface); border-radius:var(--radius-sm); padding:14px; text-align:center; border:1px solid var(--border); }
.analytics-card .a-icon { font-size:1.4rem; }
.analytics-card .a-value { font-size:1.6rem; font-weight:700; color:var(--primary); }
.analytics-card .a-label { font-size:.7rem; color:var(--text-light); text-transform:uppercase; letter-spacing:.5px; }
.trend-up { color:#4caf50; } .trend-down { color:#f44336; }

/* ===== Collection Gallery ===== */
.collection-date { font-size:.65rem; color:var(--text-light); margin-top:2px; }
.ach-item.locked .collection-date { display:none; }

/* ===== Premium Vocab ===== */
.premium-vocab-btn { background:var(--gradient); color:#fff; border:none; padding:10px 20px; border-radius:var(--radius-sm); font-size:.85rem; cursor:pointer; margin:8px auto; display:block; font-weight:600; transition:transform .2s; }
.premium-vocab-btn:hover { transform:scale(1.02); }

/* ===== Page Transition ===== */
#mainContent { animation: pageIn .35s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Toast Notification ===== */
#toastContainer {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  pointer-events: none;
}
.toast {
  background: var(--surface);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  font-size: .85rem;
  font-weight: 500;
  animation: toastIn .3s ease forwards;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.toast.toast-success { border-left: 3px solid #4caf50; }
.toast.toast-info { border-left: 3px solid var(--accent); }
.toast.toast-warning { border-left: 3px solid #e67e22; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(20px); } }

/* ===== Confetti Canvas ===== */
#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

/* ===== Button Ripple ===== */
.ripple-btn { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: rippleAnim .5s ease-out;
  pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }
.dark .ripple { background: rgba(255,255,255,0.15); }

/* ===== Reading Progress Bar ===== */
#readingProgress {
  position: fixed;
  top: 52px;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient);
  z-index: 99;
  transition: width .1s linear;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ===== Glow Card Hover ===== */
.feature-card, .exam-card, .quick-card {
  transition: transform .25s, box-shadow .25s, border-color .25s !important;
}
.feature-card.prem { position:relative; }
.feature-card.prem::after { content:'⭐'; position:absolute; top:-4px; right:-4px; font-size:.6rem; }

/* ===== Login / Admin ===== */
.login-btn { background:none; border:1px solid var(--border); color:var(--text); padding:6px 14px; border-radius:20px; font-size:.75rem; cursor:pointer; transition:all .2s; }
.login-btn:hover { border-color:var(--accent); color:var(--accent); }
.admin-card { background:var(--surface); border-radius:var(--radius-sm); padding:12px 14px; margin:6px 0; border:1px solid var(--border); display:flex; align-items:center; gap:12px; }
.admin-card .admin-avatar { width:36px; height:36px; border-radius:50%; background:var(--gradient); display:flex; align-items:center; justify-content:center; font-size:.9rem; flex-shrink:0; overflow:hidden; }
.admin-card .admin-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.admin-card .admin-info { flex:1; min-width:0; }
.admin-card .admin-info h4 { font-size:.8rem; margin-bottom:1px; }
.admin-card .admin-info p { font-size:.65rem; color:var(--text-light); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-card .admin-badge { font-size:.6rem; padding:2px 8px; border-radius:20px; background:var(--accent); color:#fff; font-weight:700; }

/* Profile pic upload */
.profile-pic-wrap { position:relative; width:72px; height:72px; margin:0 auto 12px; cursor:pointer; border-radius:50%; overflow:hidden; }
.profile-pic-wrap img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.profile-pic-wrap .pic-overlay { position:absolute; inset:0; background:rgba(0,0,0,0.4); display:flex; align-items:center; justify-content:center; border-radius:50%; opacity:0; transition:opacity .2s; font-size:1.2rem; }
.profile-pic-wrap:hover .pic-overlay { opacity:1; }
.feature-card:hover, .exam-card:hover, .quick-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 0 20px var(--accent-glow), var(--shadow-hover) !important;
  border-color: var(--accent) !important;
}
.exam-card:hover .exam-icon { animation: bounce .4s ease; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ===== Profile Dashboard ===== */
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 12px;
  box-shadow: 0 4px 20px rgba(128,0,0,0.3);
}
.profile-streak-bar {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin: 12px 0;
}
.profile-streak-bar .streak-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  transition: background .3s;
}
.profile-streak-bar .streak-dot.active { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.profile-streak-bar .streak-dot.today { background: var(--primary); box-shadow: 0 0 8px rgba(128,0,0,0.4); }

/* ===== Vibration Feedback ===== */
@keyframes vibrate { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.vibrate { animation: vibrate .15s ease; }

/* ===== Base font size ===== */
body { font-size: var(--fs-base, 15px); }

/* ===== Table Styles (Grammar Comparison) ===== */
.content-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: .88rem;
}
.content-table thead { background: var(--gradient); color: #fff; }
.content-table th { padding: 10px 14px; text-align: left; font-weight: 600; font-size: .82rem; letter-spacing: .3px; }
.content-table td { padding: 9px 14px; border-bottom: 1px solid var(--border); line-height: 1.6; }
.content-table tbody tr { transition: background .2s; }
.content-table tbody tr:hover { background: rgba(128,0,0,0.04); }
.content-table tbody tr:last-child td { border-bottom: none; }
.content-table .tag { font-size: .65rem; padding: 1px 8px; }
.dark .content-table tbody tr:hover { background: rgba(255,255,255,0.04); }

/* ===== Callout / Info Boxes ===== */
.callout {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  border-left: 4px solid;
  font-size: .9rem;
  line-height: 1.6;
}
.callout.info { background: rgba(33,150,243,0.08); border-color: #2196f3; color: var(--text); }
.callout.success { background: rgba(76,175,80,0.08); border-color: #4caf50; color: var(--text); }
.callout.warning { background: rgba(255,152,0,0.08); border-color: #ff9800; color: var(--text); }
.callout.error { background: rgba(244,67,54,0.08); border-color: #f44336; color: var(--text); }
.callout .callout-title { font-weight: 700; font-size: .85rem; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.callout.info .callout-title { color: #2196f3; }
.callout.success .callout-title { color: #4caf50; }
.callout.warning .callout-title { color: #ff9800; }
.callout.error .callout-title { color: #f44336; }
.dark .callout.info { background: rgba(33,150,243,0.12); }
.dark .callout.success { background: rgba(76,175,80,0.12); }
.dark .callout.warning { background: rgba(255,152,0,0.12); }
.dark .callout.error { background: rgba(244,67,54,0.12); }

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
}
.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: .5;
}
.empty-state h4 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: .85rem; line-height: 1.5; max-width: 300px; margin: 0 auto; }

/* ===== Badge / Status Dot ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2px;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.badge-success { background: rgba(76,175,80,0.12); color: #2e7d32; }
.badge-success .badge-dot { background: #4caf50; }
.badge-warning { background: rgba(255,152,0,0.12); color: #e65100; }
.badge-warning .badge-dot { background: #ff9800; }
.badge-error { background: rgba(244,67,54,0.12); color: #c62828; }
.badge-error .badge-dot { background: #f44336; }
.badge-info { background: rgba(33,150,243,0.12); color: #1565c0; }
.badge-info .badge-dot { background: #2196f3; }
.badge-premium { background: rgba(201,162,39,0.15); color: #b8860b; }
.badge-premium .badge-dot { background: var(--accent); }
.dark .badge-success { background: rgba(76,175,80,0.2); }
.dark .badge-warning { background: rgba(255,152,0,0.2); }
.dark .badge-error { background: rgba(244,67,54,0.2); }
.dark .badge-info { background: rgba(33,150,243,0.2); }
.dark .badge-premium { background: rgba(201,162,39,0.2); }

/* ===== Compact Info Card ===== */
.card-compact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 8px 0;
  transition: box-shadow .2s;
}
.card-compact:hover { box-shadow: var(--shadow-hover); }
.card-compact .card-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.card-compact .card-body { flex: 1; }
.card-compact .card-body h5 { font-size: .88rem; font-weight: 600; margin-bottom: 2px; }
.card-compact .card-body p { font-size: .82rem; color: var(--text-secondary); line-height: 1.5; margin: 0; }

/* ===== Avatar Initials Fallback ===== */
.avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ===== Custom Radio Buttons (MCQ) ===== */
.radio-custom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all .2s;
  margin: 4px 0;
  width: 100%;
}
.radio-custom:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.radio-custom .radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.radio-custom .radio-circle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transform: scale(0);
  transition: transform .2s;
}
.radio-custom input { display: none; }
.radio-custom input:checked + .radio-circle { border-color: var(--primary); }
.radio-custom input:checked + .radio-circle::after { transform: scale(1); }
.radio-custom input:checked ~ span { font-weight: 700; }
.radio-custom:hover .radio-circle { border-color: #fff; }
.radio-custom:hover .radio-circle::after { background: #fff; }

/* ===== Stat Bar Helpers ===== */
.stat-bar-bg {
  width: 80px;
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.stat-bar-pct { font-size: .78rem; color: var(--text-light); min-width: 32px; text-align: right; }

/* ===== Modal Body Scroll ===== */
.modal-body-scroll {
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
  margin: -4px;
}
.modal-body-scroll::-webkit-scrollbar { width: 4px; }
.modal-body-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
.modal-body-scroll::-webkit-scrollbar-track { background: transparent; }

/* ===== Text Selection ===== */
::selection { background: var(--accent); color: #1a1a1a; }
.dark ::selection { background: var(--accent); color: #1a1a1a; }

/* ===== Print Styles ===== */
@media print {
  #sidebar, #bottomNav, .btn-back, .btn-share, .print-hide { display: none !important; }
  #mainContent { padding: 0 !important; margin: 0 !important; }
  body { background: #fff !important; color: #000 !important; font-size: 12pt; }
  .chapter-header, .chapter-section, .exam-content, .exam-card { background: #fff !important; border-color: #ccc !important; box-shadow: none !important; page-break-inside: avoid; }
  a { color: #000 !important; }
  .content-table { border-color: #000 !important; }
  .content-table thead { background: #333 !important; }
  @page { margin: 1.5cm; }
}

/* ===== Difficulty / Chapter Meta Tags ===== */
.meta-tag {
  display: inline-block;
  font-size: .65rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.meta-tag.beginner { background: rgba(76,175,80,0.12); color: #2e7d32; }
.meta-tag.intermediate { background: rgba(255,152,0,0.12); color: #e65100; }
.meta-tag.advanced { background: rgba(244,67,54,0.12); color: #c62828; }
.meta-tag.exam { background: rgba(33,150,243,0.12); color: #1565c0; }
.dark .meta-tag.beginner { background: rgba(76,175,80,0.25); }
.dark .meta-tag.intermediate { background: rgba(255,152,0,0.25); }
.dark .meta-tag.advanced { background: rgba(244,67,54,0.25); }
.dark .meta-tag.exam { background: rgba(33,150,243,0.25); }

/* ===== Link Styles ===== */
.content-link {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary);
  transition: border .2s;
}
.content-link:hover { border-bottom-style: solid; }

/* ===== Heading Hierarchy in Content ===== */
.chapter-section h3 { font-size: 1.15rem; color: var(--primary); margin: 18px 0 8px; }
.chapter-section h4 { font-size: 1rem; color: var(--text); margin: 14px 0 6px; font-weight: 600; }
.chapter-section h5 { font-size: .92rem; color: var(--text-secondary); margin: 10px 0 4px; font-weight: 600; }

/* ===== Responsive Tablet Enhancements ===== */
@media (min-width: 768px) {
  #mainContent { padding: 24px 32px 72px; }
  .chapter-header h2 { font-size: 1.7rem; }
  .chapter-section { padding: 28px; }
  .exam-card { padding: 20px 24px; }
  .exam-card h3 { font-size: 1.15rem; }
  .feature-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .feature-card { font-size: 1.6rem; padding: 20px 12px; }
  .content-table { font-size: .92rem; }
  .modal-content { max-width: 600px; }
}

/* ===== Smooth Reveal ===== */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .4s ease, transform .4s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Bottom Sheet Alternative ===== */
.sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; opacity: 0; transition: opacity .3s; pointer-events: none; }
.sheet-overlay.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-radius: 20px 20px 0 0; z-index: 201; transform: translateY(100%); transition: transform .3s cubic-bezier(0.4,0,0.2,1); max-height: 85vh; overflow-y: auto; }
.sheet.open { transform: translateY(0); }
.sheet .sheet-handle { width: 36px; height: 4px; background: var(--border); border-radius: 10px; margin: 10px auto 6px; }
.sheet .sheet-content { padding: 12px 20px 24px; }

/* ===== Daily Target Card ===== */
.daily-target-card {
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: fadeIn .4s ease forwards;
}
.dt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 10px;
}
.dt-badge {
  font-size: .75rem;
  padding: 3px 12px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.dt-bar {
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  overflow: hidden;
}
.dt-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffd700);
  border-radius: 10px;
  transition: width .5s ease;
}
.dt-footer {
  font-size: .78rem;
  color: var(--text-light);
  margin-top: 8px;
  text-align: center;
}
.dark .daily-target-card { background: rgba(255,255,255,0.04); }

/* ===== New Features CSS ===== */
/* Grammar Checker textarea */
#gcInput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,162,39,0.15); }
#gcResult .callout { margin: 4px 0 !important; padding: 8px 12px !important; font-size: .85rem !important; }

/* Vocab Grid for TTS */
.vocab-grid .card-compact { margin: 6px 0 !important; }
.vocab-grid .card-icon button { font-size: 1.5rem; background: none; border: none; cursor: pointer; padding: 0; transition: transform .2s; }
.vocab-grid .card-icon button:hover { transform: scale(1.2); }
.vocab-grid .card-icon button:active { transform: scale(0.9); }

/* Story Mode Input */
#storyInput { width: 120px; padding: 6px 10px; border-radius: var(--radius-sm); border: 2px solid var(--accent); background: var(--surface); color: var(--text); font-size: .95rem; outline: none; transition: box-shadow .2s; }
#storyInput:focus { box-shadow: 0 0 0 3px rgba(201,162,39,0.2); }

/* Hangman Keyboard */
.hangman-keyboard { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; max-width: 400px; margin: 0 auto; }
.hangman-key { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; font-size: .85rem; transition: all .2s; }
.hangman-key:disabled { opacity: .5; cursor: default; }
.hangman-key:not(:disabled):hover { background: var(--primary); color: #fff; }

/* Study Plan Cards */
.card-compact { cursor: pointer; }
.card-compact:hover { box-shadow: var(--shadow-hover); }

/* Exam Calendar */
.exam-card.passed { opacity: .5; }
.exam-card .exam-date { font-size: .75rem; color: var(--text-light); }

/* Translation Mode */
.trans-mode-btn { font-size: .8rem; padding: 6px 14px; border-radius: 100px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: all .2s; }
.trans-mode-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Animated Background Particles */
#bgCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* TTS Button */
.tts-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 4px; transition: transform .2s; border-radius: 50%; }
.tts-btn:hover { transform: scale(1.2); }
.tts-btn:active { transform: scale(0.9); }

/* Leaderboard Entries */
.lb-entry { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 4px 0; border-radius: var(--radius-sm); border: 1px solid var(--border); transition: background .2s; }
.lb-entry:hover { background: rgba(128,0,0,0.03); }
.lb-entry .lb-rank { font-size: 1.1rem; font-weight: 700; width: 28px; text-align: center; }
.lb-entry .lb-name { flex: 1; font-weight: 500; font-size: .9rem; }
.lb-entry .lb-score { font-weight: 700; color: var(--accent); }
.lb-entry.me { border-color: var(--accent); background: rgba(201,162,39,0.06); }

/* Dark Mode Tab Item */
#darkModeBtn { flex: .6; min-width: 44px; }

/* ===== New Features CSS ===== */
/* Share Card Canvas */
#shareCanvas { max-width: 400px; width: 100%; height: auto; aspect-ratio: 400/560; border-radius: var(--radius); }

/* Voice Button */
#voiceBtn { width: 48px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-size: 1.3rem; cursor: pointer; transition: all .2s; flex-shrink: 0; }
#voiceBtn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
#voiceBtn:active { transform: scale(0.95); }

/* Bangla UI tab labels */
.bn-ui .tab-label { font-family: var(--font-bn, 'Noto Sans Bengali', sans-serif); }

/* Quick Rules Search */
#rulesSearch:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,162,39,0.15); }

/* Cloud Sync */
#cloudUrlInput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,162,39,0.15); }

/* Writing Input */
#writingInput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,162,39,0.15); }

/* Reminder checkbox */
#reminderEnable { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
