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

body {
  overflow: hidden;
  height: 100vh;
  background: #1e1e2e;
}

#root {
  height: 100vh;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #45475a;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #585b70;
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes flipIn {
  from { transform: rotateX(90deg); opacity: 0; }
  to { transform: rotateX(0deg); opacity: 1; }
}

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

@keyframes strikethrough {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes confettiDrop {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@keyframes fireGlow {
  0%, 100% { text-shadow: 0 0 10px #fab387, 0 0 20px #f38ba8; }
  50% { text-shadow: 0 0 20px #fab387, 0 0 40px #f38ba8, 0 0 60px #f9e2af; }
}

.animate-fadein {
  animation: fadeIn 0.3s ease-out;
}

.animate-slidein {
  animation: slideInLeft 0.3s ease-out;
}

.animate-flipin {
  animation: flipIn 0.4s ease-out;
}

.animate-pulse-slow {
  animation: pulse 2s ease-in-out infinite;
}

.task-completed .task-title {
  position: relative;
}
.task-completed .task-title::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  height: 2px;
  background: #a6e3a1;
  animation: strikethrough 0.3s ease-out forwards;
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  animation: confettiDrop 2s ease-in forwards;
  z-index: 9999;
  pointer-events: none;
}

.fire-text {
  animation: fireGlow 1.5s ease-in-out infinite;
}

.resize-handle {
  cursor: col-resize;
  width: 4px;
  background: transparent;
  transition: background 0.2s;
}
.resize-handle:hover {
  background: #89b4fa;
}

textarea:focus, input:focus {
  outline: none;
}

.markdown-content h1 { font-size: 1.75rem; font-weight: 700; margin: 1rem 0 0.5rem; color: #cdd6f4; }
.markdown-content h2 { font-size: 1.4rem; font-weight: 600; margin: 0.8rem 0 0.4rem; color: #cdd6f4; }
.markdown-content h3 { font-size: 1.15rem; font-weight: 600; margin: 0.6rem 0 0.3rem; color: #cdd6f4; }
.markdown-content p { margin: 0.4rem 0; line-height: 1.7; }
.markdown-content strong { font-weight: 700; color: #f9e2af; }
.markdown-content em { font-style: italic; color: #f5c2e7; }
.markdown-content code { background: #313244; padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 0.85em; color: #a6e3a1; }
.markdown-content pre { background: #181825; padding: 12px; border-radius: 8px; overflow-x: auto; margin: 0.5rem 0; }
.markdown-content pre code { background: transparent; padding: 0; }
.markdown-content ul { list-style: disc; padding-left: 1.5rem; margin: 0.3rem 0; }
.markdown-content ol { list-style: decimal; padding-left: 1.5rem; margin: 0.3rem 0; }
.markdown-content li { margin: 0.2rem 0; }
.markdown-content blockquote { border-left: 3px solid #89b4fa; padding-left: 12px; margin: 0.5rem 0; color: #a6adc8; font-style: italic; }
.markdown-content a, .wiki-link { color: #89b4fa; text-decoration: none; cursor: pointer; }
.markdown-content a:hover, .wiki-link:hover { text-decoration: underline; }
.flashcard-syntax { background: #313244; border: 1px solid #cba6f7; border-radius: 4px; padding: 2px 6px; color: #cba6f7; }
.tag-pill { display: inline-block; background: #313244; border-radius: 12px; padding: 1px 8px; font-size: 0.8em; color: #89dceb; margin: 0 2px; }

@media (max-width: 768px) {
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 40;
  }
}