:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --bg-card: rgba(31, 41, 55, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.4);
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-glow: rgba(99, 102, 241, 0.2);
  --accent-cyan: #06b6d4;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
}

/* APP LAYOUT */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.04) 0%, transparent 40%);
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}

.brand {
  margin-bottom: 28px;
  padding: 0 8px;
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 8px;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: #c7d2fe;
  border: 1px solid var(--border-highlight);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.nav-item .icon {
  font-size: 16px;
}

.user-stats-card {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-md);
  margin-top: auto;
}

.stat-header {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

.progress-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}

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

.stat-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.stat-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

/* MAIN CONTENT */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-bar {
  height: 64px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.breadcrumbs {
  font-size: 14px;
  color: var(--text-secondary);
}

.crumb-root {
  color: var(--text-muted);
}

#current-section-title {
  color: var(--text-primary);
  font-weight: 600;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.content-scrollable {
  flex-grow: 1;
  overflow-y: auto;
  padding: 32px;
}

/* TAB PANES */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

/* HERO CARD */
.hero-card {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.8) 0%, rgba(17, 24, 39, 0.9) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.badge-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.15);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.hero-heading {
  font-size: 28px;
  font-weight: 800;
  margin-top: 14px;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 750px;
  margin-top: 12px;
  line-height: 1.6;
}

.hero-metrics {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.metric-box {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border-color);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  min-width: 140px;
}

.metric-box.highlight {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

.metric-num {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.metric-box.highlight .metric-num {
  color: #a5b4fc;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* GRID LAYOUTS */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.styled-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.styled-list li {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.styled-list li::before {
  content: '•';
  color: var(--accent-primary);
  font-size: 20px;
  position: absolute;
  left: 0;
  top: -3px;
}

.styled-list strong {
  color: var(--text-primary);
}

.principle-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.principle-item:last-child {
  border-bottom: none;
}

.p-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 16px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.principle-item h4 {
  font-size: 14px;
  font-weight: 600;
}

.principle-item p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* BILINGUAL TEMPLATE VIEWER */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
}

.sub-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.section-header p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.template-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.template-header {
  padding: 16px 20px;
  background: rgba(17, 24, 39, 0.9);
  border-bottom: 1px solid var(--border-color);
}

.tab-pills {
  display: flex;
  gap: 8px;
}

.pill {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.pill.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.bilingual-viewer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}

.col-side {
  padding: 28px;
}

.vi-side {
  border-right: 1px solid var(--border-color);
  background: rgba(17, 24, 39, 0.3);
}

.en-side {
  background: rgba(31, 41, 55, 0.2);
}

.doc-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.doc-badge.accent {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.doc-canvas {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.doc-canvas strong {
  color: var(--text-primary);
}

.center-text {
  text-align: center;
}

.short-line {
  width: 100px;
  margin: 6px auto;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stamp-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-cyan);
  font-style: italic;
}

.signature-box {
  display: flex;
  justify-content: space-between;
}

.left-col { font-size: 12px; }
.right-col { text-align: center; }

/* ACADEMIC PAIRS */
.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.box-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #c7d2fe;
}

.bilingual-pair {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.term-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(17, 24, 39, 0.5);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-primary);
}

.vi-term {
  font-size: 13px;
  color: var(--text-secondary);
}

.en-term {
  font-size: 13.5px;
  font-weight: 600;
  color: #a5b4fc;
}

.alert-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

/* LEGAL ANATOMY */
.doc-anatomy {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
}

.anatomy-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.anatomy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.a-cell {
  background: rgba(17, 24, 39, 0.6);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
}

.label-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.vi-sample {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.en-sample {
  font-size: 13px;
  color: #93c5fd;
  margin-top: 8px;
  line-height: 1.5;
  border-top: 1px dotted var(--border-color);
  padding-top: 8px;
}

.a-center {
  background: rgba(17, 24, 39, 0.6);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
  text-align: center;
}

.a-body {
  background: rgba(17, 24, 39, 0.6);
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
}

.sample-lines p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.sample-lines code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  color: #86efac;
}

/* CLAUSES */
.clause-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.clause-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.clause-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #c7d2fe;
  margin-bottom: 10px;
}

.vi-clause {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.en-clause {
  font-size: 13.5px;
  color: #bfdbfe;
  line-height: 1.5;
}

.rule-hint {
  display: block;
  font-size: 12px;
  color: var(--accent-cyan);
  margin-top: 10px;
  font-style: italic;
}

/* GLOSSARY TABLE */
.search-box {
  width: 320px;
}

.search-box input {
  width: 100%;
  padding: 10px 16px;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.table-responsive {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.data-table th {
  background: rgba(17, 24, 39, 0.9);
  padding: 14px 20px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

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

.tag-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
}

/* QUIZ TRAINER */
.quiz-container {
  max-width: 760px;
  margin: 0 auto;
}

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.question-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 24px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option {
  padding: 14px 18px;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.quiz-option:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.quiz-option.selected-correct {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--success);
  color: #6ee7b7;
}

.quiz-option.selected-wrong {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
  color: #fca5a5;
}

.explanation-box {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(17, 24, 39, 0.9);
  border-left: 3px solid var(--accent-primary);
  font-size: 13px;
  line-height: 1.5;
  color: #c7d2fe;
}

/* CHEATSHEET */
.cheatsheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cheat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.cheat-heading {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.check-list input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
  margin-top: 2px;
  cursor: pointer;
}

.mistake-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mistake-item {
  background: rgba(17, 24, 39, 0.6);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.m-bad {
  font-size: 13px;
  color: #fca5a5;
  margin-bottom: 4px;
}

.m-good {
  font-size: 13px;
  color: #86efac;
}

/* UTILITY CLASSES */
.bold { font-weight: 700; }
.italic { font-style: italic; }
.small { font-size: 12px; }
.color-accent { color: var(--accent-cyan); }
.text-right { text-align: right; }
.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 14px 0;
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.simple-table th, .simple-table td {
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  font-size: 12.5px;
}

.simple-table th {
  background: rgba(255, 255, 255, 0.05);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
    height: auto;
    overflow-y: auto;
  }
  .sidebar {
    width: 100%;
    height: auto;
  }
  .grid-2-col, .bilingual-viewer, .anatomy-grid, .clause-grid, .cheatsheet-grid {
    grid-template-columns: 1fr;
  }
  .vi-side {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

/* CLOUD NOTES & EDITOR STYLES */
.cloud-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  color: #6ee7b7;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-dot.offline {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.note-editor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.note-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: #c7d2fe;
}

.form-group input, .form-group textarea {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.notes-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}

.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  position: relative;
  transition: all 0.2s ease;
}

.note-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.note-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.note-date-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.note-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.note-sub-block {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(17, 24, 39, 0.6);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-primary);
}

.note-sub-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.note-sub-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.btn-delete-note {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete-note:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
}

/* MOCK EXAM MODE STYLES */
.mode-switch-pills {
  display: flex;
  gap: 8px;
}

.exam-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border-highlight);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.exam-timer-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timer-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.timer-clock {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  color: #a5b4fc;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.3);
  letter-spacing: 2px;
}

.timer-clock.warning {
  color: #fca5a5;
  border-color: var(--danger);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.exam-actions {
  display: flex;
  gap: 12px;
}

.exam-banner {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.exam-banner.pending {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

.exam-banner.running {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #86efac;
}

.exam-banner.finished {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.exam-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.exam-section-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.exam-prompt-box {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
}

.exam-quote {
  font-size: 14px;
  line-height: 1.6;
  color: #c7d2fe;
  margin-top: 10px;
  border-left: 3px solid var(--accent-cyan);
  padding-left: 16px;
  font-style: italic;
}

.d-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#exam-essay-input {
  width: 100%;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}

#exam-essay-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.exam-mcq-card {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.exam-mcq-q {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.exam-mcq-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.exam-mcq-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(31, 41, 55, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.exam-mcq-label:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.exam-mcq-label input[type="radio"] {
  accent-color: var(--accent-primary);
}

/* INFINITE TRANSLATION DRILL STYLES */
.infinite-stats-bar {
  display: flex;
  gap: 12px;
}

.stat-pill {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.infinite-filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 90px;
}

.infinite-challenge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.challenge-source {
  background: rgba(17, 24, 39, 0.7);
  border: 1px dashed var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.challenge-source h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  color: #fff;
}

.hint-text {
  font-size: 13px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--warning);
  padding: 8px 12px;
  border-radius: 4px;
  font-style: italic;
}

.challenge-input-box textarea {
  width: 100%;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  outline: none;
  transition: all 0.2s ease;
  resize: vertical;
}

.challenge-input-box textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

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

.left-actions, .right-actions {
  display: flex;
  gap: 10px;
}

.result-status-header {
  font-size: 15px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-status-header.exact {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid var(--success);
}

.result-status-header.close {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid var(--warning);
}

.result-status-header.mismatch {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid var(--danger);
}


