/* VEIL v2.1 — components.css */

/* ================================================================
   THREADS-LIKE LAYOUT: LEFT SIDEBAR + CENTER + RIGHT SIDEBAR
   ================================================================ */


/* ===== LEFT SIDEBAR (Desktop only — Threads-style) ===== */
.veil-left-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .veil-left-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-left-width);
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 10px;
    z-index: 50;
    overflow-y: auto;
  }
}

.veil-sidebar-logo {
  margin-bottom: 24px;
  padding: 0 12px;
}

.veil-sidebar-wordmark {
  height: 38px;
  width: auto;
  display: block;
  opacity: 0.95;
}

.veil-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.veil-sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  position: relative;
}

.veil-sidebar-nav-item i {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.veil-sidebar-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
}

[data-theme="light"] .veil-sidebar-nav-item:hover {
  background: rgba(0,0,0,0.04);
}

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

/* Light mode sidebar active state */
[data-theme="light"] .veil-sidebar-nav-item.active {
  color: var(--accent);
  background: rgba(0,0,0,0.06);
}

.veil-sidebar-badge {
  position: absolute;
  top: 5px;
  left: 28px;
  background: var(--notification-badge);
  color: #fff;
  font-size: 9px;
  min-width: 14px;
  height: 14px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.veil-sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.veil-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.veil-sidebar-user:hover {
  background: rgba(255,255,255,0.05);
}

.veil-sidebar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #555);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.veil-sidebar-username {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Logout button in sidebar */
.veil-sidebar-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-subtle);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.veil-sidebar-logout i {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.veil-sidebar-logout:hover {
  background: rgba(255,71,87,0.08);
  color: var(--like-active);
}

/* Sidebar CTA (Empirical) */
.veil-sidebar-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  text-decoration: none;
  margin-bottom: 4px;
}

.veil-sidebar-cta i {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  color: #facc15;
}

.veil-sidebar-cta:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* Sidebar Footer Info */
.veil-sidebar-footer-info {
  padding: 12px 14px 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.veil-sidebar-footer-desc {
  font-size: 11px;
  color: var(--text-subtle);
  line-height: 1.4;
  margin: 0 0 8px;
}

.veil-sidebar-footer-links {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 10px;
  color: var(--text-subtle);
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.veil-sidebar-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.veil-sidebar-footer-links a:hover {
  color: var(--text-main);
}

.veil-sidebar-footer-credit {
  font-size: 10px;
  color: var(--text-subtle);
}

.veil-sidebar-footer-credit a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.veil-sidebar-footer-credit a:hover {
  color: var(--text-main);
}

/* Right Sidebar Trending Items */
.veil-trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  cursor: pointer;
  transition: background 0.1s;
  border-radius: 6px;
}

.veil-trending-item:hover {
  background: rgba(255,255,255,0.03);
}

.veil-trending-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.veil-trending-info {
  flex: 1;
  min-width: 0;
}

.veil-trending-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.veil-trending-artist {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 2px;
}

.veil-trending-likes {
  font-size: 10px;
  color: var(--text-subtle);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
}

.veil-trending-likes i {
  color: var(--like-color);
  font-size: 9px;
}


/* ===== RIGHT SIDEBAR (Desktop only — Threads-style) ===== */
.veil-right-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .veil-right-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-right-width);
    background: var(--bg);
    border-left: 1px solid var(--border);
    padding: 20px 20px;
    overflow-y: auto;
    z-index: 50;
    display: flex;
    flex-direction: column;
  }
}

.veil-right-search {
  margin-bottom: 20px;
}

.veil-right-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  transition: border-color 0.2s, background 0.2s;
}

.veil-right-search-box:focus-within {
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.06);
}

.veil-right-search-box i {
  color: var(--text-subtle);
  font-size: 13px;
  flex-shrink: 0;
}

.veil-right-search-box input {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  font-family: var(--font-body);
  width: 100%;
  outline: none;
}

.veil-right-search-box input::placeholder {
  color: var(--text-subtle);
}

.veil-right-section {
  margin-bottom: 20px;
}

.veil-right-heading {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

/* Suggested users in right sidebar */
.veil-suggested-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.veil-sug-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.veil-sug-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.veil-sug-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.veil-sug-handle {
  font-size: 11px;
  color: var(--text-muted);
}

.veil-sug-follow {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: var(--font-body);
  flex-shrink: 0;
}

.veil-sug-follow:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

/* Live Stats */
.veil-live-stats {
  display: flex;
  gap: 20px;
}

.live-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.live-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.live-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* OS / Session Block */
.veil-os-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  overflow: hidden;
}

.veil-os-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.veil-os-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.veil-os-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.veil-os-detail {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer section in right sidebar (like Next.js/React app footer) */
.veil-right-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.veil-right-footer-tagline {
  font-size: 10px;
  color: var(--text-subtle);
  line-height: 1.6;
  margin: 0 0 10px;
  text-align: left;
  padding: 0 2px;
}

.veil-right-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 10px;
  justify-content: flex-start;
}

.veil-right-footer-nav a,
.veil-right-footer-nav button {
  font-size: 11px;
  color: var(--text-subtle);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
  transition: color 0.15s;
}

.veil-right-footer-nav a:hover,
.veil-right-footer-nav button:hover {
  color: var(--text-main);
}

.veil-right-footer-copy {
  font-size: 10px;
  color: var(--text-subtle);
  line-height: 1.5;
  text-align: left;
}

.veil-right-footer-copy a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.veil-right-footer-copy a:hover {
  color: var(--text-main);
}

/* About section in right sidebar */
.veil-right-about {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.veil-about-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.veil-about-links {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--text-subtle);
  margin-bottom: 6px;
}

.veil-about-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.veil-about-links a:hover {
  color: var(--text-main);
}

.veil-about-credit {
  font-size: 11px;
  color: var(--text-subtle);
}

.veil-about-credit a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.veil-about-credit a:hover {
  color: var(--text-main);
}


/* ===== HIDE HEADER ON DESKTOP (sidebars replace it) ===== */
@media (min-width: 1024px) {
  .header {
    display: none !important;
  }
  .filter-section {
    display: none !important;
  }
  .desktop-nav-tabs {
    display: none !important;
  }
  .submit-fab {
    display: none !important;
  }
}


/* ===== VERIFIED BADGE ===== */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #1d9bf0;
  border-radius: 50%;
  margin-left: 4px;
  flex-shrink: 0;
}

.verified-badge i {
  font-size: 8px;
  color: #fff;
}

.verified-badge.transparent {
  background: #1d9bf0;
}

/* ===== TEXT-ONLY POST CARDS ===== */
.art-piece-text {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.art-piece-text:hover {
  border-color: var(--border-strong);
}

.art-text-card-body {
  padding: 16px 16px 8px;
  cursor: pointer;
  min-height: 80px;
}

.art-text-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.4;
}

.art-text-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Light mode text cards */
[data-theme="light"] .art-piece-text {
  background: #fff;
  border-color: #e5e5e5;
}

[data-theme="light"] .art-piece-text:hover {
  border-color: #ccc;
}

/* Text-only thumb in trending/sidebar */
.veil-text-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  font-size: 14px;
}

/* Text-only in lightbox */
.lb-text-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 40px;
  text-align: center;
}

.lb-text-card-inner {
  max-width: 480px;
  width: 100%;
}

.lb-text-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.3;
}

.lb-text-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 16px;
}

.lb-text-author {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}

.lb-image-area.text-only-mode {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  cursor: default;
}

[data-theme="light"] .lb-image-area.text-only-mode {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
}

[data-theme="light"] .lb-text-title {
  color: #222;
}

[data-theme="light"] .lb-text-desc {
  color: #555;
}

[data-theme="light"] .lb-text-author {
  color: #888;
}

/* Trending text-only thumb */
.trending-text-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-2);
  color: var(--text-subtle);
  font-size: 20px;
  flex-shrink: 0;
}

/* ===== HOT TOPICS ===== */
.veil-hot-topic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.veil-hot-topic:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
}

[data-theme="light"] .veil-hot-topic:hover {
  background: rgba(0,0,0,0.03);
}

.veil-hot-topic-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.veil-hot-topic-count {
  font-size: 10px;
  color: var(--text-subtle);
  background: rgba(255,107,107,0.1);
  padding: 2px 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
}

/* Hot Topic Buttons (v6.0 sidebar) */
.veil-hot-topic-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  margin-bottom: 4px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  transition: all 0.15s;
  animation: hotTopicGlow 3s ease-in-out infinite;
}

.veil-hot-topic-btn:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border);
}

[data-theme="light"] .veil-hot-topic-btn:hover {
  background: rgba(0,0,0,0.03);
}

.veil-hot-topic-btn .veil-hot-topic-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-body);
}

.veil-hot-topic-btn .veil-hot-topic-count {
  font-size: 10px;
  color: var(--text-subtle);
  background: rgba(255,107,107,0.1);
  padding: 2px 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
}

/* ===== USER OF THE MONTH ===== */
.veil-user-month {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid rgba(250,204,21,0.15);
  background: rgba(250,204,21,0.03);
}

.veil-user-month:hover {
  background: rgba(250,204,21,0.06);
}

.veil-user-month-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  border: 2px solid rgba(250,204,21,0.3);
}

.veil-user-month-info {
  flex: 1;
  min-width: 0;
}

.veil-user-month-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

.veil-user-month-stat {
  font-size: 10px;
  color: var(--text-muted);
}

.veil-user-month-badge {
  color: #facc15;
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.9;
}

/* User of the Month Card (v6.0) */
.veil-uom-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid rgba(250,204,21,0.15);
  background: rgba(250,204,21,0.03);
  animation: userMonthGlow 3s ease-in-out infinite;
  position: relative;
}

.veil-uom-card:hover {
  background: rgba(250,204,21,0.06);
}

.veil-uom-badge {
  color: #facc15;
  font-size: 12px;
  flex-shrink: 0;
}

.veil-uom-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  border: 2px solid rgba(250,204,21,0.3);
}

.veil-uom-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.veil-uom-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}

.veil-uom-sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* ===== SEE MORE BUTTON (Right Sidebar) ===== */
.veil-sug-see-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 0;
  margin-top: 4px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.veil-sug-see-more:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* ===== CHANGELOG FALLBACK PANEL ===== */
.veil-changelog-fallback {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  z-index: 1100;
  display: none;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}

.veil-changelog-fallback.active {
  display: flex;
}

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

.veil-changelog-fallback-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.veil-changelog-fallback-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  transition: color 0.15s;
}

.veil-changelog-fallback-close:hover {
  color: var(--text-main);
}

.veil-changelog-fallback-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.veil-changelog-fallback-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 13px;
}

.veil-changelog-fallback-item {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.veil-changelog-fallback-item:last-child {
  border-bottom: none;
}

.veil-changelog-fallback-version {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.veil-changelog-fallback-badge {
  font-size: 9px;
  background: var(--like-active, #ff4757);
  color: #fff;
  padding: 2px 6px;
  border-radius: 99px;
  font-weight: 700;
}

.veil-changelog-fallback-date {
  font-size: 11px;
  color: var(--text-subtle);
  margin: 4px 0 8px;
}

.veil-changelog-fallback-changes {
  list-style: none;
  padding: 0;
  margin: 0;
}

.veil-changelog-fallback-changes li {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 0 3px 14px;
  position: relative;
  line-height: 1.5;
}

.veil-changelog-fallback-changes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}


/* ===== NOTIFICATION MINI BAR (Improved) ===== */
.notification-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: rgba(17,17,17,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--spacing-md);
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.notification-bar.show {
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .notification-bar {
    left: var(--sidebar-left-width);
    right: var(--sidebar-right-width);
  }
}

.notification-bar-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  max-width: 600px;
  width: 100%;
}

.notification-bar-icon {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 11px;
  flex-shrink: 0;
}

.notification-bar-text {
  flex: 1;
  font-size: 12px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.notification-bar-text strong {
  color: #fff;
  font-weight: 700;
}

.notification-bar-time {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.notification-bar-close {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255,255,255,0.08);
  border-radius: 9999px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.notification-bar-close:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}


/* ===== HEADER (Mobile only — hidden on desktop) ===== */
#mainHeader {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.app-ready #mainHeader {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  padding: 0 max(var(--spacing-lg), env(safe-area-inset-left));
  background: rgba(0,0,0,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  transition: all var(--scroll-animation-duration) cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.header.scrolled-up {
  transform: translateY(0);
  opacity: 1;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-shrink: 0;
}

.header-left .brand {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.header-left .veil-app-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  transform: translateY(-1px);
}

.header-left .veil-wordmark {
  height: 24px;
  width: auto;
  display: block;
  opacity: 0.96;
}

/* VEIL brand icons */
.veil-app-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: none;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

.veil-wordmark {
  height: 22px;
  width: auto;
  display: block;
  opacity: 0.95;
}


/* ===== ENHANCED SEARCH ===== */
.search-wrapper {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: #fff;
  padding: 10px 40px 10px 40px;
  border-radius: 9999px;
  font-size: var(--font-size-small);
  font-family: var(--font-body);
  font-weight: 400;
  transition: all 0.25s ease;
  -webkit-appearance: none;
}

.search-input::placeholder {
  color: var(--text-subtle);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-subtle);
  font-size: 12px;
  pointer-events: none;
  transition: color 0.2s;
}

.search-input:focus ~ .search-icon {
  color: #fff;
}

.search-clear {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255,255,255,0.08);
  border-radius: 9999px;
  color: var(--text-muted);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.search-input:not(:placeholder-shown) ~ .search-clear {
  display: flex;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  max-height: 280px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.search-suggestions.show {
  display: block;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  cursor: pointer;
  transition: background 0.2s;
}

.search-suggestion-item:hover {
  background: rgba(255,255,255,0.04);
}

.search-suggestion-item:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.search-suggestion-item:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.search-suggestion-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.search-suggestion-info h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.search-suggestion-info p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

@media (max-width: 768px) {
  .search-wrapper { display: none; }
}


/* ===== HEADER ACTIONS ===== */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.btn-icon {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
  min-height: 38px;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: var(--border-strong);
  transform: scale(1.05);
}

.btn-icon.btn-nav-community.active {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-strong);
  color: #fff;
}

/* Headway Changelog Button */
.btn-changelog {
  position: relative;
}

.headway-trigger {
  position: relative;
}

/* Headway badge in sidebar — position top-right of the icon */
.headway-trigger #HW_badge_cont {
  position: absolute !important;
  top: 2px !important;
  right: 8px !important;
  left: auto !important;
  z-index: 10;
}

.headway-trigger #HW_badge {
  background: #ff4757;
  color: #fff;
  border: 2px solid var(--bg);
  min-width: 14px;
  height: 14px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  font-family: var(--font-mono);
  box-shadow: 0 2px 6px rgba(255,71,87,0.3);
  pointer-events: none;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: var(--font-size-small);
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 9999px;
  transition: all 0.2s;
  font-weight: 600;
  min-height: 38px;
}

.btn-text:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--notification-badge);
  color: #fff;
  font-size: 9px;
  min-width: 16px;
  height: 16px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid var(--bg);
  font-family: var(--font-mono);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xsmall);
  font-weight: 600;
  color: #fff;
  border: 2px solid var(--border-strong);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: all 0.2s;
}

.user-avatar:hover {
  border-color: #fff;
  transform: scale(1.05);
}

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


/* ===== DESKTOP NAV TABS ===== */
.desktop-nav-tabs {
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

@media (min-width: 769px) and (max-width: 1023px) {
  .desktop-nav-tabs {
    display: flex;
  }
}

.desktop-nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-body);
  white-space: nowrap;
}

.desktop-nav-tab:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.04);
}

.desktop-nav-tab.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: var(--border-strong);
}

.desktop-nav-tab i {
  font-size: 13px;
}


/* ===== LIKE BUTTON ===== */
.like-button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  font-weight: 600;
}

.like-button:hover {
  border-color: var(--like-color);
  color: var(--like-color);
  background: rgba(255,107,107,0.08);
}

.like-button.liked {
  background: rgba(255,71,87,0.12);
  border-color: var(--like-active);
  color: var(--like-active);
}

.like-button.liked i {
  animation: likePop 0.35s ease;
}


/* ===== BOTTOM NAVIGATION (MOBILE) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(10,10,10,0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: none;
  justify-content: space-around;
  align-items: center;
  padding: var(--spacing-sm) max(var(--spacing-md), env(safe-area-inset-left));
  padding-bottom: max(var(--spacing-sm), env(safe-area-inset-bottom));
  z-index: 100;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 18px;
  transition: all 0.2s;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-item span {
  font-size: 9px;
  font-weight: 600;
}

.nav-item.active {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.nav-item.add {
  background: #fff;
  color: #000;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(255,255,255,0.12);
}

.nav-item.add span {
  display: none;
}


/* ===== APP CONTAINER ===== */
.app-container {
  display: none;
}

.app-container.visible {
  display: block;
}


/* ===== FILTER SECTION ===== */
.filter-section {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 90;
  padding: var(--spacing-sm) max(var(--spacing-lg), env(safe-area-inset-left));
  background: rgba(0,0,0,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--scroll-animation-duration) cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-section.scrolled {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.filter-section.scrolled-up {
  transform: translateY(0);
  opacity: 1;
}

.filter-chips {
  display: flex;
  gap: var(--spacing-sm);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
  min-height: 36px;
}

.chip:hover {
  border-color: var(--border-strong);
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.chip.active {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255,255,255,0.12);
}


/* ===== FORM INPUTS ===== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  display: block;
  font-weight: 600;
}

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: #fff;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 400;
  transition: all 0.25s;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: #fff;
  outline: none;
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

.btn-primary {
  width: 100%;
  background: #fff;
  color: #000;
  border: none;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  font-size: var(--font-size-base);
  border-radius: 10px;
  font-family: var(--font-body);
  transition: all 0.25s;
  margin-top: var(--spacing-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,255,255,0.15);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}


/* ===== MODAL BASE ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  padding: var(--spacing-md);
  transition: opacity 0.25s ease;
}

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


/* ===== LIGHTBOX ===== */
.lightbox-content {
  display: flex;
  width: 95vw;
  max-width: 1100px;
  height: 85vh;
  max-height: 720px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

@media (max-width: 768px) {
  .lightbox-content {
    flex-direction: column;
    height: 92vh;
    max-height: none;
    border-radius: var(--radius-lg);
  }

  .lb-sidebar {
    flex: 0 0 auto;
    max-height: 50vh;
    min-height: 260px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .comments-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 160px;
  }

  .comments-list {
    flex: 1;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: var(--spacing-sm);
  }
}

.lb-image-area {
  flex: 1.5;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.lb-image-area img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s;
  z-index: 10;
}

.lb-close:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.05);
}

.lb-sidebar {
  flex: 1;
  min-width: 300px;
  max-width: 380px;
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--bg-card);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .lb-sidebar {
    min-width: unset;
    max-width: unset;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: var(--spacing-md);
  }
}

.lb-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.lb-author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  cursor: pointer;
}

@media (max-width: 768px) {
  .lb-author-avatar {
    width: 38px;
    height: 38px;
  }
}

.lb-author-info {
  flex: 1;
}

.lb-author-name {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  display: flex;
  align-items: center;
}

.lb-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.lb-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-large);
  margin-bottom: 6px;
  color: #fff;
}

@media (max-width: 768px) {
  .lb-title {
    font-size: var(--font-size-base);
  }
}

.lb-desc {
  color: var(--text-muted);
  font-size: var(--font-size-base);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

@media (max-width: 768px) {
  .lb-desc {
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-sm);
  }
}

.lb-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}


/* ===== COMMENTS SECTION ===== */
.comments-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.comments-header {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border);
}

.reply-badge {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 9999px;
  font-size: 11px;
  color: var(--text-main);
  margin-bottom: var(--spacing-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.reply-badge:hover {
  background: rgba(255,255,255,0.08);
}

[data-theme="light"] .reply-badge:hover {
  background: rgba(0,0,0,0.06);
}

.reply-badge.visible {
  display: flex;
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: var(--spacing-sm);
}

.comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

[data-theme="light"] .comment-item {
  border-bottom-color: rgba(0,0,0,0.06);
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #333, #555);
  background-size: cover;
  background-position: center;
  margin-top: 2px;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-author {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-main);
  display: inline;
  margin-right: 4px;
}

.comment-text {
  font-size: 12px;
  color: var(--text-muted);
  display: inline;
  word-break: break-word;
  line-height: 1.5;
}

.comment-time {
  font-size: 10px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.comment-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  align-items: center;
}

.reply-btn {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: color 0.15s, background 0.15s;
  font-family: var(--font-body);
}

.reply-btn:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.04);
}

[data-theme="light"] .reply-btn:hover {
  background: rgba(0,0,0,0.04);
}

.reply-btn i {
  font-size: 9px;
}

.comment-action-btn {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 10px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
  font-family: var(--font-body);
}

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

.report-btn:hover {
  color: var(--like-color);
}

.block-btn:hover {
  color: #f59e0b;
}

.comment.is-reply {
  margin-left: 36px;
  padding: 8px 0;
}

.comment.is-reply .comment-avatar {
  width: 26px;
  height: 26px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.comment-input-section {
  display: flex;
  gap: 8px;
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.comment-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.comment-input:focus {
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.06);
}

[data-theme="light"] .comment-input:focus {
  background: rgba(0,0,0,0.03);
}

.comment-input::placeholder {
  color: var(--text-subtle);
}

.comment-submit {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  flex-shrink: 0;
  font-size: 13px;
}

.comment-submit:hover {
  transform: scale(1.06);
  opacity: 0.9;
}


/* ===== MOBILE COMMENTS MODAL ===== */
.comments-modal-content {
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

@media (min-width: 768px) {
  .comments-modal-content {
    border-radius: 20px;
    position: relative;
    bottom: auto;
  }
}

.comments-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

.comments-modal-title {
  font-weight: 700;
  font-size: 13px;
}

.comments-modal-close {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.05);
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.comments-modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.comments-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
}


/* ===== HAMBURGER MENU ===== */
.veil-hamburger {
  display: none;
}

@media (max-width: 768px) {
  .veil-hamburger {
    display: flex;
  }
}

.veil-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transition: all 0.2s ease;
  z-index: 200;
}

.veil-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.veil-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
}

.veil-menu-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.veil-menu-item i {
  width: 16px;
  text-align: center;
}


/* ===== PROFILE MODAL ===== */
.profile-modal-content {
  width: 95vw;
  max-width: 480px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Desktop: slide-in panel instead of modal */
@media (min-width: 1024px) {
  #profileModal {
    /* Make the overlay transparent so only the panel shows */
    background: rgba(0,0,0,0.5);
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
  }
  
  .profile-modal-content {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    max-width: 480px;
    width: 480px;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border-right: none;
    border-left: 1px solid var(--border);
    animation: slideInRight 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
  }
  @keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
}

.profile-header-section {
  position: relative;
  padding: 0;
}

.profile-cover {
  height: 120px;
  background: linear-gradient(135deg, #222 0%, #333 50%, #444 100%);
  position: relative;
}

@media (max-width: 768px) {
  .profile-cover { height: 100px; }
}

.profile-avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 9999px;
  border: 4px solid var(--bg-card);
  position: absolute;
  bottom: -48px;
  left: var(--spacing-lg);
  background-size: cover;
  background-position: center;
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .profile-avatar-large {
    width: 84px;
    height: 84px;
    bottom: -42px;
    left: var(--spacing-md);
  }
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
}

.profile-actions-top {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}

.profile-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s;
}

.profile-action-btn:hover {
  background: rgba(0,0,0,0.7);
  transform: scale(1.05);
}

.profile-info-section {
  padding: 52px var(--spacing-lg) var(--spacing-lg);
}

@media (max-width: 768px) {
  .profile-info-section {
    padding: 44px var(--spacing-md) var(--spacing-md);
  }
}

.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.profile-name {
  font-family: var(--font-heading);
  font-size: var(--font-size-xlarge);
  margin: 0;
  display: flex;
  align-items: center;
}

.profile-handle {
  color: var(--text-muted);
  font-size: var(--font-size-small);
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
}

.profile-bio {
  color: var(--text-main);
  font-size: var(--font-size-base);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: var(--font-size-small);
  font-weight: 500;
}

.profile-meta-item i {
  font-size: 12px;
  color: var(--text-subtle);
}

.profile-meta-item a {
  color: #fff;
}

.profile-stats-row {
  display: flex;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

@media (max-width: 768px) {
  .profile-stats-row {
    gap: var(--spacing-md);
    flex-wrap: wrap;
  }
}

.profile-stat {
  cursor: pointer;
  transition: opacity 0.2s;
}

.profile-stat:hover {
  opacity: 0.8;
}

.profile-stat-value {
  font-family: var(--font-mono);
  font-size: var(--font-size-large);
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

.profile-stat-label {
  font-size: var(--font-size-xsmall);
  color: var(--text-muted);
  font-weight: 500;
}

.profile-follow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-small);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
}

.profile-follow-btn.follow {
  background: #fff;
  color: #000;
  border: none;
}

.profile-follow-btn.follow:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,255,255,0.2);
}

.profile-follow-btn.following {
  background: transparent;
  color: var(--following-color);
  border: 1px solid var(--following-color);
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.profile-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: var(--font-body);
}

.profile-tab:hover {
  color: var(--text-main);
}

.profile-tab.active {
  color: #fff;
  border-bottom-color: #fff;
}

.profile-content {
  padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
}

.profile-art-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.profile-art-item {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.profile-art-item:hover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
}

.profile-art-likes {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 9px;
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.15s;
}

.profile-art-item:hover .profile-art-likes {
  opacity: 1;
}

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

.empty-state i {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
  opacity: 0.5;
}

.empty-state p {
  font-size: var(--font-size-small);
}


/* ===== EDIT PROFILE MODAL ===== */
.edit-profile-modal {
  width: 95vw;
  max-width: 480px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.edit-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

.edit-profile-header h3 {
  font-size: var(--font-size-large);
}

.edit-profile-content {
  padding: var(--spacing-lg);
}

.avatar-upload-section {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.avatar-upload-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 8px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 3px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background-color: #333;
  overflow: hidden;
}

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

.avatar-upload-btn {
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
}

.edit-profile-footer {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--border);
}

.edit-profile-footer .btn-primary {
  flex: 1;
}

.btn-cancel {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 12px;
  font-weight: 600;
  font-size: var(--font-size-small);
  border-radius: 10px;
  font-family: var(--font-body);
  transition: all 0.15s;
  cursor: pointer;
}

.btn-cancel:hover {
  background: rgba(255,255,255,0.04);
}


/* ===== SETTINGS MODAL ===== */
.settings-modal {
  width: 95vw;
  max-width: 480px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow-y: auto;
  padding: var(--spacing-lg);
}

.settings-modal h3 {
  font-size: var(--font-size-large);
  margin-bottom: var(--spacing-lg);
}

.settings-group {
  margin-bottom: var(--spacing-lg);
}

.settings-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-md);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.setting-label h4 {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: 2px;
}

.setting-label p {
  font-size: 11px;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 11px;
  transition: 0.2s;
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #fff;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: #000;
}

.settings-footer {
  margin-top: var(--spacing-xl);
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-subtle);
}

.settings-footer-brand {
  font-weight: 600;
  color: var(--text-muted);
}

.settings-footer-brand span {
  font-weight: 400;
  color: var(--text-subtle);
}


/* ===== NOTIFICATION MODAL ===== */
.notification-modal {
  width: 95vw;
  max-width: 480px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notification-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

.notification-modal-header h3 {
  font-size: var(--font-size-large);
}

.notification-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-sm) 0;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.notification-item:hover {
  background: rgba(255,255,255,0.03);
}

.notification-item.unread {
  background: rgba(255,255,255,0.02);
}

.notification-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

.notification-icon.like {
  background: rgba(255,71,87,0.12);
  color: var(--like-active);
}

.notification-icon.comment {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.notification-icon.follow {
  background: rgba(16,185,129,0.12);
  color: var(--following-color);
}

.notification-icon.thread_reply {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.notification-icon.new_art {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.notification-icon.new_thread {
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.notification-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.notification-time {
  font-size: 10px;
  color: var(--text-subtle);
  margin-top: 3px;
  font-family: var(--font-mono);
}

.notification-actions-bar {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-top: 1px solid var(--border);
  justify-content: center;
}


/* ===== SUBMIT MODAL (Polished Create Post) ===== */
.submit-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-height: 90vh;
  overflow-y: auto;
  width: 90%;
  max-width: 480px;
  animation: modalIn 0.2s ease;
}
.submit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.submit-modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}
.submit-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: all 0.15s;
  background: none;
  border: none;
  cursor: pointer;
}
.submit-modal-close:hover { background: rgba(255,255,255,0.06); color: #fff; }

.veil-artwork-fields { padding: 0 16px 16px; }
.veil-thread-fields { padding: 0 16px 16px; }

.thread-composer-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.thread-composer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background-color: #333;
}
.thread-composer-inputs {
  flex: 1;
  min-width: 0;
}
.thread-title-input,
.thread-content-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  resize: none;
  outline: none;
  padding: 4px 0;
  line-height: 1.5;
}
.thread-title-input {
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  padding-bottom: 8px;
}
.thread-title-input::placeholder { color: var(--text-main); font-weight: 600; }
.thread-content-input::placeholder { color: var(--text-subtle); }
.thread-content-input { min-height: 60px; }

.submit-post-btn {
  margin: 0 16px 16px;
  width: calc(100% - 32px);
  border-radius: 10px;
}

.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: var(--spacing-md);
}

.file-upload-area:hover {
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.02);
}

.file-upload-area i {
  font-size: 24px;
  color: var(--text-subtle);
  margin-bottom: 6px;
}

.file-upload-area p {
  font-size: 12px;
  color: var(--text-muted);
}


/* ===== THREAD MODAL ===== */
.new-thread-modal {
  width: 95vw;
  max-width: 520px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.new-thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

.new-thread-header h3 {
  font-size: var(--font-size-large);
}

.thread-detail-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.thread-detail-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.thread-detail-more {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}

.thread-detail-more:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
}

.thread-detail-modal {
  width: 95vw;
  max-width: 600px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

[data-theme="light"] .thread-detail-modal {
  box-shadow: 0 24px 80px rgba(0,0,0,0.15);
}

/* Thread detail header — clean & minimal */
.thread-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.thread-detail-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

/* Thread OP (original post) — Threads-inspired avatar column + content */
.thread-op-header {
  display: flex;
  gap: 0;
}

.thread-op-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
  margin-right: 12px;
  flex-shrink: 0;
}

.thread-op-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.thread-op-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
}

.thread-op-line {
  width: 2px;
  flex: 1;
  min-height: 12px;
  background: var(--border);
  border-radius: 1px;
  margin-top: 8px;
}

.thread-op-main {
  flex: 1;
  min-width: 0;
}

.thread-op-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.thread-op-info {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}

.thread-op-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.thread-op-handle {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.thread-op-dot {
  color: var(--text-subtle);
  font-size: 12px;
}

.thread-op-time {
  font-size: 12px;
  color: var(--text-subtle);
  white-space: nowrap;
}

.thread-op-body {
  padding: 4px 0 8px;
}

.thread-op-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.4;
}

.thread-op-body #thread-content {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Thread action buttons — matching feed card style */
.thread-op-actions {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 0;
  margin-top: 4px;
  border-top: none;
}

.thread-op-action {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 8px 12px 8px 0;
  transition: color 0.2s, transform 0.15s;
  font-weight: 500;
}

.thread-op-action:hover {
  color: var(--text-main);
}

.thread-op-action:active {
  transform: scale(0.92);
}

.thread-op-action.liked {
  color: var(--like-active);
}

.thread-op-action.liked i {
  animation: likePop 0.35s ease;
}

.thread-op-action-count {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.thread-op-action-spacer {
  flex: 1;
}

/* Replies section */
.thread-replies {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.thread-replies-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ===== 3-DOT MORE MENU ===== */
.veil-more-menu {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.veil-more-menu.active {
  display: flex;
  animation: veilFadeIn 0.15s ease;
}

.veil-more-menu-content {
  width: 260px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  padding: 6px;
}

.veil-more-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font-body);
  text-align: left;
}

.veil-more-menu-item:hover {
  background: rgba(255,255,255,0.06);
}

[data-theme="light"] .veil-more-menu-item:hover {
  background: rgba(0,0,0,0.04);
}

.veil-more-menu-item i {
  width: 20px;
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
}

.veil-more-menu-item-danger {
  color: var(--like-active, #ff4757);
}

.veil-more-menu-item-danger i {
  color: var(--like-active, #ff4757);
}

/* Reply composer at bottom */
.thread-detail-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.thread-reply-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 10px 16px;
  color: var(--text-main);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.thread-reply-input:focus {
  border-color: var(--border-strong);
}

.thread-reply-input::placeholder {
  color: var(--text-subtle);
}

.thread-reply-submit {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.thread-reply-submit:hover {
  transform: scale(1.08);
}

/* Individual reply */
.thread-reply {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.thread-reply-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.thread-reply-content {
  flex: 1;
  min-width: 0;
}

.thread-reply-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.thread-reply-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.thread-reply-time {
  font-size: 11px;
  color: var(--text-subtle);
}

.thread-reply-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}


/* ===== FOLLOW LIST MODAL ===== */
.follow-list-modal {
  width: 95vw;
  max-width: 420px;
  max-height: 80vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.follow-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

.follow-list-header h3 {
  font-size: var(--font-size-base);
}

.follow-list-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-sm) 0;
}

.follow-list-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  cursor: pointer;
  transition: background 0.15s;
}

.follow-list-item:hover {
  background: rgba(255,255,255,0.03);
}

.follow-list-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.follow-list-info {
  flex: 1;
  min-width: 0;
}

.follow-list-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.follow-list-handle {
  font-size: 12px;
  color: var(--text-muted);
}


/* ===== TOAST ===== */
#toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--spacing-lg));
  left: 50%;
  transform: translateX(-50%);
  background: var(--toast-bg);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  z-index: 10000;
  display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  white-space: nowrap;
  font-family: var(--font-body);
}

@media (min-width: 1024px) {
  #toast-container {
    left: 50%;
    transform: translateX(-50%);
  }
}


/* ===== MOBILE SEARCH OVERLAY ===== */
.mobile-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  display: none;
  flex-direction: column;
}

.mobile-search-overlay.active {
  display: flex;
}

.mobile-search-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border);
}

.mobile-search-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: #fff;
  padding: 10px 14px;
  border-radius: 9999px;
  font-size: var(--font-size-base);
  font-family: var(--font-body);
  outline: none;
}

.mobile-search-input:focus {
  border-color: var(--border-strong);
}

.mobile-search-cancel {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-search-results {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
}

/* ===== LIGHT MODE OVERRIDES ===== */
[data-theme="light"] .header {
  background: rgba(255,255,255,0.94);
}

[data-theme="light"] .bottom-nav {
  background: rgba(255,255,255,0.96);
}

[data-theme="light"] .notification-bar {
  background: rgba(240,240,240,0.95);
}

[data-theme="light"] .notification-bar-icon {
  background: var(--accent);
  color: var(--bg);
}

[data-theme="light"] .notification-bar-text strong {
  color: var(--text-main);
}

[data-theme="light"] .notification-bar-close:hover {
  background: rgba(0,0,0,0.1);
  color: var(--text-main);
}

[data-theme="light"] .search-input {
  color: var(--text-main);
  background: rgba(0,0,0,0.04);
  border-color: var(--border);
}

[data-theme="light"] .search-input:focus {
  background: rgba(0,0,0,0.06);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

[data-theme="light"] .search-input:focus ~ .search-icon {
  color: var(--text-main);
}

[data-theme="light"] .search-clear {
  background: rgba(0,0,0,0.08);
}

[data-theme="light"] .btn-icon:hover {
  color: var(--text-main);
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .btn-text:hover {
  color: var(--text-main);
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .nav-item.active {
  color: var(--accent);
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .desktop-nav-tab.active {
  color: var(--accent);
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .desktop-nav-tab:hover {
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .veil-sidebar-user:hover {
  background: rgba(0,0,0,0.05);
}

[data-theme="light"] .veil-sidebar-nav-item:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-main);
}

[data-theme="light"] .veil-sidebar-logout:hover {
  background: rgba(255,71,87,0.08);
}

[data-theme="light"] .veil-right-search-box {
  background: rgba(0,0,0,0.03);
}

[data-theme="light"] .veil-right-search-box:focus-within {
  background: rgba(0,0,0,0.05);
}

[data-theme="light"] .veil-trending-item:hover {
  background: rgba(0,0,0,0.03);
}

[data-theme="light"] .chip:hover {
  color: var(--text-main);
  background: rgba(0,0,0,0.05);
}

[data-theme="light"] .chip.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

[data-theme="light"] .form-input {
  color: var(--text-main);
}

[data-theme="light"] .form-input:focus {
  border-color: var(--accent);
  background: rgba(0,0,0,0.03);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

[data-theme="light"] .btn-primary {
  background: var(--accent);
  color: var(--bg);
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

[data-theme="light"] .comment-input {
  color: var(--text-main);
  background: rgba(0,0,00,0.03);
}

[data-theme="light"] .comment-submit {
  background: var(--accent);
  color: var(--bg);
}

[data-theme="light"] .like-button.liked {
  background: rgba(255,71,87,0.1);
}

[data-theme="light"] .veil-sug-follow {
  background: var(--accent);
  color: var(--bg);
}

[data-theme="light"] .veil-sug-follow:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

[data-theme="light"] .nav-item.add {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== HEADWAY SIDEBAR BADGE ===== */
.veil-sidebar-nav-item.headway-trigger {
  position: relative;
}

.veil-sidebar-nav-item.headway-trigger #HW_badge_cont {
  position: absolute !important;
  top: 4px !important;
  left: 28px !important;
}

.veil-sidebar-nav-item.headway-trigger #HW_badge {
  background: var(--accent) !important;
  color: var(--bg) !important;
  border: 2px solid var(--bg) !important;
  min-width: 14px !important;
  height: 14px !important;
  border-radius: 9999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 8px !important;
  font-weight: 800 !important;
  font-family: var(--font-mono) !important;
  pointer-events: none !important;
}

/* Live dot animation */
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 6px;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Live stat updating animation */
.live-stat-value.updating {
  animation: statPulse 0.4s ease;
}

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

/* ===== COMPREHENSIVE LIGHT MODE OVERRIDES ===== */
[data-theme="light"] .veil-sidebar-nav-item:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-main);
}
[data-theme="light"] .veil-sidebar-user:hover {
  background: rgba(0,0,0,0.05);
}
[data-theme="light"] .veil-sidebar-logout:hover {
  background: rgba(255,71,87,0.06);
}
[data-theme="light"] .notification-bar {
  background: rgba(255,255,255,0.95);
}
[data-theme="light"] .notification-bar-text strong {
  color: var(--text-main);
}
[data-theme="light"] .notification-bar-close:hover {
  color: var(--text-main);
  background: rgba(0,0,0,0.08);
}
[data-theme="light"] .header {
  background: rgba(255,255,255,0.94);
}
[data-theme="light"] .search-input {
  color: var(--text-main);
  background: rgba(0,0,0,0.03);
  border-color: var(--border);
}
[data-theme="light"] .search-input:focus {
  background: rgba(0,0,0,0.05);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}
[data-theme="light"] .search-input:focus ~ .search-icon {
  color: var(--text-main);
}
[data-theme="light"] .search-clear {
  background: rgba(0,0,0,0.06);
}
[data-theme="light"] .btn-icon:hover {
  color: var(--text-main);
}
[data-theme="light"] .btn-text:hover {
  color: var(--text-main);
  background: rgba(0,0,0,0.05);
}
[data-theme="light"] .desktop-nav-tab:hover {
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .desktop-nav-tab.active {
  color: var(--text-main);
  background: rgba(0,0,0,0.06);
}
[data-theme="light"] .nav-item.active {
  color: var(--text-main);
  background: rgba(0,0,0,0.05);
}
[data-theme="light"] .chip:hover {
  color: var(--text-main);
  background: rgba(0,0,0,0.05);
}
[data-theme="light"] .chip.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
[data-theme="light"] .form-input {
  color: var(--text-main);
}
[data-theme="light"] .form-input:focus {
  border-color: var(--accent);
  background: rgba(0,0,0,0.02);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}
[data-theme="light"] .btn-primary {
  background: var(--accent);
  color: var(--bg);
}
[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
[data-theme="light"] .modal {
  background: rgba(0,0,0,0.5);
}
[data-theme="light"] .lb-author-name {
  color: var(--text-main);
}
[data-theme="light"] .lb-title {
  color: var(--text-main);
}
[data-theme="light"] .reply-badge {
  background: rgba(0,0,0,0.06);
  color: var(--text-main);
}
[data-theme="light"] .comment-item {
  border-bottom-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .comment-input {
  color: var(--text-main);
  background: rgba(0,0,0,0.03);
}
[data-theme="light"] .comment-submit {
  background: var(--accent);
  color: var(--bg);
}
[data-theme="light"] .comments-modal-close:hover {
  color: var(--text-main);
}
[data-theme="light"] .veil-menu-item:hover {
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .veil-sug-follow {
  background: var(--accent);
  color: var(--bg);
}
[data-theme="light"] .veil-sug-follow:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
[data-theme="light"] .btn-icon.btn-nav-community.active {
  background: rgba(0,0,0,0.06);
  color: var(--text-main);
}
[data-theme="light"] .live-stat-value.updating {
  color: var(--text-main);
}
[data-theme="light"] .search-suggestion-item:hover {
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .user-avatar {
  border-color: var(--border-strong);
}
[data-theme="light"] .user-avatar:hover {
  border-color: var(--text-main);
}
[data-theme="light"] .bottom-nav {
  background: rgba(255,255,255,0.96);
}
[data-theme="light"] .nav-item.add {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
[data-theme="light"] .veil-right-search-box {
  background: rgba(0,0,0,0.03);
}
[data-theme="light"] .veil-right-search-box:focus-within {
  background: rgba(0,0,0,0.05);
}
[data-theme="light"] .veil-trending-item:hover {
  background: rgba(0,0,0,0.03);
}
[data-theme="light"] .filter-section {
  background: rgba(255,255,255,0.96);
}
[data-theme="light"] .notification-bar-icon {
  background: var(--accent);
  color: var(--bg);
}
[data-theme="light"] .notification-bar-close {
  background: rgba(0,0,0,0.06);
}

/* ===== IMPROVED COMMENT SECTION STYLING ===== */
.comment {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.comment.is-reply {
  margin-left: 28px;
  padding-top: 8px;
  border-bottom-color: rgba(255,255,255,0.03);
}
[data-theme="light"] .comment.is-reply {
  border-bottom-color: rgba(0,0,0,0.04);
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.comment-header .comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #333, #555);
  background-size: cover;
  background-position: center;
}
.comment-header .comment-author {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
}
.comment-header .comment-time {
  font-size: 10px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  margin-left: auto;
  flex-shrink: 0;
}
.comment-text {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-word;
  line-height: 1.5;
  margin-top: 2px;
}
.comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.comment-action-btn {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 10px;
  cursor: pointer;
  padding: 2px 0;
  font-family: var(--font-body);
  transition: color 0.15s;
}
.comment-action-btn:hover {
  color: var(--text-main);
}
.reply-btn:hover {
  color: var(--accent);
}
.report-btn:hover {
  color: var(--like-active);
}
.block-btn:hover {
  color: var(--notification-badge);
}


/* ===== THREAD CARDS IN UNIFIED FEED (Instagram Threads style) ===== */

/* Main thread card — full width, no rounded borders in feed */
.veil-thread-feed-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  transition: background 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.veil-thread-feed-card:hover {
  background: rgba(255,255,255,0.02);
}

[data-theme="light"] .veil-thread-feed-card:hover {
  background: rgba(0,0,0,0.015);
}

/* Avatar column — avatar + connecting line for reply thread effect */
.veil-thread-feed-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  width: 40px;
}

.veil-thread-feed-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}

.veil-thread-feed-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.3);
}

/* Connecting line below avatar (Threads-style) */
.veil-thread-feed-line {
  width: 2px;
  flex: 1;
  min-height: 16px;
  background: var(--border);
  margin-top: 6px;
  border-radius: 1px;
}

/* Main content area */
.veil-thread-feed-main {
  flex: 1;
  min-width: 0;
}

/* Header row: name · handle · time */
.veil-thread-feed-header {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  line-height: 1.4;
}

.veil-thread-feed-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: text-decoration 0.15s;
}

.veil-thread-feed-name:hover {
  text-decoration: underline;
}

.veil-thread-feed-handle {
  font-size: 13px;
  color: var(--text-muted);
}

.veil-thread-feed-dot {
  font-size: 13px;
  color: var(--text-subtle);
  margin: 0 1px;
}

.veil-thread-feed-time {
  font-size: 13px;
  color: var(--text-subtle);
}

.veil-thread-feed-more {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 14px;
  flex-shrink: 0;
}

.veil-thread-feed-more:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
}

/* Thread body content */
.veil-thread-feed-body {
  cursor: pointer;
  padding-bottom: 8px;
}

.veil-thread-feed-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.4;
}

.veil-thread-feed-text {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Action buttons row */
.veil-thread-feed-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.veil-thread-feed-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 9999px;
  transition: all 0.15s;
  font-family: var(--font-body);
  min-width: 32px;
}

.veil-thread-feed-action:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
}

[data-theme="light"] .veil-thread-feed-action:hover {
  background: rgba(0,0,0,0.04);
}

.veil-thread-feed-action.liked {
  color: var(--like-active, #ff4757);
}

.veil-thread-feed-action.liked:hover {
  background: rgba(255,71,87,0.08);
}

.veil-thread-feed-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.veil-thread-feed-action.liked .veil-thread-feed-count {
  color: var(--like-active, #ff4757);
}

/* ===== Post Type Toggle (Thread vs Artwork) ===== */
.veil-post-type-toggle {
  display: flex;
  gap: 0;
  margin: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3px;
}

.veil-post-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.veil-post-type-btn i {
  font-size: 14px;
}

.veil-post-type-btn:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.04);
}

.veil-post-type-btn.active {
  background: #fff;
  color: #000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

[data-theme="light"] .veil-post-type-toggle {
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .veil-post-type-btn.active {
  background: #000;
  color: #fff;
}

[data-theme="light"] .veil-post-type-btn:not(.active):hover {
  background: rgba(0,0,0,0.06);
}
