:root {
  --nv-green: #76b900;
  --nv-green-hover: #88d400;
  --nv-green-glow: rgba(118, 185, 0, 0.25);
  --nv-green-subtle: rgba(118, 185, 0, 0.1);
  --bg-primary: #090d14;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: rgba(15, 23, 42, 0.85);
  --border-subtle: rgba(148, 163, 184, 0.15);
  --border-accent: rgba(118, 185, 0, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse at 15% 10%, rgba(118, 185, 0, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(30, 41, 59, 0.5) 0%, transparent 60%);
  background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--nv-green);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 13, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #101c0c, #162c0e);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nv-green);
  box-shadow: 0 0 16px var(--nv-green-glow);
}

.brand-titles h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-titles h1 span.accent {
  color: var(--nv-green);
}

.brand-titles p {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Course Selector Dropdown */
.course-selector-wrap {
  position: relative;
}

.course-select-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.course-select-btn:hover {
  border-color: var(--border-accent);
  background: var(--bg-tertiary);
}

.course-select-btn .code-badge {
  background: var(--nv-green-subtle);
  color: var(--nv-green);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.nav-tab-btn:hover {
  color: var(--text-main);
}

.nav-tab-btn.active {
  background: var(--bg-tertiary);
  color: var(--nv-green);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.search-trigger-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-trigger-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-main);
}

.search-shortcut {
  background: var(--bg-tertiary);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

.btn-download-pptx {
  background: linear-gradient(135deg, var(--nv-green), #5c9300);
  color: #060a04;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 0 14px var(--nv-green-glow);
  transition: all var(--transition-fast);
}

.btn-download-pptx:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(118, 185, 0, 0.4);
}

.btn-hub-back {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-hub-back:hover {
  color: var(--text-main);
  border-color: var(--text-dim);
}

/* Main Content Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* View Sections */
.view-section {
  display: none;
  flex: 1;
}

.view-section.active {
  display: flex;
  flex-direction: column;
}

/* SLIDES VIEW */
.slides-view-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 62px);
  max-height: calc(100vh - 62px);
  overflow: hidden;
  position: relative;
}

/* Slides Sidebar Drawer */
.slides-sidebar {
  width: 320px;
  border-right: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.slides-sidebar.collapsed {
  display: none;
}

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

.sidebar-header h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.sidebar-search-box {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  color: var(--text-main);
  font-size: 0.8rem;
  outline: none;
}

.sidebar-search-input:focus {
  border-color: var(--nv-green);
}

.sidebar-slides-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  height: calc(100% - 105px);
}

.sidebar-slide-item {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.3rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.sidebar-slide-item:hover {
  background: var(--bg-tertiary);
}

.sidebar-slide-item.active {
  background: rgba(118, 185, 0, 0.12);
  border-color: var(--border-accent);
}

.sidebar-slide-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--nv-green);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.sidebar-slide-title {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sidebar-slide-notes-indicator {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* Slide Stage and Notes */
.slide-stage-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 2.5rem;
  gap: 1.25rem;
  overflow-y: auto;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Slide Controls Bar */
.slide-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.65rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.controls-left, .controls-center, .controls-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-ctrl {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ctrl:hover:not(:disabled) {
  background: var(--nv-green);
  color: #000;
  border-color: var(--nv-green);
}

.btn-ctrl:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.slide-counter-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-primary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.part-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nv-green);
  background: var(--nv-green-subtle);
  border: 1px solid var(--border-accent);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
}

/* Slide Canvas */
.slide-canvas-card {
  background: linear-gradient(145deg, #0d1525, #0a0f1c);
  border: 1px solid rgba(118, 185, 0, 0.25);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  min-height: 380px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(118, 185, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.slide-canvas-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--nv-green), transparent);
}

.slide-card-header {
  margin-bottom: 1.5rem;
}

.slide-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.slide-number-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--nv-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.slide-card-title {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.slide-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.slide-body-bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1.12rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.slide-bullet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nv-green);
  margin-top: 0.55rem;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--nv-green-glow);
}

.slide-progress-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.progress-track {
  flex: 1;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  margin: 0 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--nv-green);
  border-radius: 2px;
  transition: width var(--transition-fast);
}

/* Speaker Notes Panel */
.speaker-notes-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
  position: relative;
}

.speaker-notes-card.highlight-notes {
  border-color: var(--border-accent);
}

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

.notes-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.notes-title-group h4 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.notes-badge {
  background: rgba(118, 185, 0, 0.15);
  color: var(--nv-green);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.notes-content-box {
  line-height: 1.7;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.notes-content-box p {
  margin-bottom: 0.75rem;
}

.notes-content-box ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0.75rem;
}

.notes-content-box li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.5rem;
}

.notes-content-box li::before {
  content: '•';
  position: absolute;
  left: 0.35rem;
  color: var(--nv-green);
  font-size: 1.1rem;
  line-height: 1.4;
}

.notes-content-box li.sub-bullet {
  padding-left: 2.25rem;
}

.notes-content-box li.sub-bullet::before {
  content: '◦';
  left: 1.35rem;
  color: var(--text-muted);
}

.notes-content-box strong {
  color: #ffffff;
  font-weight: 700;
}

.no-notes-placeholder {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.88rem;
}

/* READING MODE (Full Lecture Notes) */
.reading-view-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

.reading-hero {
  margin-bottom: 2.5rem;
  text-align: center;
}

.reading-hero h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.reading-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
}

.reading-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  color: var(--text-main);
  border-color: var(--text-dim);
}

.filter-chip.active {
  background: var(--nv-green-subtle);
  color: var(--nv-green);
  border-color: var(--border-accent);
}

.reading-slide-entry {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: border-color var(--transition-fast);
}

.reading-slide-entry:hover {
  border-color: var(--border-accent);
}

.reading-entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.reading-entry-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.btn-jump-slide {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--nv-green);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-jump-slide:hover {
  background: var(--nv-green);
  color: #000;
}

/* ROADMAP & NOTEBOOKS VIEW */
.roadmap-view-container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

.roadmap-hero {
  margin-bottom: 2.5rem;
  text-align: center;
}

.roadmap-hero h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.gpu-alert-card {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.15), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(234, 88, 12, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.gpu-alert-icon {
  color: #f97316;
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.gpu-alert-card h4 {
  color: #fed7aa;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.gpu-alert-card p {
  color: #fdba74;
  font-size: 0.88rem;
  line-height: 1.5;
}

.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.part-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.part-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.part-card-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--nv-green);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.part-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: #ffffff;
}

.part-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.notebook-badge-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* UNIVERSAL SEARCH MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

.search-modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px var(--nv-green-glow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.modal-search-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-search-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: #ffffff;
  outline: none;
  font-family: var(--font-sans);
}

.modal-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
}

.search-result-item {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.4rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.search-result-item:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-accent);
}

.result-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.result-slide-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--nv-green);
}

.result-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.result-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.result-snippet mark {
  background: rgba(118, 185, 0, 0.35);
  color: #ffffff;
  border-radius: 2px;
  padding: 0 2px;
}

/* Responsive */
@media (max-width: 900px) {
  .slides-sidebar {
    display: none;
  }
  .app-header {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }
  .slide-stage-wrapper {
    padding: 1rem;
  }
  .slide-card-title {
    font-size: 1.4rem;
  }
  .parts-grid {
    grid-template-columns: 1fr;
  }
}
