* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 128, 128, 0.5);
}

/* Prose styles for markdown preview */
.prose {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1rem;
  line-height: 1.75;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.prose h1 { font-size: 2em; }
.prose h2 { font-size: 1.5em; }
.prose h3 { font-size: 1.25em; }

.prose p {
  margin-bottom: 1em;
}

.prose ul, .prose ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.prose li {
  margin-bottom: 0.25em;
}

.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
  padding: 0.125em 0.25em;
  background: rgba(128, 128, 128, 0.1);
  border-radius: 3px;
}

.prose pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
  padding: 1em;
  background: rgba(128, 128, 128, 0.1);
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1em;
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose blockquote {
  border-left: 3px solid rgba(128, 128, 128, 0.3);
  padding-left: 1em;
  margin-left: 0;
  font-style: italic;
  color: inherit;
  opacity: 0.8;
}

.prose a {
  color: #0066cc;
  text-decoration: underline;
}

.dark .prose a {
  color: #6699cc;
}

.prose img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1em 0;
}

.prose hr {
  border: none;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
  margin: 2em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}

.prose th, .prose td {
  border: 1px solid rgba(128, 128, 128, 0.2);
  padding: 0.5em;
  text-align: left;
}

.prose th {
  background: rgba(128, 128, 128, 0.05);
}

/* Animations */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fade-in 0.2s ease-out;
}

/* Focus states */
input:focus, textarea:focus {
  outline: none;
}

/* Selection */
::selection {
  background: rgba(0, 102, 204, 0.2);
}

.dark ::selection {
  background: rgba(102, 153, 204, 0.3);
}

/* Sidebar transition for mobile */
@media (max-width: 768px) {
  .md\:flex {
    display: flex;
  }
}

/* Textarea placeholder */
textarea::placeholder {
  color: rgba(128, 128, 128, 0.5);
}

/* Button hover states */
button {
  transition: all 0.15s ease;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Dark mode hover for share modal */
.dark .hover\:bg-ink-750:hover {
  background-color: #1a1a1a;
}

.bg-ink-750 {
  background-color: #222;
}

.dark .bg-ink-750 {
  background-color: #1a1a1a;
}

/* Print styles */
@media print {
  .prose {
    max-width: none;
    padding: 0;
  }
}