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

/* ==========================================================================
   Theme tokens — text colors that adapt to light/dark mode.
   Use these in inline styles instead of hardcoding rgba(255,255,255,...).
   ========================================================================== */
:root {
  --text-primary:   #fafafa;              /* headings, emphasised values */
  --text-secondary: rgba(255,255,255,0.6);/* body, labels, captions */
  --text-muted:     rgba(255,255,255,0.45);/* helpers, stat labels */
  --text-subtle:    rgba(255,255,255,0.3); /* disabled, drag-handles, empty-state */
  --ring-track:     rgba(255,255,255,0.08);/* progress ring background */
}
.light-mode {
  --text-primary:   #09090b;
  --text-secondary: rgba(0,0,0,0.72);
  --text-muted:     rgba(0,0,0,0.55);
  --text-subtle:    rgba(0,0,0,0.4);
  --ring-track:     rgba(0,0,0,0.08);
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #09090b;
  color: #fafafa;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

body {
  position: relative;
}

/* Solid surface cards */
.glass-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  transition: border-color 0.15s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.glass-card-lg {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.15s ease;
}

.glass-card-lg:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Brand text — simplified */
.gradient-text {
  color: #fafafa;
}

.neon-text {
  color: #06b6d4;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.btn-primary {
  background: #06b6d4;
  color: #09090b;
}

.btn-primary:hover {
  background: #0891b2;
}

.btn-secondary {
  background: #27272a;
  color: #fafafa;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  background: #3f3f46;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.18);
}

.btn-success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-success:hover {
  background: rgba(34, 197, 94, 0.18);
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

/* Input styles */
input, textarea, select {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fafafa;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

input::placeholder {
  color: #52525b;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* App container */
#root {
  width: 100%;
  height: 100%;
}

.app-container {
  display: flex;
  width: 100%;
  height: 100%;
  background: #09090b;
  position: relative;
  overflow: hidden;
}

/* Very subtle background orbs */
.app-container::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.04), transparent 70%);
  border-radius: 50%;
  top: -10%;
  right: -5%;
  filter: blur(120px);
  animation: orbFloat1 30s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.app-container::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.04), transparent 70%);
  border-radius: 50%;
  bottom: -10%;
  left: 10%;
  filter: blur(130px);
  animation: orbFloat2 35s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(1.05); }
  66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Third teal orb */
.bg-orb-teal {
  position: absolute;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.035), transparent 70%);
  border-radius: 50%;
  top: 45%;
  left: 40%;
  filter: blur(140px);
  animation: orbFloat3 45s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-60px, 40px) scale(1.05); }
  50% { transform: translate(40px, -30px) scale(0.95); }
  75% { transform: translate(-30px, -50px) scale(1.02); }
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: #111113;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.2s ease, width 0.2s ease, margin 0.2s ease;
  position: relative;
  z-index: 100;
}

/* Desktop collapsed state — hide entirely; hamburger in topbar reopens it */
.sidebar.collapsed {
  width: 0;
  margin-left: -1px;
  padding: 0;
  border-right: none;
  overflow: hidden;
  pointer-events: none;
}

/* Close (✕) button inside the sidebar header — pushes to the far right */
.sidebar-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fafafa;
}
.light-mode .sidebar-close { color: rgba(0, 0, 0, 0.45); }
.light-mode .sidebar-close:hover { background: rgba(0, 0, 0, 0.06); color: #09090b; }

.sidebar-logo-text {
  color: #fafafa;
  font-weight: 700;
}

.sidebar-logo {
  padding: 0 20px 30px;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fafafa;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a1a1aa;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
}

.nav-link:hover {
  color: #fafafa;
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.08);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 16px;
  background: #06b6d4;
  border-radius: 0 2px 2px 0;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { height: 0; }
  to { height: 16px; }
}

.sidebar-bottom {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: #52525b;
  text-align: center;
}

/* Top bar */
.topbar {
  height: 64px;
  background: #09090b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.timer-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: rgba(6, 182, 212, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  color: #06b6d4;
  cursor: pointer;
  transition: background 0.15s ease;
}

.timer-indicator:hover {
  background: rgba(6, 182, 212, 0.18);
}

.timer-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #06b6d4;
  animation: timerBlink 1.5s ease-in-out infinite;
}

@keyframes timerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.light-mode .timer-indicator {
  background: rgba(6, 182, 212, 0.08);
  color: #0891b2;
}

.light-mode .timer-indicator-dot {
  background: #0891b2;
}

.streak-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  color: #f59e0b;
}

.level-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  color: #a78bfa;
}

.level-badge-number {
  font-weight: 700;
  font-size: 14px;
}

.mini-progress-bar {
  width: 60px;
  height: 4px;
  background: #27272a;
  border-radius: 9999px;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  background: #06b6d4;
  transition: width 0.2s ease;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Remove spinning border */
.avatar::after {
  display: none;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.hamburger:hover {
  background: rgba(255, 255, 255, 0.06);
}
.light-mode .hamburger:hover { background: rgba(0, 0, 0, 0.05); }

/* Force hamburger visible on desktop when sidebar has been collapsed (so user can reopen) */
.hamburger.show-desktop {
  display: flex !important;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: #a1a1aa;
  transition: all 0.15s ease;
}

/* Main content */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Page-specific backgrounds — very subtle */
.main-content.page-dashboard {
  background: radial-gradient(ellipse at 50% 30%, rgba(6, 182, 212, 0.03), transparent 60%);
}

.main-content.page-timer {
  background: none;
  transition: background 0.5s ease;
}

.main-content.page-timer.timer-break {
  background: none;
}

.main-content.page-timer.timer-active {
  background: none;
}

.main-content.page-homework {
  background: none;
}

.main-content.page-profile {
  background: none;
}

/* Focus mode background */
.main-content.focus-mode {
  background: #050507 !important;
}

/* Login page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #09090b;
  position: relative;
  overflow: hidden;
}

.login-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 48px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  z-index: 10;
}

.login-logo {
  font-size: 40px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.login-tagline {
  font-size: 14px;
  color: #71717a;
  margin-bottom: 40px;
}

.google-btn {
  width: 100%;
  padding: 12px;
  background: #fafafa;
  border: none;
  border-radius: 10px;
  color: #09090b;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  font-family: inherit;
}

.google-btn:hover {
  background: #e4e4e7;
}

/* Login divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: #52525b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* Email login form */
.email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.email-form input {
  width: 100%;
}

.email-submit-btn {
  width: 100%;
  padding: 12px;
  background: #06b6d4;
  border: none;
  border-radius: 10px;
  color: #09090b;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.email-submit-btn:hover {
  background: #0891b2;
}

.email-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-toggle {
  background: none;
  border: none;
  color: #06b6d4;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  transition: opacity 0.15s;
  font-family: inherit;
}

.login-toggle:hover {
  opacity: 0.8;
}

.login-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  text-align: left;
}

/* Modal dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}

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

.modal-header {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  font-size: 20px;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: #fafafa;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #71717a;
}

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

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Dashboard page */
.page-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 14px;
  color: #71717a;
  margin-bottom: 32px;
}

.stat-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.15s ease;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Color classes only affect .stat-value */
.stat-card.cyan,
.stat-card.blue,
.stat-card.orange,
.stat-card.yellow {
  background: #18181b;
  border-color: rgba(255, 255, 255, 0.06);
}

.stat-card.cyan:hover,
.stat-card.blue:hover,
.stat-card.orange:hover,
.stat-card.yellow:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 12px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.stat-card.cyan .stat-value { color: #06b6d4; }
.stat-card.blue .stat-value { color: #3b82f6; }
.stat-card.orange .stat-value { color: #f59e0b; }
.stat-card.yellow .stat-value { color: #22c55e; }

/* Level progress card */
.level-progress-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.level-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.level-number {
  font-size: 56px;
  font-weight: 700;
  color: #06b6d4;
}

.level-stats {
  text-align: left;
}

.level-stats-item {
  font-size: 12px;
  color: #a1a1aa;
  margin-bottom: 4px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #27272a;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: #06b6d4;
  transition: width 0.5s ease;
  border-radius: 9999px;
}

.progress-text {
  font-size: 12px;
  color: #71717a;
}

/* Timer page */
.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.tab {
  padding: 8px 16px;
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  font-family: inherit;
}

.tab.active {
  color: #06b6d4;
  border-bottom-color: #06b6d4;
}

.tab-content {
  animation: fadeIn 0.15s ease;
}

.timer-display {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.timer-svg {
  width: 220px;
  height: 220px;
}

.timer-time {
  font-size: 56px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin: 20px 0;
  color: #fafafa;
}

.timer-status {
  text-align: center;
  margin-bottom: 20px;
}

.status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge.focus {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
}

.status-badge.break {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.timer-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.timer-info {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  margin-top: 20px;
}

.timer-info-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 12px;
}

.timer-info-item {
  text-align: center;
}

.timer-info-label {
  font-size: 12px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timer-info-value {
  font-size: 18px;
  font-weight: 700;
  color: #06b6d4;
}

/* Homework page */
.tabs-header {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.homework-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.homework-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  transition: border-color 0.15s ease;
}

.homework-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.homework-card.completed {
  opacity: 0.6;
}

.homework-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  word-break: break-word;
}

.homework-card.completed .homework-title {
  text-decoration: line-through;
  color: #52525b;
}

.homework-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 12px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-subject {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.badge-source {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
}

.badge-overdue {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.badge-priority-high {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.badge-priority-medium {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.badge-priority-low {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.badge-points {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
}

.homework-date {
  font-size: 12px;
  color: #71717a;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.homework-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #06b6d4;
  cursor: pointer;
  text-decoration: none;
  font-size: 12px;
  transition: opacity 0.15s ease;
  margin-bottom: 12px;
}

.homework-link:hover {
  opacity: 0.8;
}

.homework-actions {
  display: flex;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #71717a;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* Google Docs Settings */
.google-docs-settings {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  margin-bottom: 12px;
}

.settings-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: #06b6d4;
}

.google-docs-badge {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 6px;
  color: #06b6d4;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.settings-content {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-info {
  font-size: 12px;
  color: #71717a;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  margin-top: 8px;
}

.sync-status {
  font-size: 11px;
  color: #52525b;
  margin-top: 8px;
}

/* Todo list */
.todo-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #06b6d4;
  border: none;
  color: #09090b;
  font-size: 20px;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: background 0.15s ease;
}

.todo-floating-btn:hover {
  background: #0891b2;
}

.todo-floating-btn .badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: #ef4444;
  color: white;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.todo-panel {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 360px;
  max-height: 500px;
  overflow-y: auto;
  z-index: 998;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.2s ease-out;
}

@media (max-width: 500px) {
  .todo-panel {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 80px;
  }
}

.todo-section {
  margin-top: 0;
}

.todo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  user-select: none;
}

.todo-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.todo-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.todo-badge {
  min-width: 22px;
  height: 22px;
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.todo-content {
  padding: 0 16px 16px;
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.todo-input-row {
  display: grid;
  grid-template-columns: 1fr 150px 100px;
  gap: 12px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  transition: background 0.15s ease;
}

.todo-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.todo-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.todo-checkbox:hover {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.08);
}

.todo-checkbox.checked {
  background: #06b6d4;
  border-color: #06b6d4;
}

.todo-checkbox.checked::after {
  content: '\2713';
  color: #09090b;
  font-weight: bold;
  font-size: 11px;
}

.todo-text {
  flex: 1;
  word-break: break-word;
  font-size: 14px;
}

.todo-text.completed {
  text-decoration: line-through;
  color: #52525b;
}

.todo-delete {
  background: none;
  border: none;
  color: #52525b;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s ease;
}

.todo-delete:hover {
  color: #ef4444;
}

/* Profile page */
.profile-header {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.profile-email {
  font-size: 14px;
  color: #71717a;
  margin-bottom: 20px;
}

.profile-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.profile-progress {
  margin-top: 20px;
}

.profile-progress-label {
  font-size: 12px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.milestones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.milestone-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.15s ease;
}

.milestone-card.unlocked {
  border-color: rgba(139, 92, 246, 0.2);
}

.milestone-card.locked {
  opacity: 0.4;
}

.milestone-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.milestone-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.milestone-status {
  font-size: 12px;
  color: #71717a;
}

.milestone-status.unlocked {
  color: #22c55e;
}

/* Celebration modal */
.celebration-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

.celebration-modal {
  text-align: center;
  position: relative;
  z-index: 2001;
}

.celebration-icon {
  font-size: 72px;
  margin-bottom: 20px;
  animation: bounceIn 0.4s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.celebration-text {
  font-size: 40px;
  font-weight: 700;
  color: #06b6d4;
  margin-bottom: 20px;
  animation: slideUp 0.3s ease;
}

.celebration-level {
  font-size: 64px;
  font-weight: 700;
  color: #06b6d4;
  animation: slideUp 0.3s ease 0.1s both;
}

/* Confetti */
.confetti {
  position: fixed;
  pointer-events: none;
  font-size: 28px;
  opacity: 1;
  animation: confettiFall 3.5s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotateZ(0deg) scale(1);
  }
  30% {
    opacity: 1;
    transform: translateY(-200px) rotateZ(360deg) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-500px) rotateZ(900deg) scale(0.5);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 250px;
    z-index: 99;
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .hamburger {
    display: flex;
  }

  .topbar {
    padding: 0 16px;
  }

  .main-content {
    padding: 20px;
    margin-top: 0;
  }

  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .todo-input-row {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .level-display {
    flex-direction: column;
  }

  .homework-grid {
    grid-template-columns: 1fr;
  }

  .milestones-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 22px;
  }

  .settings-row {
    grid-template-columns: 1fr;
  }
}

/* Calendar Page */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-header-cell {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
  padding: 8px 0;
}
.calendar-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.15s;
  position: relative;
  min-height: 48px;
}
.calendar-cell:hover { background: rgba(6, 182, 212, 0.06); border-color: rgba(6, 182, 212, 0.15); }
.calendar-cell.today { border-color: #06b6d4; background: rgba(6, 182, 212, 0.08); }
.calendar-cell.selected { background: rgba(6, 182, 212, 0.12); border-color: #06b6d4; }
.calendar-cell.other-month { color: #3f3f46; }
.calendar-dots { display: flex; gap: 3px; margin-top: 2px; }
.calendar-dot { width: 5px; height: 5px; border-radius: 50%; }
.calendar-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-nav h2 { font-size: 18px; font-weight: 600; }
.calendar-nav button { background: #27272a; border: 1px solid rgba(255, 255, 255, 0.08); color: #fafafa; padding: 8px 16px; border-radius: 10px; cursor: pointer; font-size: 14px; transition: all 0.15s; font-family: inherit; }
.calendar-nav button:hover { background: #3f3f46; }
.calendar-detail-panel {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  margin-top: 16px;
}

/* Analytics Page */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 768px) { .analytics-grid { grid-template-columns: 1fr; } }
.chart-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
}
.chart-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: #a1a1aa; }
.chart-card canvas { max-height: 260px; }
.time-range-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.time-range-bar button {
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer;
  background: #27272a; border: 1px solid rgba(255, 255, 255, 0.06); color: #a1a1aa; transition: all 0.15s; font-family: inherit;
}
.time-range-bar button.active { background: rgba(6, 182, 212, 0.1); border-color: rgba(6, 182, 212, 0.2); color: #06b6d4; }
.weekly-summary {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  display: flex; gap: 24px; flex-wrap: wrap;
}
.weekly-summary-item { text-align: center; flex: 1; min-width: 100px; }
.weekly-summary-item .value { font-size: 28px; font-weight: 700; color: #06b6d4; }
.weekly-summary-item .label { font-size: 12px; color: #71717a; margin-top: 4px; }

/* Analytics Hub — Stat cards with delta */
.analytics-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.analytics-actions { display: flex; gap: 8px; align-items: center; }
.stat-grid-4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px;
}
@media (max-width: 900px) { .stat-grid-4 { grid-template-columns: repeat(2, 1fr); } }
.stat-tile {
  background: #18181b; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.stat-tile .stat-tile-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: #71717a; }
.stat-tile .stat-tile-value { font-size: 28px; font-weight: 700; color: #fafafa; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-tile .stat-tile-delta { font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.stat-tile .stat-tile-delta.up { color: #22c55e; }
.stat-tile .stat-tile-delta.down { color: #ef4444; }
.stat-tile .stat-tile-delta.flat { color: #71717a; }

/* Insight cards */
.insights-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px;
}
.insight-card {
  background: #18181b; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 18px;
  display: flex; gap: 14px; align-items: flex-start;
}
.insight-card .insight-icon {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.insight-card .insight-icon.cyan { background: rgba(6, 182, 212, 0.12); }
.insight-card .insight-icon.green { background: rgba(34, 197, 94, 0.12); }
.insight-card .insight-icon.amber { background: rgba(245, 158, 11, 0.12); }
.insight-card .insight-icon.violet { background: rgba(139, 92, 246, 0.12); }
.insight-card .insight-body { flex: 1; }
.insight-card .insight-title { font-size: 12px; font-weight: 500; color: #71717a; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.insight-card .insight-text { font-size: 14px; color: #fafafa; line-height: 1.4; }
.insight-card .insight-sub { font-size: 12px; color: #a1a1aa; margin-top: 4px; }

/* Productivity heatmap — hour x day-of-week */
.productivity-heatmap {
  display: grid; grid-template-columns: 40px repeat(24, 1fr); gap: 2px; font-size: 10px;
}
.productivity-heatmap .ph-label { color: #71717a; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.productivity-heatmap .ph-cell {
  aspect-ratio: 1; min-height: 14px; border-radius: 3px; background: rgba(255,255,255,0.03);
  transition: transform 0.15s;
}
.productivity-heatmap .ph-cell:hover { transform: scale(1.5); z-index: 2; position: relative; }
.productivity-heatmap .ph-cell.l1 { background: rgba(6, 182, 212, 0.2); }
.productivity-heatmap .ph-cell.l2 { background: rgba(6, 182, 212, 0.4); }
.productivity-heatmap .ph-cell.l3 { background: rgba(6, 182, 212, 0.65); }
.productivity-heatmap .ph-cell.l4 { background: rgba(6, 182, 212, 0.9); }
.heatmap-hour-labels { display: grid; grid-template-columns: 40px repeat(24, 1fr); gap: 2px; margin-top: 6px; color: #71717a; font-size: 9px; }
.heatmap-hour-labels div { text-align: center; }

/* Streak calendar — full 52 weeks */
.streak-calendar { display: grid; grid-template-columns: repeat(53, 1fr); gap: 2px; overflow-x: auto; padding-bottom: 4px; }
.streak-calendar .sc-cell {
  aspect-ratio: 1; min-height: 10px; min-width: 10px; border-radius: 2px; background: rgba(255,255,255,0.04);
}
.streak-calendar .sc-cell.l1 { background: rgba(6, 182, 212, 0.2); }
.streak-calendar .sc-cell.l2 { background: rgba(6, 182, 212, 0.4); }
.streak-calendar .sc-cell.l3 { background: rgba(6, 182, 212, 0.65); }
.streak-calendar .sc-cell.l4 { background: rgba(6, 182, 212, 0.9); }
.streak-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #71717a; margin-top: 10px; justify-content: flex-end; }
.streak-legend .ll { width: 10px; height: 10px; border-radius: 2px; }

/* Predictive forecast card */
.forecast-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(6, 182, 212, 0.18); border-radius: 16px; padding: 20px; margin-bottom: 20px;
}
.forecast-card h3 { font-size: 14px; font-weight: 600; color: #fafafa; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.forecast-card .forecast-list { display: flex; flex-direction: column; gap: 10px; }
.forecast-card .forecast-item { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #a1a1aa; }
.forecast-card .forecast-item strong { color: #06b6d4; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Export button */
.btn-export {
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer;
  background: #06b6d4; color: #09090b; border: none; display: flex; align-items: center; gap: 6px; transition: background 0.15s; font-family: inherit;
}
.btn-export:hover { background: #0891b2; }
.btn-export:disabled { opacity: 0.6; cursor: not-allowed; }

/* Light-mode overrides for analytics */
.light-mode .stat-tile { background: #ffffff; border-color: rgba(0,0,0,0.06); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.light-mode .stat-tile .stat-tile-value { color: #09090b; }
.light-mode .insight-card { background: #ffffff; border-color: rgba(0,0,0,0.06); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.light-mode .insight-card .insight-text { color: #09090b; }
.light-mode .productivity-heatmap .ph-cell { background: rgba(0,0,0,0.04); }
.light-mode .streak-calendar .sc-cell { background: rgba(0,0,0,0.04); }
.light-mode .forecast-card { background: linear-gradient(135deg, rgba(6,182,212,0.06), rgba(139,92,246,0.04)); border-color: rgba(6,182,212,0.25); }
.light-mode .forecast-card h3 { color: #09090b; }

/* ============= MOBILE BOTTOM NAV ============= */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(15, 15, 17, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 80;
  padding: 4px 8px env(safe-area-inset-bottom);
  justify-content: space-around;
  align-items: stretch;
}
.mobile-bottom-nav button {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 10px;
  font-weight: 500;
  font-family: inherit;
  padding: 6px 4px;
  border-radius: 10px;
  transition: color 0.15s;
  position: relative;
}
.mobile-bottom-nav button.active { color: #06b6d4; }
.mobile-bottom-nav button.active::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 2px;
  background: #06b6d4;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}
.mobile-bottom-nav svg { width: 20px; height: 20px; }

/* ============= PAGE TRANSITIONS ============= */
.main-content > div {
  animation: pageEnter 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============= MICRO-INTERACTIONS ============= */
button:not(:disabled):active { transform: scale(0.97); }
.btn { will-change: transform; }
.glass-card, .stat-card, .stat-tile, .homework-card, .chart-card, .insight-card, .achievement-card {
  will-change: transform, box-shadow;
}
.glass-card:hover, .stat-tile:hover, .insight-card:hover {
  transform: translateY(-2px);
}

/* Mobile overrides */
@media (max-width: 768px) {
  .mobile-bottom-nav { display: flex; }
  .main-content { padding-bottom: 88px !important; }
  .todo-floating-btn, .ambient-fab { bottom: 84px !important; }
  .ambient-panel { bottom: 156px !important; }
}

/* ============= ACCESSIBILITY ============= */
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01s !important;
}
.high-contrast { --hc-border: rgba(255,255,255,0.25); }
.high-contrast .glass-card,
.high-contrast .stat-card,
.high-contrast .stat-tile,
.high-contrast .insight-card,
.high-contrast .homework-card,
.high-contrast .chart-card,
.high-contrast .level-progress-card,
.high-contrast .modal-content {
  border-color: rgba(255,255,255,0.25) !important;
}
.high-contrast .ach-desc, .high-contrast .page-subtitle, .high-contrast .stat-tile-label,
.high-contrast .insight-title, .high-contrast .stat-label { color: #d4d4d8 !important; }
.high-contrast.light-mode .glass-card,
.high-contrast.light-mode .stat-card,
.high-contrast.light-mode .stat-tile {
  border-color: rgba(0,0,0,0.3) !important;
}
.high-contrast.light-mode .ach-desc, .high-contrast.light-mode .page-subtitle { color: #3f3f46 !important; }

.dyslexia-font, .dyslexia-font body, .dyslexia-font input, .dyslexia-font textarea, .dyslexia-font button, .dyslexia-font select {
  font-family: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif !important;
  letter-spacing: 0.02em !important;
}

/* ============= THEME PRESETS ============= */
/* Default theme accent is cyan #06b6d4 — themes remap accent-related colors */

/* Nature — green */
.theme-nature { --accent: #22c55e; --accent-hover: #16a34a; --accent-subtle: rgba(34, 197, 94, 0.1); }
.theme-nature .nav-link.active, .theme-nature .tab.active { color: #22c55e !important; background: rgba(34,197,94,0.1) !important; }
.theme-nature .nav-link.active::before { background: #22c55e !important; }
.theme-nature .tab.active { border-bottom-color: #22c55e !important; }
.theme-nature .btn-primary { background: #22c55e !important; color: #052e16 !important; }
.theme-nature .btn-primary:hover { background: #16a34a !important; }
.theme-nature .level-number, .theme-nature .timer-info-value { color: #22c55e !important; }
.theme-nature .progress-fill, .theme-nature .mini-progress-fill { background: #22c55e !important; }
.theme-nature .stat-card.cyan .stat-value, .theme-nature .gradient-text { color: #22c55e !important; }

/* Sunset — orange */
.theme-sunset { --accent: #f97316; --accent-hover: #ea580c; --accent-subtle: rgba(249, 115, 22, 0.1); }
.theme-sunset .nav-link.active, .theme-sunset .tab.active { color: #f97316 !important; background: rgba(249,115,22,0.1) !important; }
.theme-sunset .nav-link.active::before { background: #f97316 !important; }
.theme-sunset .tab.active { border-bottom-color: #f97316 !important; }
.theme-sunset .btn-primary { background: #f97316 !important; color: #431407 !important; }
.theme-sunset .btn-primary:hover { background: #ea580c !important; }
.theme-sunset .level-number, .theme-sunset .timer-info-value { color: #f97316 !important; }
.theme-sunset .progress-fill, .theme-sunset .mini-progress-fill { background: #f97316 !important; }
.theme-sunset .stat-card.cyan .stat-value { color: #f97316 !important; }

/* Royal — purple */
.theme-royal { --accent: #8b5cf6; --accent-hover: #7c3aed; --accent-subtle: rgba(139, 92, 246, 0.1); }
.theme-royal .nav-link.active, .theme-royal .tab.active { color: #8b5cf6 !important; background: rgba(139,92,246,0.1) !important; }
.theme-royal .nav-link.active::before { background: #8b5cf6 !important; }
.theme-royal .tab.active { border-bottom-color: #8b5cf6 !important; }
.theme-royal .btn-primary { background: #8b5cf6 !important; color: #1e1b4b !important; }
.theme-royal .btn-primary:hover { background: #7c3aed !important; }
.theme-royal .level-number, .theme-royal .timer-info-value { color: #8b5cf6 !important; }
.theme-royal .progress-fill, .theme-royal .mini-progress-fill { background: #8b5cf6 !important; }
.theme-royal .stat-card.cyan .stat-value { color: #8b5cf6 !important; }

/* Rose — pink */
.theme-rose { --accent: #ec4899; --accent-hover: #db2777; --accent-subtle: rgba(236, 72, 153, 0.1); }
.theme-rose .nav-link.active, .theme-rose .tab.active { color: #ec4899 !important; background: rgba(236,72,153,0.1) !important; }
.theme-rose .nav-link.active::before { background: #ec4899 !important; }
.theme-rose .tab.active { border-bottom-color: #ec4899 !important; }
.theme-rose .btn-primary { background: #ec4899 !important; color: #500724 !important; }
.theme-rose .btn-primary:hover { background: #db2777 !important; }
.theme-rose .level-number, .theme-rose .timer-info-value { color: #ec4899 !important; }
.theme-rose .progress-fill, .theme-rose .mini-progress-fill { background: #ec4899 !important; }
.theme-rose .stat-card.cyan .stat-value { color: #ec4899 !important; }

/* Amber — yellow-gold */
.theme-amber { --accent: #f59e0b; --accent-hover: #d97706; --accent-subtle: rgba(245, 158, 11, 0.1); }
.theme-amber .nav-link.active, .theme-amber .tab.active { color: #f59e0b !important; background: rgba(245,158,11,0.1) !important; }
.theme-amber .nav-link.active::before { background: #f59e0b !important; }
.theme-amber .tab.active { border-bottom-color: #f59e0b !important; }
.theme-amber .btn-primary { background: #f59e0b !important; color: #451a03 !important; }
.theme-amber .btn-primary:hover { background: #d97706 !important; }
.theme-amber .level-number, .theme-amber .timer-info-value { color: #f59e0b !important; }
.theme-amber .progress-fill, .theme-amber .mini-progress-fill { background: #f59e0b !important; }
.theme-amber .stat-card.cyan .stat-value { color: #f59e0b !important; }

/* Crimson — red */
.theme-crimson { --accent: #ef4444; --accent-hover: #dc2626; --accent-subtle: rgba(239, 68, 68, 0.1); }
.theme-crimson .nav-link.active, .theme-crimson .tab.active { color: #ef4444 !important; background: rgba(239,68,68,0.1) !important; }
.theme-crimson .nav-link.active::before { background: #ef4444 !important; }
.theme-crimson .tab.active { border-bottom-color: #ef4444 !important; }
.theme-crimson .btn-primary { background: #ef4444 !important; color: #450a0a !important; }
.theme-crimson .btn-primary:hover { background: #dc2626 !important; }
.theme-crimson .level-number, .theme-crimson .timer-info-value { color: #ef4444 !important; }
.theme-crimson .progress-fill, .theme-crimson .mini-progress-fill { background: #ef4444 !important; }
.theme-crimson .stat-card.cyan .stat-value { color: #ef4444 !important; }

/* ====== PREMIUM THEMES (from shop) ====== */
/* Aurora — cyan to violet gradient */
.theme-aurora .nav-link.active, .theme-aurora .tab.active { color: #a78bfa !important; background: linear-gradient(135deg, rgba(6,182,212,0.1), rgba(167,139,250,0.12)) !important; }
.theme-aurora .nav-link.active::before { background: linear-gradient(180deg, #06b6d4, #a78bfa) !important; }
.theme-aurora .tab.active { border-bottom-color: #a78bfa !important; }
.theme-aurora .btn-primary { background: linear-gradient(135deg, #06b6d4, #8b5cf6) !important; color: #fff !important; }
.theme-aurora .level-number { background: linear-gradient(135deg, #06b6d4, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.theme-aurora .progress-fill, .theme-aurora .mini-progress-fill { background: linear-gradient(90deg, #06b6d4, #a78bfa) !important; }
.theme-aurora .timer-info-value, .theme-aurora .stat-card.cyan .stat-value { color: #a78bfa !important; }

/* Ember — fiery red-orange */
.theme-ember .nav-link.active, .theme-ember .tab.active { color: #f87171 !important; background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(249,115,22,0.1)) !important; }
.theme-ember .nav-link.active::before { background: linear-gradient(180deg, #ef4444, #f97316) !important; }
.theme-ember .tab.active { border-bottom-color: #f87171 !important; }
.theme-ember .btn-primary { background: linear-gradient(135deg, #ef4444, #f97316) !important; color: #fff !important; }
.theme-ember .level-number { background: linear-gradient(135deg, #ef4444, #f97316); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.theme-ember .progress-fill, .theme-ember .mini-progress-fill { background: linear-gradient(90deg, #ef4444, #f97316) !important; }
.theme-ember .timer-info-value, .theme-ember .stat-card.cyan .stat-value { color: #f87171 !important; }

/* Deep Forest — emerald + gold */
.theme-forest .nav-link.active, .theme-forest .tab.active { color: #d4af37 !important; background: linear-gradient(135deg, rgba(21,128,61,0.12), rgba(212,175,55,0.1)) !important; }
.theme-forest .nav-link.active::before { background: linear-gradient(180deg, #15803d, #d4af37) !important; }
.theme-forest .tab.active { border-bottom-color: #d4af37 !important; }
.theme-forest .btn-primary { background: linear-gradient(135deg, #15803d, #d4af37) !important; color: #052e16 !important; }
.theme-forest .level-number { background: linear-gradient(135deg, #15803d, #d4af37); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.theme-forest .progress-fill, .theme-forest .mini-progress-fill { background: linear-gradient(90deg, #15803d, #d4af37) !important; }
.theme-forest .timer-info-value, .theme-forest .stat-card.cyan .stat-value { color: #d4af37 !important; }

/* Cosmic — animated tri-gradient */
.theme-cosmic .nav-link.active, .theme-cosmic .tab.active { color: #ec4899 !important; background: linear-gradient(135deg, rgba(14,165,233,0.1), rgba(139,92,246,0.1), rgba(236,72,153,0.1)) !important; background-size: 200% 200%; animation: cosmicShift 6s ease infinite; }
.theme-cosmic .nav-link.active::before { background: linear-gradient(180deg, #0ea5e9, #8b5cf6, #ec4899) !important; background-size: 100% 200%; animation: cosmicShift 6s ease infinite; }
.theme-cosmic .tab.active { border-bottom-color: #ec4899 !important; }
.theme-cosmic .btn-primary { background: linear-gradient(135deg, #0ea5e9, #8b5cf6, #ec4899) !important; background-size: 200% 200% !important; animation: cosmicShift 6s ease infinite; color: #fff !important; }
.theme-cosmic .level-number { background: linear-gradient(135deg, #0ea5e9, #8b5cf6, #ec4899); background-size: 200% 200%; animation: cosmicShift 6s ease infinite; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.theme-cosmic .progress-fill, .theme-cosmic .mini-progress-fill { background: linear-gradient(90deg, #0ea5e9, #8b5cf6, #ec4899) !important; background-size: 200% 200% !important; animation: cosmicShift 6s ease infinite; }
.theme-cosmic .timer-info-value, .theme-cosmic .stat-card.cyan .stat-value { color: #ec4899 !important; }

@keyframes cosmicShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Ambient Sounds */
.light-mode .ambient-fab { background: #ffffff !important; box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important; }
.light-mode .ambient-fab[style*="rgb(6, 182, 212)"] { background: #06b6d4 !important; }
.light-mode .ambient-panel { background: #ffffff !important; border-color: rgba(0,0,0,0.08) !important; box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important; }

/* Focus Mode — distraction-free overlay */
.focus-mode-overlay {
  position: fixed; inset: 0; background: #050505; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  animation: focusModeFadeIn 0.3s ease-out;
}
@keyframes focusModeFadeIn {
  from { opacity: 0; backdrop-filter: blur(0); }
  to { opacity: 1; backdrop-filter: blur(20px); }
}
.focus-mode-exit {
  position: absolute; top: 24px; right: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-family: inherit;
}
.focus-mode-exit:hover { background: rgba(255,255,255,0.1); color: #fff; }
.focus-mode-content {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  padding: 40px; max-width: 500px; width: 100%;
}
.focus-mode-badge {
  font-size: 12px; font-weight: 600; color: #06b6d4;
  text-transform: uppercase; letter-spacing: 0.2em;
  padding: 6px 16px; border-radius: 9999px;
  background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.2);
}
.focus-mode-timer {
  font-size: 120px; font-weight: 300; font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em; color: #fafafa; line-height: 1;
  text-shadow: 0 0 40px rgba(6,182,212,0.2);
}
@media (max-width: 600px) { .focus-mode-timer { font-size: 80px; } }
.focus-mode-progress { width: 100%; display: flex; justify-content: center; }
.focus-mode-controls { display: flex; gap: 12px; }
.focus-mode-hint { font-size: 12px; color: rgba(255,255,255,0.3); letter-spacing: 0.05em; text-transform: uppercase; }

/* Achievement toast animation */
@keyframes achievementSlide {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Voice mic pulse */
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
}

/* XP toast animation */
@keyframes xpFloat {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  15% { opacity: 1; transform: translateY(0) scale(1.1); }
  25% { transform: translateY(0) scale(1); }
  80% { opacity: 1; transform: translateY(-8px) scale(1); }
  100% { opacity: 0; transform: translateY(-40px) scale(0.95); }
}
.achievement-card:hover { transform: translateY(-2px); }
.ach-name { color: #fafafa; }
.ach-desc { color: #a1a1aa; }
.light-mode .achievement-card { background: #ffffff !important; border-color: rgba(0,0,0,0.06) !important; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.light-mode .ach-name { color: #09090b !important; }
.light-mode .ach-desc { color: #52525b !important; }
.light-mode .achievement-toast { background: #ffffff !important; box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important; }
.light-mode .achievement-toast .ach-name { color: #09090b !important; }

/* Quote card */
.quote-text { color: rgba(255, 255, 255, 0.72); }
.light-mode .quote-text { color: #3f3f46; }

/* AI Coach card */
.ai-coach-card {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 16px;
}
.ai-coach-title { font-size: 14px; font-weight: 600; color: #fafafa; }
.ai-coach-subtitle { font-size: 11px; color: #a1a1aa; }
.ai-coach-message {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  font-size: 14px;
  color: #fafafa;
  line-height: 1.55;
}
.light-mode .ai-coach-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), rgba(139, 92, 246, 0.04));
  border-color: rgba(6, 182, 212, 0.3);
}
.light-mode .ai-coach-title { color: #09090b; }
.light-mode .ai-coach-subtitle { color: #71717a; }
.light-mode .ai-coach-message {
  background: rgba(0, 0, 0, 0.03);
  color: #18181b;
}

/* AI Plan Page */
.ai-plan-hero {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.ai-plan-hero h2 { font-size: 20px; font-weight: 700; color: #fafafa; margin-bottom: 6px; }
.ai-plan-hero p { font-size: 13px; color: #a1a1aa; margin-bottom: 16px; line-height: 1.5; }
.ai-plan-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 700px) { .ai-plan-form { grid-template-columns: 1fr; } }
.ai-plan-form textarea { width: 100%; min-height: 80px; resize: vertical; grid-column: span 2; }
@media (max-width: 700px) { .ai-plan-form textarea { grid-column: span 1; } }
.ai-plan-generate-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.ai-plan-output { background: #18181b; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 24px; }
.ai-plan-output h3 { font-size: 16px; font-weight: 600; color: #fafafa; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.ai-plan-day {
  padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04); margin-bottom: 10px;
}
.ai-plan-day .day-title { font-size: 14px; font-weight: 600; color: #06b6d4; margin-bottom: 8px; }
.ai-plan-day .day-tasks { display: flex; flex-direction: column; gap: 6px; }
.ai-plan-day .day-task { font-size: 13px; color: #d4d4d8; padding-left: 20px; position: relative; line-height: 1.5; }
.ai-plan-day .day-task::before { content: '•'; position: absolute; left: 8px; color: #06b6d4; font-weight: 700; }
.ai-plan-markdown {
  font-size: 14px; line-height: 1.6; color: #d4d4d8;
}
.ai-plan-markdown h1 { font-size: 18px; font-weight: 700; color: #fafafa; margin: 16px 0 8px; }
.ai-plan-markdown h2 { font-size: 16px; font-weight: 600; color: #06b6d4; margin: 14px 0 6px; }
.ai-plan-markdown h3 { font-size: 14px; font-weight: 600; color: #fafafa; margin: 12px 0 4px; }
.ai-plan-markdown ul, .ai-plan-markdown ol { margin: 4px 0 10px 20px; }
.ai-plan-markdown li { margin-bottom: 4px; }
.ai-plan-markdown p { margin-bottom: 10px; }
.ai-plan-markdown strong { color: #fafafa; }
.ai-plan-markdown code { background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px; font-family: 'SF Mono', Monaco, monospace; font-size: 13px; }

.ai-empty-state {
  text-align: center; padding: 48px 24px; color: #71717a;
}
.ai-empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.ai-example-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ai-example-chip {
  padding: 6px 12px; border-radius: 9999px; background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.15); color: #06b6d4;
  font-size: 12px; cursor: pointer; transition: background 0.15s; font-family: inherit;
}
.ai-example-chip:hover { background: rgba(6, 182, 212, 0.15); }

.ai-loading-shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px; height: 60px; margin-bottom: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Light-mode overrides */
.light-mode .ai-plan-hero { background: linear-gradient(135deg, rgba(6,182,212,0.06), rgba(139,92,246,0.04)); border-color: rgba(6,182,212,0.25); }
.light-mode .ai-plan-hero h2 { color: #09090b; }
.light-mode .ai-plan-output { background: #ffffff; border-color: rgba(0,0,0,0.06); }
.light-mode .ai-plan-output h3 { color: #09090b; }
.light-mode .ai-plan-day { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.05); }
.light-mode .ai-plan-day .day-task { color: #3f3f46; }
.light-mode .ai-plan-markdown { color: #3f3f46; }
.light-mode .ai-plan-markdown h1, .light-mode .ai-plan-markdown h3, .light-mode .ai-plan-markdown strong { color: #09090b; }

/* Goals Page */
.goal-ring-container { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; margin: 32px 0; }
.goal-ring { text-align: center; }
/* Rotate only the circle tracks so arc starts from 12 o'clock — text is kept upright */
.goal-ring svg circle { transform: rotate(-90deg); transform-origin: center; }
.goal-ring .ring-label { font-size: 14px; color: #71717a; margin-top: 8px; }
.goal-ring .ring-value { font-size: 28px; font-weight: 700; }
.goal-edit-row { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.celebration-msg { text-align: center; font-size: 18px; color: #06b6d4; margin-top: 16px; }

/* Notification toggle */
.notif-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.notif-toggle-row:last-child { border-bottom: none; }
.toggle-switch {
  width: 44px; height: 24px; border-radius: 12px; background: #3f3f46;
  position: relative; cursor: pointer; transition: background 0.15s;
}
.toggle-switch.on { background: #06b6d4; }
.toggle-switch::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform 0.15s;
}
.toggle-switch.on::after { transform: translateX(20px); }

/* Notes Page */
.notes-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; min-height: 500px; }
@media (max-width: 768px) { .notes-layout { grid-template-columns: 1fr; } }
.notes-list {
  background: #18181b; border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px; padding: 12px; overflow-y: auto; max-height: 600px;
}
.note-item {
  padding: 10px 12px; border-radius: 10px; cursor: pointer; margin-bottom: 4px;
  border: 1px solid transparent; transition: all 0.15s;
}
.note-item:hover { background: rgba(255, 255, 255, 0.03); }
.note-item.active { background: rgba(6, 182, 212, 0.06); border-color: rgba(6, 182, 212, 0.15); }
.note-item h4 { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.note-item p { font-size: 11px; color: #52525b; }
.note-editor {
  background: #18181b; border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px; padding: 20px; display: flex; flex-direction: column;
}
.note-editor textarea {
  flex: 1; min-height: 250px; resize: vertical; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 13px; line-height: 1.6;
}
.markdown-preview {
  flex: 1; min-height: 250px; padding: 16px; overflow-y: auto; font-size: 14px; line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}
.markdown-preview h1, .markdown-preview h2, .markdown-preview h3 { color: #06b6d4; margin: 16px 0 8px; }
.markdown-preview code { background: rgba(255, 255, 255, 0.06); padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.markdown-preview pre { background: rgba(255, 255, 255, 0.04); padding: 12px; border-radius: 10px; overflow-x: auto; }
.markdown-preview ul, .markdown-preview ol { padding-left: 20px; }
.markdown-preview blockquote { border-left: 2px solid #06b6d4; padding-left: 12px; color: #71717a; }

/* Subject Filter */
.subject-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.subject-chip {
  padding: 6px 14px; border-radius: 9999px; font-size: 12px; font-weight: 500; cursor: pointer;
  background: #27272a; border: 1px solid rgba(255, 255, 255, 0.06); color: #a1a1aa; transition: all 0.15s;
}
.subject-chip.active { background: rgba(6, 182, 212, 0.1); border-color: rgba(6, 182, 212, 0.2); color: #06b6d4; }

/* Timer ring — no neon glow */
.timer-svg circle:nth-child(2) {
  /* no filter */
}

/* Points float animation — simplified */
.points-float {
  position: fixed;
  pointer-events: none;
  font-size: 22px;
  font-weight: 700;
  color: #06b6d4;
  animation: pointsFloat 1.5s ease-out forwards;
  z-index: 9999;
}

@keyframes pointsFloat {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  50% { opacity: 1; transform: translateY(-30px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.8); }
}

/* Homework card subject color strip */
.homework-card {
  border-left: 3px solid transparent;
}
.homework-card[data-subject="math"] { border-left-color: #06b6d4; }
.homework-card[data-subject="science"] { border-left-color: #22c55e; }
.homework-card[data-subject="english"] { border-left-color: #8b5cf6; }
.homework-card[data-subject="history"] { border-left-color: #f59e0b; }
.homework-card[data-subject="default"] { border-left-color: #f59e0b; }

/* Activity heatmap */
.heatmap-container {
  margin-top: 32px;
}
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-width: 350px;
}
.heatmap-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  background: #1e1e22;
  transition: all 0.15s ease;
}
.heatmap-cell:hover {
  transform: scale(1.2);
  z-index: 1;
}
.heatmap-cell.level-1 { background: rgba(6, 182, 212, 0.15); }
.heatmap-cell.level-2 { background: rgba(6, 182, 212, 0.3); }
.heatmap-cell.level-3 { background: rgba(6, 182, 212, 0.5); }
.heatmap-cell.level-4 { background: rgba(6, 182, 212, 0.75); }

/* Login page — clean, no floating orbs */
.login-page::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.06), transparent);
  border-radius: 50%;
  top: 30%;
  left: 40%;
  transform: translate(-50%, -50%);
  filter: blur(120px);
}
.login-page::after {
  display: none;
}

/* Theme toggle button */
.theme-toggle {
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  width: 44px;
  height: 24px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  padding: 2px;
}

.theme-toggle::after {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fafafa;
  transition: all 0.15s ease;
  transform: translateX(0);
}

.theme-toggle.light::after {
  transform: translateX(20px);
  background: #27272a;
}

.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

/* ============================================
   LIGHT MODE OVERRIDES
   ============================================ */
.light-mode,
.light-mode html,
.light-mode body {
  background: #f8f9fa !important;
  color: #09090b !important;
}

.light-mode .app-container {
  background: #f8f9fa !important;
}

.light-mode .app-container::before {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.04), transparent 70%);
}

.light-mode .app-container::after {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.03), transparent 70%);
}

.light-mode .bg-orb-teal {
  display: none;
}

/* Sidebar */
.light-mode .sidebar {
  background: #ffffff !important;
  border-right-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .sidebar-bottom {
  border-top-color: rgba(0, 0, 0, 0.06);
  color: #a1a1aa;
}

.light-mode .sidebar-logo .gradient-text {
  color: #09090b !important;
  -webkit-text-fill-color: #09090b !important;
  background: none !important;
}

.light-mode .sidebar-logo .neon-text {
  color: #06b6d4 !important;
}

.light-mode .sidebar-logo-text {
  color: #09090b !important;
}

.light-mode .nav-link {
  color: #71717a !important;
}

.light-mode .nav-link:hover {
  color: #09090b !important;
  background: rgba(0, 0, 0, 0.03) !important;
}

.light-mode .nav-link.active {
  color: #06b6d4 !important;
  background: rgba(6, 182, 212, 0.06) !important;
}

.light-mode .nav-link.active::before {
  background: #06b6d4 !important;
}

/* Topbar */
.light-mode .topbar {
  background: #f8f9fa !important;
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .streak-counter {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
}

.light-mode .level-badge {
  background: rgba(139, 92, 246, 0.08);
  color: #7c3aed;
}

.light-mode .level-badge-number {
  color: #7c3aed;
}

.light-mode .avatar {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(0, 0, 0, 0.1);
}

/* Main content */
.light-mode .main-content {
  color: #09090b;
}

.light-mode .main-content.page-dashboard {
  background: radial-gradient(ellipse at 50% 30%, rgba(6, 182, 212, 0.03), transparent 60%);
}

.light-mode .main-content.page-timer {
  background: none;
}

.light-mode .main-content.page-homework {
  background: none;
}

.light-mode .main-content.page-profile {
  background: none;
}

.light-mode .page-title {
  color: #09090b !important;
}

.light-mode .page-subtitle {
  color: #71717a !important;
}

/* Glass cards */
.light-mode .glass-card,
.light-mode .glass-card-lg {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.light-mode .glass-card:hover,
.light-mode .glass-card-lg:hover {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Stat cards */
.light-mode .stat-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.light-mode .stat-card.cyan,
.light-mode .stat-card.blue,
.light-mode .stat-card.orange,
.light-mode .stat-card.yellow {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .stat-card:hover {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.light-mode .stat-card.cyan .stat-value { color: #0891b2 !important; }
.light-mode .stat-card.blue .stat-value { color: #2563eb !important; }
.light-mode .stat-card.orange .stat-value { color: #d97706 !important; }
.light-mode .stat-card.yellow .stat-value { color: #16a34a !important; }

.light-mode .stat-label {
  color: #71717a !important;
}

/* Level progress */
.light-mode .level-progress-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.light-mode .level-number {
  color: #0891b2 !important;
}

.light-mode .level-stats-item {
  color: #71717a !important;
}

.light-mode .progress-bar {
  background: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .progress-fill {
  background: #06b6d4 !important;
}

.light-mode .progress-text {
  color: #71717a !important;
}

.light-mode .mini-progress-bar {
  background: rgba(0, 0, 0, 0.08) !important;
}

.light-mode .mini-progress-fill {
  background: #06b6d4 !important;
}

/* Timer */
.light-mode .timer-time {
  color: #09090b !important;
}

.light-mode .status-badge.focus {
  background: rgba(6, 182, 212, 0.08) !important;
  color: #0891b2 !important;
}

.light-mode .status-badge.break {
  background: rgba(22, 163, 74, 0.08) !important;
  color: #16a34a !important;
}

.light-mode .timer-info {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .timer-info-label {
  color: #71717a !important;
}

.light-mode .timer-info-value {
  color: #0891b2 !important;
}

/* Inputs */
.light-mode input,
.light-mode textarea,
.light-mode select {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #09090b !important;
}

.light-mode input:focus,
.light-mode textarea:focus,
.light-mode select:focus {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.08) !important;
}

.light-mode input::placeholder {
  color: #a1a1aa !important;
}

/* Buttons */
.light-mode .btn-primary {
  background: #06b6d4 !important;
  color: #fff !important;
}

.light-mode .btn-primary:hover {
  background: #0891b2 !important;
}

.light-mode .btn-secondary {
  background: #f4f4f5 !important;
  color: #09090b !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.light-mode .btn-secondary:hover {
  background: #e4e4e7 !important;
}

.light-mode .btn-danger {
  background: rgba(220, 50, 50, 0.06) !important;
  color: #dc2626 !important;
  border-color: rgba(220, 50, 50, 0.15) !important;
}

.light-mode .btn-success {
  background: rgba(22, 163, 74, 0.06) !important;
  color: #16a34a !important;
  border-color: rgba(22, 163, 74, 0.15) !important;
}

/* Tabs */
.light-mode .tab {
  color: #a1a1aa !important;
}

.light-mode .tab.active {
  color: #06b6d4 !important;
  border-bottom-color: #06b6d4 !important;
}

.light-mode .tabs {
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

/* Homework cards */
.light-mode .homework-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.light-mode .homework-card:hover {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.light-mode .homework-title {
  color: #09090b !important;
}

.light-mode .homework-card.completed .homework-title {
  color: #a1a1aa !important;
}

.light-mode .homework-meta {
  color: #71717a !important;
}

/* Modals */
.light-mode .modal-overlay {
  background: rgba(0, 0, 0, 0.3) !important;
}

.light-mode .modal-content {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #09090b !important;
}

.light-mode .modal-header {
  color: #09090b !important;
}

.light-mode .modal-close {
  color: #a1a1aa !important;
}

.light-mode .form-label {
  color: #71717a !important;
}

/* Scrollbar */
.light-mode ::-webkit-scrollbar-track {
  background: transparent;
}

.light-mode ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

.light-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.18);
}

/* Heatmap */
.light-mode .heatmap-cell {
  background: rgba(0, 0, 0, 0.04) !important;
}

.light-mode .heatmap-cell.level-1 { background: rgba(6, 182, 212, 0.15) !important; }
.light-mode .heatmap-cell.level-2 { background: rgba(6, 182, 212, 0.3) !important; }
.light-mode .heatmap-cell.level-3 { background: rgba(6, 182, 212, 0.5) !important; }
.light-mode .heatmap-cell.level-4 { background: rgba(6, 182, 212, 0.75) !important; }

/* Calendar */
.light-mode .calendar-cell {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  color: #09090b !important;
}

.light-mode .calendar-cell:hover {
  background: rgba(6, 182, 212, 0.04) !important;
}

.light-mode .calendar-cell.today {
  border-color: #06b6d4 !important;
}

.light-mode .calendar-header-cell {
  color: #71717a !important;
}

/* Notes */
.light-mode .note-item {
  color: #09090b !important;
}

.light-mode .note-item.active {
  border-color: rgba(6, 182, 212, 0.2) !important;
  background: rgba(6, 182, 212, 0.04) !important;
}

.light-mode .note-item h4 {
  color: #09090b !important;
}

.light-mode .note-item p {
  color: #a1a1aa !important;
}

.light-mode .markdown-preview {
  color: #09090b !important;
}

/* Profile */
.light-mode .profile-header {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  color: #09090b !important;
}

.light-mode .settings-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Todo floating panel */
.light-mode .todo-panel {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1) !important;
}

.light-mode .todo-item {
  color: #09090b !important;
}

/* Login page */
.light-mode .login-page {
  background: #f8f9fa !important;
}

.light-mode .login-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.light-mode .login-tagline {
  color: #71717a !important;
}

.light-mode .login-divider {
  color: #a1a1aa !important;
}

.light-mode .login-divider::before,
.light-mode .login-divider::after {
  background: rgba(0, 0, 0, 0.08) !important;
}

/* Celebration */
.light-mode .celebration-overlay {
  background: rgba(255, 255, 255, 0.85) !important;
}

.light-mode .celebration-text {
  color: #0891b2 !important;
}

.light-mode .celebration-level {
  color: #0891b2 !important;
}

/* Motivational quote card */
.light-mode .quote-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Goals page */
.light-mode .goal-ring-text {
  fill: #09090b !important;
}

/* Analytics */
.light-mode .analytics-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .chart-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .weekly-summary {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .notes-list {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .note-editor {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .google-docs-settings {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .calendar-detail-panel {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Theme toggle in light mode */
.light-mode .theme-toggle {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
}

/* General text colors in light mode */
.light-mode h1, .light-mode h2, .light-mode h3, .light-mode h4 {
  color: #09090b !important;
}

.light-mode p {
  color: #3f3f46;
}

.light-mode span {
  color: inherit;
}

/* Filter chips */
.light-mode .filter-chip {
  background: #f4f4f5 !important;
  color: #71717a !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .filter-chip.active {
  background: rgba(6, 182, 212, 0.06) !important;
  color: #06b6d4 !important;
  border-color: rgba(6, 182, 212, 0.2) !important;
}

.light-mode .subject-chip {
  background: #f4f4f5 !important;
  color: #71717a !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .subject-chip.active {
  background: rgba(6, 182, 212, 0.06) !important;
  color: #06b6d4 !important;
  border-color: rgba(6, 182, 212, 0.2) !important;
}

.light-mode .todo-checkbox {
  border-color: rgba(0, 0, 0, 0.15) !important;
}

.light-mode .todo-badge {
  background: rgba(6, 182, 212, 0.06) !important;
}

.light-mode .todo-floating-btn {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.light-mode .milestone-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

.light-mode .profile-avatar-large {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

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

