:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

#root {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
}

.app {
  text-align: center;
  position: relative;
}

.app header {
  margin-bottom: 2rem;
}

.app header h1 {
  font-size: 2.5rem;
  margin: 0;
  color: #646cff;
}

.app header p {
  margin: 0.5rem 0 0 0;
  color: #888;
}

/* Login Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
}

.login-card {
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #333;
  max-width: 400px;
  width: 100%;
}

.login-card h2 {
  margin: 0 0 1rem 0;
  color: #fff;
}

.login-card p {
  margin: 0 0 1.5rem 0;
  color: #ccc;
}

.login-button {
  background: #646cff;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.login-button:hover:not(:disabled) {
  background: #535bf2;
}

.login-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Bookmarks Styles */
.bookmarks-container {
  text-align: left;
}

.sidebar-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.view-mode-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  margin-bottom: 1rem;
  justify-content: center;
}

.profile-avatar {
  width: 33px;
  height: 33px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  border: 1px solid #444;
  flex-shrink: 0;
  color: #ddd;
  box-sizing: border-box;
}

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

.profile-avatar svg {
  font-size: 1rem;
}

.sidebar-header-bar .toggle-sidebar-btn {
  background: transparent;
  color: #ddd;
  border: 1px solid #444;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.sidebar-header-bar .toggle-sidebar-btn:hover {
  background: #2a2a2a;
  color: #fff;
}

.sidebar-header-bar .toggle-sidebar-btn:active {
  transform: translateY(1px);
}

.bookmarks-container.collapsed {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 1rem;
}

.bookmarks-container.collapsed .toggle-sidebar-btn {
  background: #2a2a2a;
  color: #ddd;
  border: 1px solid #444;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  box-sizing: border-box;
}

.bookmarks-container.collapsed .toggle-sidebar-btn:hover {
  background: #333;
  color: #fff;
}

.bookmarks-container.collapsed .toggle-sidebar-btn:active {
  transform: translateY(1px);
}

.user-info {
  margin: 0.5rem 0 0 0;
  color: #888;
  font-size: 0.9rem;
  font-family: monospace;
}

.bookmark-count {
  color: #666;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.event-link {
  color: #8ab4f8;
  text-decoration: none;
  font-weight: 500;
}

.event-link:hover {
  text-decoration: underline;
}

.bookmark-urls {
  margin: 0.75rem 0;
}

.bookmark-url {
  display: block;
  margin: 0.25rem 0;
  color: #007bff;
  text-decoration: none;
  word-break: break-all;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.bookmark-url:hover {
  text-decoration: underline;
}

.url-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.read-inline-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.read-inline-btn:hover {
  background: #218838;
}

/* Generic IconButton styling */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #444;
  border-radius: 6px;
  background: #2a2a2a;
  color: #ddd;
  cursor: pointer;
  min-width: 33px;
  min-height: 33px;
  padding: 0;
  box-sizing: border-box;
}

.icon-button:hover { background: #333; }
.icon-button:active { transform: translateY(1px); }

.icon-button.primary { background: #646cff; color: white; border-color: #646cff; }
.icon-button.primary:hover { filter: brightness(1.05); }

.icon-button.success { background: #28a745; color: white; border-color: #28a745; }
.icon-button.success:hover { filter: brightness(1.05); }

.icon-button.ghost { background: #2a2a2a; }

.bookmark-events {
  margin: 1rem 0;
}

.bookmark-events h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #666;
}

.event-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.event-id {
  background: #f5f5f5;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #666;
}

.more-events {
  color: #999;
  font-style: italic;
  font-size: 0.8rem;
}

.parsed-content {
  margin: 1rem 0;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.nostr-mention {
  color: #007bff;
  text-decoration: none;
  font-family: monospace;
  background: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.nostr-mention:hover {
  background: #e9ecef;
  text-decoration: underline;
}

.nostr-link {
  color: #007bff;
  text-decoration: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.nostr-link:hover {
  text-decoration: underline;
}

.logout-button {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.logout-button:hover {
  background: #c82333;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #ccc;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #888;
}

.empty-state p {
  margin: 0.5rem 0;
}

.bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Two-pane layout (legacy support) */
.two-pane {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1rem;
  height: calc(100vh - 4rem);
  transition: grid-template-columns 0.3s ease;
}

.two-pane.sidebar-collapsed {
  grid-template-columns: 60px 1fr;
}

/* Three-pane layout */
.three-pane {
  display: grid;
  grid-template-columns: 360px 1fr 360px;
  gap: 1rem;
  height: calc(100vh - 4rem);
  transition: grid-template-columns 0.3s ease;
}

.three-pane.sidebar-collapsed {
  grid-template-columns: 60px 1fr 360px;
}

.three-pane.highlights-collapsed {
  grid-template-columns: 360px 1fr 60px;
}

.three-pane.sidebar-collapsed.highlights-collapsed {
  grid-template-columns: 60px 1fr 60px;
}

.pane.sidebar {
  overflow-y: auto;
  height: 100%;
}

.pane.main {
  overflow-y: auto;
  height: 100%;
}

.pane.highlights {
  overflow-y: auto;
  height: 100%;
}

.reader {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1rem;
  text-align: left;
}

.reader.empty {
  color: #888;
}

.loading-spinner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #888;
}

.loading-spinner svg {
  font-size: 1.2rem;
}

.reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.reader-title {
  margin: 0;
  flex: 1;
}

.highlight-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: rgba(100, 108, 255, 0.1);
  border: 1px solid rgba(100, 108, 255, 0.3);
  border-radius: 6px;
  font-size: 0.875rem;
  color: #646cff;
}

.highlight-indicator svg {
  font-size: 0.875rem;
}

.reader-html {
  color: #ddd;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.reader-markdown {
  color: #ddd;
  line-height: 1.7;
}

/* Ensure content is left-aligned even if source markup uses center */
.reader .reader-html *,
.reader .reader-markdown * {
  text-align: left !important;
}

.reader center,
.reader [align="center"] {
  text-align: left !important;
}

/* Tame images from external content */
.reader .reader-html img,
.reader .reader-markdown img {
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  width: auto;
  display: block;
  margin: 0.75rem 0;
  border-radius: 6px;
}

.reader-markdown h1,
.reader-markdown h2,
.reader-markdown h3,
.reader-markdown h4 {
  margin-top: 1.2rem;
}

.reader-markdown p {
  margin: 0.5rem 0;
}

.reader-markdown a {
  color: #8ab4f8;
  text-decoration: none;
}

.reader-markdown a:hover { text-decoration: underline; }

.reader-markdown pre,
.reader-markdown code {
  background: #111;
  border: 1px solid #333;
  border-radius: 6px;
}

.reader-markdown pre {
  padding: 0.75rem;
  overflow: auto;
}

.reader-markdown code {
  padding: 0.1rem 0.3rem;
}

.bookmark-item {
  background: #1a1a1a;
  padding: 1.5rem;
  border-radius: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bookmark-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.bookmark-item h3 {
  margin: 0 0 0.5rem 0;
  color: #fff;
  font-size: 1.2rem;
}

.bookmark-url {
  color: #646cff;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  word-break: break-all;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.bookmark-url:hover {
  text-decoration: underline;
}

.bookmark-content {
  color: #ccc;
  margin: 0.5rem 0;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.bookmark-meta {
  color: #888;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Individual Bookmarks Styles */
.individual-bookmarks {
  margin: 1rem 0;
}

.individual-bookmarks h4 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: #fff;
}

.bookmarks-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bookmarks-grid.bookmarks-compact {
  gap: 0.5rem;
}

.bookmarks-grid.bookmarks-large {
  gap: 1.5rem;
}

.individual-bookmark {
  background: #2a2a2a;
  padding: 1.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid #333;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow: hidden;
}

.individual-bookmark:hover {
  border-color: #444;
  background: #2d2d2d;
}

/* Compact view styles */
.individual-bookmark.compact {
  padding: 0.4rem 0.75rem;
  background: transparent;
  border-bottom: 1px solid #333;
  border-radius: 0;
  box-shadow: none;
}

.individual-bookmark.compact:hover {
  background: #2a2a2a;
  transform: none;
  box-shadow: none;
}

.compact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 28px;
}

.compact-row.clickable {
  cursor: pointer;
}

.compact-row.clickable:active {
  opacity: 0.8;
}

.bookmark-type-compact {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #646cff;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.compact-text {
  flex: 1;
  min-width: 0;
  color: #ccc;
  font-size: 0.85rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-date-compact {
  font-size: 0.7rem;
  color: #666;
  flex-shrink: 0;
  white-space: nowrap;
}

.compact-read-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 22px;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.compact-read-btn:hover {
  background: #218838;
}

.compact-read-btn:active {
  transform: translateY(1px);
}

.bookmark-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bookmark-type {
  color: #646cff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bookmark-id {
  font-family: monospace;
  font-size: 0.8rem;
  color: #888;
  background: #1a1a1a;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.bookmark-date {
  font-size: 0.8rem;
  color: #666;
}

.bookmark-date-link {
  font-size: 0.8rem;
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.bookmark-date-link:hover {
  color: #8ab4f8;
  text-decoration: underline;
}

.individual-bookmark .bookmark-content {
  margin: 0.75rem 0;
  color: #ccc;
  line-height: 1.6;
  font-size: 0.9rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.expand-toggle {
  margin: 0.25rem 0;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  width: 100%;
  height: 22px; /* half of default icon button */
  display: flex;
  align-items: center;
  justify-content: center;
}

.expand-toggle:hover {
  color: #bbb;
}

.bookmark-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  gap: 0.75rem;
}

.bookmark-meta-minimal {
  font-size: 0.8rem;
  color: #888;
}

.author-link-minimal {
  color: #888;
  text-decoration: none;
  transition: color 0.2s ease;
}

.author-link-minimal:hover { 
  color: #aaa;
}

.read-now-button-minimal {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.read-now-button-minimal:hover {
  background: #218838;
}

.expand-toggle-urls {
  margin-top: 0.5rem;
  background: transparent;
  border: none;
  color: #646cff;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.25rem 0;
  text-decoration: underline;
}

.expand-toggle-urls:hover {
  color: #8088ff;
}

/* Large preview view styles */
.individual-bookmark.large {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.large-preview-image {
  width: 100%;
  height: 180px;
  background: #1a1a1a;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #333;
  position: relative;
}

.large-preview-image:hover {
  opacity: 0.9;
}

.large-preview-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

.preview-placeholder {
  font-size: 3rem;
  color: #444;
}

.large-content {
  padding: 1.25rem;
}

.large-text {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.large-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #888;
  padding-top: 0.75rem;
  border-top: 1px solid #333;
}

.large-author {
  flex: 1;
}

.large-read-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.large-read-button:hover {
  background: #218838;
}

/* Private Bookmark Styles */
.private-bookmark {
  background: #2a2a2a;
}

.private-bookmark:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.private-indicator {
  margin-left: 0.5rem;
  color: #ff6b6b;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  
  .login-card,
  .bookmark-item {
    background: #f9f9f9;
    border-color: #ddd;
  }
  
  .bookmarks-header {
    border-bottom-color: #ddd;
  }
  
  .bookmark-item h3 {
    color: #213547;
  }
  
  .bookmark-content {
    color: #666;
  }
  
  .user-info {
    color: #666;
  }
  
  .individual-bookmark {
    background: #f5f5f5;
    border-color: #ddd;
  }
  
  .individual-bookmark:hover {
    border-color: #646cff;
  }
  
  .individual-bookmarks h4 {
    color: #213547;
  }
  
  .individual-bookmark .bookmark-content {
    color: #666;
  }
  
  .bookmark-id {
    background: #e9ecef;
    color: #666;
  }
  
  .individual-bookmark .bookmark-meta span {
    background: #e9ecef;
    color: #666;
  }
  
  .private-bookmark {
    background: linear-gradient(135deg, #f5f5f5 0%, #e9ecef 100%);
  }
  
  .highlights-container {
    background: #f5f5f5;
    border-color: #ddd;
  }
  
  .highlights-header {
    background: #fff;
    border-color: #ddd;
  }
  
  .highlight-item {
    background: #fff;
    border-color: #ddd;
  }
  
  .highlight-quote-icon {
    color: #646cff;
  }
  
  .highlight-text {
    color: #213547;
  }
}

/* Highlights Panel Styles */
.highlights-container {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.highlights-container.collapsed {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 1rem;
  background: transparent;
  border: none;
}

.highlights-container.collapsed .toggle-highlights-btn {
  background: #2a2a2a;
  color: #ddd;
  border: 1px solid #444;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.highlights-container.collapsed .toggle-highlights-btn:hover {
  background: #333;
  color: #fff;
}

.highlights-container.collapsed .toggle-highlights-btn:active {
  transform: translateY(1px);
}

.highlights-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #333;
  background: #1e1e1e;
  border-radius: 12px 12px 0 0;
}

.highlights-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.highlights-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.highlights-title .count {
  color: #888;
  font-size: 0.875rem;
}

.highlights-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-underlines-btn,
.toggle-highlights-btn {
  background: transparent;
  color: #ddd;
  border: 1px solid #444;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.toggle-underlines-btn:hover,
.toggle-highlights-btn:hover {
  background: #2a2a2a;
  color: #fff;
}

.toggle-underlines-btn:active,
.toggle-highlights-btn:active {
  transform: translateY(1px);
}

.highlights-loading,
.highlights-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: #888;
  text-align: center;
  gap: 0.5rem;
}

.highlights-empty svg {
  color: #555;
  margin-bottom: 0.5rem;
}

.empty-hint {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.5rem;
}

.highlights-list {
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight-item {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  transition: border-color 0.2s ease;
}

.highlight-item:hover {
  border-color: #646cff;
}

.highlight-quote-icon {
  color: #646cff;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.highlight-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.highlight-text {
  margin: 0;
  padding: 0;
  font-style: italic;
  color: #ddd;
  line-height: 1.6;
  border-left: none;
  font-size: 0.95rem;
}

.highlight-comment {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(100, 108, 255, 0.1);
  border-left: 3px solid #646cff;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #ddd;
  line-height: 1.5;
}

.highlight-context {
  margin-top: 0.5rem;
}

.highlight-context summary {
  cursor: pointer;
  font-size: 0.875rem;
  color: #888;
  user-select: none;
  transition: color 0.2s ease;
}

.highlight-context summary:hover {
  color: #aaa;
}

.context-text {
  margin: 0.5rem 0 0 0;
  padding: 0.75rem;
  background: #252525;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #aaa;
  line-height: 1.5;
}

.highlight-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #888;
  flex-wrap: wrap;
}

.highlight-time {
  color: #888;
}

.highlight-source {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #646cff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.highlight-source:hover {
  color: #535bf2;
  text-decoration: underline;
}

.highlight-source svg {
  font-size: 0.875rem;
}

/* Inline content highlights */
.content-highlight {
  background: transparent;
  border-bottom: 2px solid #ffd700;
  padding: 0.125rem 0;
  cursor: help;
  transition: all 0.2s ease;
  position: relative;
}

.content-highlight:hover {
  background: rgba(255, 215, 0, 0.15);
  border-bottom-color: #ffed4e;
}

.reader-html .content-highlight,
.reader-markdown .content-highlight {
  color: inherit;
  text-decoration: none;
}

/* Ensure highlights work in both light and dark mode */
@media (prefers-color-scheme: light) {
  .content-highlight {
    background: transparent;
    border-bottom-color: #d4af37;
  }
  
  .content-highlight:hover {
    background: rgba(212, 175, 55, 0.15);
    border-bottom-color: #ffd700;
  }
  
  .highlight-indicator {
    background: rgba(100, 108, 255, 0.15);
    border-color: rgba(100, 108, 255, 0.4);
  }
}
