/* ==========================================================================
   reddalt - Distraction-Free Reddit Reader Styles
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  /* Dark Theme Default */
  --bg-app: #0c0e14;
  --bg-surface: #141822;
  --bg-card: #1b212f;
  --bg-card-hover: #222a3b;
  --bg-pill: #1f2737;
  --bg-pill-hover: #2b354a;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.4);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent: #38bdf8;
  --accent-hover: #0284c7;
  --accent-orange: #ff4500;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
  --transition-fast: 0.15s ease;
}

[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-pill: #e2e8f0;
  --bg-pill-hover: #cbd5e1;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-active: rgba(2, 132, 199, 0.5);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-accent {
  color: var(--accent);
}

.search-form {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 480px;
  width: 100%;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 36px 3px 8px;
  transition: border-color var(--transition-fast);
  position: relative;
  min-height: 38px;
}

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

.search-scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
  margin-right: 6px;
}

.search-scope-chip .scope-text {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scope-clear-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  opacity: 0.75;
  transition: opacity var(--transition-fast), background-color var(--transition-fast);
}

.scope-clear-btn:hover {
  opacity: 1;
  background: rgba(56, 189, 248, 0.25);
}

.search-input {
  width: 100%;
  padding: 5px 4px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
}

.search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.search-btn:hover {
  opacity: 1;
}

.scope-toggle-tabs {
  margin-right: 4px;
}

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

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-pill);
  color: var(--text-main);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-btn:hover {
  background: var(--bg-pill-hover);
  border-color: var(--border-active);
}

.nav-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* Pill Bar */
.pill-bar-container {
  padding: 4px 16px 8px 16px;
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.pill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  font-size: 0.8125rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.pill:hover {
  background: var(--bg-pill-hover);
  color: var(--text-main);
}

.pill.active {
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--border-active);
  font-weight: 600;
}

.pill-divider {
  width: 1px;
  height: 16px;
  background: var(--border-subtle);
  margin: 0 4px;
}

.pill-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
}

.favorites-wrapper {
  display: inline-flex;
  gap: 6px;
}

.pill-add {
  border: 1px dashed var(--border-subtle);
  cursor: pointer;
  background: transparent;
}

/* Notice Banner */
.api-notice-banner {
  background: linear-gradient(90deg, #9333ea, #3b82f6);
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.8125rem;
}

.notice-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notice-link {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* ==========================================================================
   Main Layout & Sidebar
   ========================================================================== */
.main-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
  gap: 20px;
}

.sidebar {
  position: sticky;
  top: 100px;
  height: calc(100vh - 120px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 8px;
}

.sidebar-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.sidebar-heading {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.sub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sub-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.sub-link:hover, .sub-link.active {
  background: var(--bg-card);
  color: var(--accent);
}

.cluster-accordion {
  margin-bottom: 4px;
}

.cluster-summary {
  cursor: pointer;
  padding: 6px 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  user-select: none;
}

.cluster-summary:hover {
  color: var(--text-main);
}

.cluster-subs {
  padding-left: 12px;
  margin-top: 4px;
}

.highlight-box {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08) 0%, transparent 100%);
  border-color: var(--border-active);
}

.related-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.related-tag {
  background: var(--bg-pill);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.related-tag:hover {
  background: var(--accent);
  color: #000;
}

.sidebar-footer {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: auto;
  padding: 8px;
}

/* ==========================================================================
   Subreddit Banner & Controls
   ========================================================================== */
.sub-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.sub-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sub-icon, .sub-icon-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.sub-icon-fallback {
  background: var(--accent);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
}

.sub-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub-name {
  font-size: 1.35rem;
  font-weight: 800;
}

.star-sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-pill);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.star-sub-btn.starred {
  color: #f59e0b;
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.sub-desc-short {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sub-meta-stats {
  display: flex;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.feed-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-tabs {
  display: flex;
  background: var(--bg-pill);
  border-radius: var(--radius-full);
  padding: 3px;
}

.sort-tab {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.sort-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.filter-select {
  background: var(--bg-pill);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 0.8125rem;
  outline: none;
}

/* Pure text banner */
.pure-text-notice {
  display: none;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

body.reader-mode-active .pure-text-notice {
  display: block;
}

body.reader-mode-active .post-media,
body.reader-mode-active .inline-media-box {
  display: none !important;
}

/* ==========================================================================
   Post Cards (Card View)
   ========================================================================== */
.posts-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.post-card:hover {
  border-color: var(--border-active);
}

.post-card-detail {
  padding: 20px;
  flex-direction: column;
}

.post-left-rail {
  background: rgba(0, 0, 0, 0.15);
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 14px;
}

.post-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.score-arrow {
  color: var(--accent-orange);
  font-size: 0.875rem;
}

.post-body-container {
  padding: 14px 16px;
  flex: 1;
  min-width: 0;
}

.post-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.post-sub-badge {
  font-weight: 700;
  color: var(--text-main);
}

.meta-dot {
  opacity: 0.4;
}

.badge {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
}

.badge-sticky {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.badge-flair {
  background: var(--bg-pill);
  color: var(--text-muted);
}

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

.badge-op {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent);
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 800;
  margin-left: 4px;
}

.post-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
}

.post-title a:hover {
  color: var(--accent);
}

/* Media Components */
.post-media {
  margin: 10px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 720px;
}

.post-preview-img {
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #000;
  border-radius: var(--radius-sm);
  display: block;
}

.gallery-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.gallery-item-img {
  height: 280px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.gallery-badge {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
  display: inline-block;
}

.post-video-player, .full-video-player {
  width: 100%;
  max-height: 540px;
  border-radius: var(--radius-sm);
  background: #000;
}

.external-clean-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  transition: all var(--transition-fast);
}

.external-clean-link:hover {
  border-color: var(--accent);
}

.link-domain {
  font-weight: 700;
  color: var(--accent);
}

.link-url-text {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 10px;
  flex: 1;
}

.post-selftext-preview {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-pill);
  transition: all var(--transition-fast);
}

.footer-btn:hover {
  background: var(--bg-pill-hover);
  color: var(--text-main);
}

/* ==========================================================================
   Compact View Styling
   ========================================================================== */
.view-mode-compact .post-card {
  padding: 6px 12px;
}

.view-mode-compact .post-left-rail {
  width: auto;
  background: transparent;
  flex-direction: row;
  padding-top: 0;
  margin-right: 12px;
}

.view-mode-compact .post-score {
  flex-direction: row;
  gap: 4px;
}

.view-mode-compact .post-body-container {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.view-mode-compact .post-header-meta {
  margin-bottom: 0;
  min-width: 140px;
}

.view-mode-compact .post-title {
  margin-bottom: 0;
  font-size: 0.9375rem;
  flex: 1;
}

.view-mode-compact .post-media,
.view-mode-compact .post-selftext-preview {
  display: none !important;
}

.view-mode-compact .post-footer {
  margin-left: auto;
}

/* ==========================================================================
   Post Detail Page & Collapsible Comments
   ========================================================================== */
.back-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.back-link {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
}

.post-detail-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 10px 0;
}

.post-detail-score-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.post-full-body {
  margin-top: 14px;
  font-size: 1rem;
  line-height: 1.6;
}

.markdown-content p {
  margin-bottom: 0.75rem;
}

.markdown-content a {
  color: var(--accent);
  text-decoration: underline;
}

.discussion-section {
  margin-top: 24px;
}

.discussion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

/* Comments Nested Tree */
.comments-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-item {
  border-left: 2px solid var(--border-subtle);
  padding-left: 12px;
  margin-top: 8px;
  transition: border-color var(--transition-fast);
}

.comment-item.depth-0 { border-left-color: rgba(56, 189, 248, 0.3); }
.comment-item.depth-1 { border-left-color: rgba(168, 85, 247, 0.3); }
.comment-item.depth-2 { border-left-color: rgba(236, 72, 153, 0.3); }
.comment-item.depth-3 { border-left-color: rgba(34, 197, 94, 0.3); }
.comment-item.depth-4 { border-left-color: rgba(234, 179, 8, 0.3); }

.comment-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 0;
  user-select: none;
}

.comment-header:hover {
  color: var(--text-main);
}

.collapse-toggle-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
}

.author-op {
  color: var(--accent);
  font-weight: 700;
}

.collapsed-replies-indicator {
  display: none;
  color: var(--accent);
  font-style: italic;
}

.comment-item.is-collapsed .collapsed-replies-indicator {
  display: inline;
}

.comment-item.is-collapsed .comment-content-collapsible {
  display: none;
}

.comment-body {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-main);
  padding: 4px 0 8px 0;
}

.inline-media-box {
  margin: 10px 0;
  display: block;
}

.inline-embed-img {
  max-width: 100%;
  max-height: 520px;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  display: block;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.inline-embed-img:hover {
  border-color: var(--border-active);
}

/* ==========================================================================
   Settings & Form Components
   ========================================================================== */
.settings-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.settings-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.settings-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.credential-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.status-ok {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-warn {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.green { background: #22c55e; }
.status-dot.red { background: #ef4444; }

.guide-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.8125rem;
}

.guide-steps {
  padding-left: 20px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
}

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

.btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

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

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

.btn-secondary {
  background: var(--bg-pill);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.favorites-manage-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fav-manage-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  font-size: 0.8125rem;
}

.fav-remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-weight: 700;
}

.pagination-container {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.btn-pagination {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  padding: 10px 24px;
  border-radius: var(--radius-full);
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Adaptations (Mobile / Fold7)
   ========================================================================== */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  
  .sidebar {
    display: none;
  }
  
  .search-form {
    max-width: 220px;
  }
  
  .btn-label {
    display: none;
  }
  
  .post-card-detail {
    padding: 14px;
  }
}

/* ==========================================================================
   Feed Hygiene & Anti-Rage Shield Styles
   ========================================================================== */
.shield-notice-bar {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
}

.shield-notice-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shield-icon {
  font-size: 1.1rem;
}

.post-card.post-shielded.is-hidden-by-shield {
  display: none !important;
}

.post-card.post-shielded {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.03);
}

.shield-reasons-tag {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: inline-block;
}

/* Flame War Friction Banner */
.flame-war-friction-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: #fca5a5;
}

.flame-war-friction-banner .friction-icon {
  font-size: 1.4rem;
}

/* Bot Comment Badge */
.badge-bot {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.comment-item.is-bot-collapsed {
  opacity: 0.7;
}

/* Hide Comment Karma Mode */
body.hide-comment-karma .comment-score {
  display: none !important;
}

.discussion-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.75rem;
}
