:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Newsreader", "Merriweather", Georgia, Cambria, serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  /* Default Dark Mode */
  --bg-primary: #18191c;
  --bg-secondary: #131417;
  --bg-tertiary: #202227;
  --bg-card: #1b1c21;
  --bg-card-hover: #23252c;
  --bg-active-row: #253346;
  --border-color: #2b2e38;
  --border-subtle: #22242c;
  --border-active: #4d90fe;
  --text-primary: #f0f3f6;
  --text-secondary: #9da7b7;
  --text-muted: #647082;
  --accent: #d14836;
  --accent-hover: #e05d4b;
  --accent-blue: #4d90fe;
  --link-color: #6ea4fe;
  --unread-dot: #ef4444;
  --star-color: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --sidebar-width: 270px;
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

[data-theme="google-light"], [data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #ebebeb;
  --bg-card: #ffffff;
  --bg-card-hover: #f9f9f9;
  --bg-active-row: #ffffcc; /* Iconic Google Reader pale yellow highlight */
  --border-color: #ebebeb;
  --border-subtle: #f4f4f4;
  --border-active: #4d90fe;
  --text-primary: #222222;
  --text-secondary: #555555;
  --text-muted: #777777;
  --accent: #d14836; /* Google Red Subscribe Button */
  --accent-hover: #c53727;
  --accent-blue: #4d90fe;
  --link-color: #1155cc;
  --unread-dot: #d14836;
  --star-color: #f59e0b;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="sepia"] {
  --bg-primary: #fbf7ee;
  --bg-secondary: #f4ece1;
  --bg-tertiary: #ebdccb;
  --bg-card: #f8f3ea;
  --bg-card-hover: #f0e6d6;
  --border-color: #ded1be;
  --border-subtle: #e6dac8;
  --text-primary: #2d261e;
  --text-secondary: #655443;
  --text-muted: #96816c;
  --accent: #a05a2c;
  --accent-hover: #86461d;
  --accent-light: rgba(160, 90, 44, 0.12);
  --unread-dot: #a05a2c;
  --shadow: 0 4px 20px rgba(80, 50, 20, 0.08);
}

[data-theme="oled"] {
  --bg-primary: #000000;
  --bg-secondary: #080808;
  --bg-tertiary: #121212;
  --bg-card: #050505;
  --bg-card-hover: #101010;
  --border-color: #1a1a1a;
  --border-subtle: #141414;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --unread-dot: #6366f1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

/* App Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 40;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.logo-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unread-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
}

.unread-badge.active-badge {
  background-color: var(--accent);
  color: #fff;
}

.folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.folder-header:hover {
  background-color: var(--bg-tertiary);
}

.folder-feeds {
  padding-left: 12px;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  position: relative;
}

/* Stream Toolbar */
.toolbar {
  height: 56px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.view-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-box {
  position: relative;
  width: 260px;
}

.search-box input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Google Red Subscribe Button */
.btn-google-red {
  background: linear-gradient(to bottom, #dd4b39, #d14836);
  border: 1px solid #b0281a;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 3px;
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.btn-google-red:hover {
  background: linear-gradient(to bottom, #dd4b39, #c53727);
  border-color: #992417;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* View Mode Switcher */
.view-switcher {
  display: flex;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.view-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: transparent;
  border: none;
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.view-btn:hover {
  color: var(--text-primary);
}
.view-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.view-icon {
  font-size: 14px;
}

.btn-icon {
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-color);
}

.btn-icon:hover {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
}

/* Articles Stream View */
.articles-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 80px;
}

.articles-list {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   GOOGLE READER COMPACT LIST VIEW (.stream-compact)
   ============================================================ */
.stream-compact {
  border-top: 1px solid var(--border-color);
}

.reader-row {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  transition: background 0.1s ease;
}

.reader-row:hover {
  background: var(--bg-card-hover);
}

.reader-row.selected {
  background: var(--bg-active-row) !important;
  border-left: 4px solid var(--border-active, #4d90fe);
}

.row-collapsed {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  cursor: pointer;
  gap: 10px;
  user-select: none;
}

.row-star {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease, color 0.1s ease;
}

.row-star:hover {
  transform: scale(1.15);
  color: var(--star-color);
}

.row-star.starred {
  color: var(--star-color);
}

.row-feed {
  width: 145px;
  min-width: 145px;
  max-width: 145px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.reader-row.unread .row-feed {
  font-weight: 700;
  color: var(--text-primary);
}

.row-main {
  flex: 1;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.88rem;
  min-width: 0;
}

.row-title {
  color: var(--text-primary);
  font-weight: 400;
  margin-right: 6px;
  flex-shrink: 0;
  max-width: 75%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-row.unread .row-title {
  font-weight: 700;
}

.row-snippet {
  color: var(--text-muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-date {
  width: 90px;
  min-width: 90px;
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.reader-row.unread .row-date {
  font-weight: 600;
  color: var(--text-secondary);
}

/* Inline Expanded Body in List View */
.row-expanded-body {
  padding: 18px 24px 24px 34px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.entry-header {
  margin-bottom: 14px;
}

.entry-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.entry-title-link {
  color: var(--link-color, #1155cc);
  text-decoration: none;
}

.entry-title-link:hover {
  text-decoration: underline;
}

.entry-byline {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.entry-byline a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.entry-byline a:hover {
  text-decoration: underline;
}

.entry-main-content {
  font-family: var(--reading-font, var(--font-sans));
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 18px 0 24px;
  word-break: break-word;
}

.entry-main-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  display: block;
}

.entry-main-content p {
  margin-bottom: 14px;
}

.entry-main-content blockquote {
  border-left: 3px solid var(--border-active, #4d90fe);
  padding: 8px 16px;
  margin: 14px 0;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-radius: 0 4px 4px 0;
}

.entry-actions-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.entry-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.entry-action-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.entry-action-btn.starred {
  color: var(--star-color);
  border-color: var(--star-color);
}

.entry-action-btn.shared {
  color: #10b981;
  border-color: #10b981;
}

/* ============================================================
   GOOGLE READER EXPANDED VIEW (.stream-expanded)
   ============================================================ */
.stream-expanded {
  padding: 16px 20px;
  gap: 16px;
}

.expanded-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: border-color 0.15s ease;
}

.expanded-card.selected {
  border-left: 4px solid var(--border-active, #4d90fe);
  box-shadow: var(--shadow);
}

.expanded-card.read {
  opacity: 0.85;
}

/* Shared Note Callout */
.shared-note-callout {
  margin: 12px 0 16px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-left: 3px solid #10b981;
  border-radius: 0 4px 4px 0;
  font-size: 0.88rem;
}

.shared-note-header {
  font-weight: 700;
  color: #10b981;
  margin-bottom: 4px;
}

.shared-quote {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 6px;
  padding-left: 8px;
  border-left: 2px solid var(--border-color);
}

.shared-note-text {
  color: var(--text-primary);
}

/* Shared Items Top Stream Banner */
.shared-feed-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid #10b981;
  border-radius: var(--radius-sm);
  gap: 16px;
}

/* Gemini TL;DR Container inside entry */
.entry-tldr-box {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Legacy Card (Fallback) */
.article-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.article-card.selected {
  border-color: var(--accent);
  background-color: var(--accent-light);
}

.article-card.read {
  opacity: 0.65;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.feed-source {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-secondary);
}

.unread-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--unread-dot);
  display: inline-block;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.card-snippet {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}

.action-btn:hover {
  color: var(--text-primary);
}

.action-btn.starred {
  color: var(--star-color);
}

.action-btn.shared {
  color: var(--accent);
}

/* Reading View Pane / Slide-over */
.reader-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.reader-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.reader-pane {
  width: 100%;
  max-width: 820px;
  height: 100%;
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.reader-modal-overlay.open .reader-pane {
  transform: translateX(0);
}

.reader-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.reader-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px 80px;
  user-select: text;
}

.reader-article-meta {
  margin-bottom: 24px;
}

.reader-article-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.reader-byline {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Gemini AI Briefing Box */
.gemini-briefing-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 28px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.gemini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 700;
  color: #818cf8;
}

.reader-content {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.reader-content p {
  margin-bottom: 1.4em;
}

.reader-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 1.2em 0;
}

/* Share with Note Sheet */
.modal-dialog {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-dialog.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.quote-preview {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

textarea.note-input {
  width: 100%;
  min-height: 110px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
}

textarea.note-input:focus {
  border-color: var(--accent);
}

.syndicate-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.syndicate-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: var(--bg-tertiary);
  border-radius: 20px;
  cursor: pointer;
}

/* Mobile Bottom Navigation Bar */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  z-index: 45;
  padding-bottom: env(safe-area-inset-bottom);
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.bottom-nav-item.active {
  color: var(--accent);
}

/* Mobile Drawer Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 35;
}

.mobile-overlay.open {
  display: block;
}

/* Hotkey Indicator Pills */
kbd {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
  }

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

  .bottom-nav {
    display: flex;
  }

  .search-box {
    display: none;
  }

  .articles-scroll-area {
    padding: 12px 14px 90px;
  }

  .reader-pane {
    max-width: 100%;
  }

  .reader-body {
    padding: 20px 20px 80px;
  }

  .reader-article-title {
    font-size: 1.45rem;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning {
  display: inline-block;
  animation: spin 0.85s linear infinite;
}

@media (max-width: 600px) {
  #syncBtnText {
    display: none;
  }
  .toolbar-right {
    gap: 4px;
  }
  .toolbar-right .btn {
    padding: 6px 8px;
    font-size: 0.78rem;
  }
}

.feed-manage-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 5px;
  border-radius: 3px;
  opacity: 0.5;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.nav-item:hover .feed-manage-btn {
  opacity: 1;
}
.feed-manage-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.feed-stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  margin: 14px 20px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  gap: 12px;
}


