:root {
  --bg: #050816;
  --bg-soft: #0b1020;
  --accent: #5b8dff;
  --accent-soft: rgba(91, 141, 255, 0.15);
  --text: #f5f5ff;
  --muted: #9ca3c7;
  --danger: #ff4b6a;
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: radial-gradient(circle at top, #151b3a 0, #050816 55%, #02030a 100%);
  color: var(--text);
  min-height: 100vh;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-bar {
  padding: 14px 18px 10px;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(5, 8, 22, 0.95), rgba(5, 8, 22, 0.7));
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.top-bar h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}

.main {
  flex: 1;
  padding: 14px 16px 72px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.current-lecture,
.notes-section {
  background: rgba(11, 16, 32, 0.96);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.current-lecture h2,
.notes-section h2 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

#status {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: var(--muted);
}

button {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

button:active {
  transform: scale(0.97);
}

.primary {
  background: linear-gradient(135deg, var(--accent), #9b7bff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(91, 141, 255, 0.45);
  margin-right: 8px;
}

.ghost {
  background: var(--accent-soft);
  color: var(--text);
}

#notesArea {
  width: 100%;
  min-height: 220px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #050816;
  color: var(--text);
  padding: 10px 12px;
  resize: vertical;
  font-size: 0.95rem;
}

#notesArea:focus {
  outline: 1px solid var(--accent);
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 14px 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: radial-gradient(circle at top, rgba(21, 27, 58, 0.9), rgba(5, 8, 22, 0.98));
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-btn {
  flex: 1;
  background: rgba(11, 16, 32, 0.9);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 0;
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--accent), #9b7bff);
  color: #fff;
}

/* Dark recording overlay */
#darkOverlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#darkOverlay.active {
  display: flex;
}

.record-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 18px rgba(255, 75, 106, 0.9);
  animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}
