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


/* ===== EXPLORE / FOR YOU VIEW ===== */
.explore-view {
  padding: 20px 0 100px;
  max-width: 600px;
  margin: 0 auto;
}

.explore-header {
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.explore-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.explore-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.explore-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.explore-tab {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

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

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

.explore-tab-content {
  display: none;
}

.explore-tab-content.active {
  display: block;
}

.explore-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.explore-section-header {
  padding: 0 20px 12px;
}

.explore-section-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.explore-trending-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0 16px;
}

.explore-trending-item {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

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

.explore-threads-list {
  /* Thread items in explore */
}

.explore-users-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 0;
}

.explore-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.explore-user-card:hover {
  background: rgba(255,255,255,0.02);
}

.explore-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #555);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

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

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

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

.explore-user-bio {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.explore-user-art-count {
  font-size: 11px;
  color: var(--text-subtle);
  margin-top: 2px;
}

.explore-user-follow-btn {
  padding: 6px 14px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
  flex-shrink: 0;
}

.explore-user-follow-btn:hover {
  transform: scale(1.03);
}

.explore-user-follow-btn.following {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}


/* ===== COMPOSE BAR (Feed Top) ===== */
.compose-bar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s;
  max-width: 600px;
  margin: 0 auto;
}
.compose-bar:hover { background: rgba(255,255,255,0.02); }
.compose-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  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;
  background-color: #333;
}
.compose-placeholder {
  flex: 1;
  color: var(--text-subtle);
  font-size: var(--font-size-base);
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  transition: border-color 0.15s;
}
.compose-bar:hover .compose-placeholder { border-color: var(--border-strong); }
.compose-actions { display: flex; gap: 4px; }
.compose-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 15px;
  transition: all 0.15s;
}
.compose-action-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--link-color);
}

@media (max-width: 768px) {
  .compose-bar {
    padding: 12px var(--spacing-md);
    max-width: none;
  }
}

/* ===== TOPIC FILTER CHIPS BAR ===== */
.veil-topics-bar {
  padding: 12px 0 4px;
  max-width: 600px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .veil-topics-bar {
    padding-top: 16px;
  }
}

@media (max-width: 768px) {
  .veil-topics-bar {
    padding: 72px var(--spacing-md) 4px;
    max-width: none;
  }
}

.veil-topics-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.veil-topics-scroll::-webkit-scrollbar { display: none; }

.veil-topic-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
  min-height: 34px;
  font-family: var(--font-body);
}

.veil-topic-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
  background: var(--bg-surface-2);
}

.veil-topic-chip.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 700;
}


/* ===== TRENDING SECTION ===== */
.trending-section {
  padding: 20px 0 var(--spacing-lg);
  max-width: none;
  width: 100%;
  margin: 0 auto;
}

/* Hide trending section on desktop — it's in the right sidebar */
@media (min-width: 1024px) {
  .trending-section {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .trending-section {
    padding: 80px var(--spacing-md) var(--spacing-lg);
  }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
  gap: 16px;
}

.section-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.section-title i {
  color: var(--like-color);
  font-size: var(--font-size-base);
}

.trending-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.trending-scroll::-webkit-scrollbar { display: none; }

.trending-card {
  min-width: 160px;
  max-width: 160px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.25s ease;
}

@media (min-width: 1024px) {
  .trending-card {
    width: clamp(180px, 16vw, 260px) !important;
    min-width: unset;
    max-width: unset;
  }
}

@media (max-width: 768px) {
  .trending-card {
    min-width: 140px;
    max-width: 140px;
    width: 70vw !important;
    max-width: 300px !important;
  }
}

.trending-card:hover {
  transform: translateY(-4px);
}

.trending-card-inner {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--veil-border);
  transition: border-color 0.22s ease, background 0.22s ease;
}

.trending-card:hover .trending-card-inner {
  border-color: var(--veil-border-2);
  background: var(--bg-surface-2);
}

.trending-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

@media (max-width: 768px) {
  .trending-card img {
    height: 160px;
  }
}

.trending-card:hover img {
  transform: scale(1.04);
}

.trending-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.trending-likes {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-family: var(--font-mono);
}

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

.trending-meta {
  padding: 10px 12px;
}

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

.trending-meta p {
  margin: 3px 0 0;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}


/* ===== GALLERY - CENTER COLUMN (Doomscroll) ===== */
.container {
  padding: var(--spacing-lg) 0 100px;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  min-height: 60vh;
}

@media (max-width: 768px) {
  .container {
    padding: var(--spacing-md) var(--spacing-md) calc(var(--bottom-nav-height) + var(--spacing-lg));
    max-width: none;
  }
}

.gallery-title {
  display: none;
}


/* ===== DESKTOP: THREE-COLUMN LAYOUT (Threads doomscroll) ===== */
@media (min-width: 1024px) {
  .trending-section,
  .suggested-section,
  .container,
  #communityView,
  #exploreView {
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Hide trending section on desktop — it's now in the right sidebar */
  .trending-section {
    display: none !important;
  }

  #communityView {
    padding: 20px 0 120px !important;
  }

  #exploreView {
    padding: 20px 0 120px !important;
  }

  .fancy-footer {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Gallery: single-column doomscroll */
  .gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .gallery .art-piece {
    width: 100%;
    break-inside: avoid;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid var(--border);
  }

  /* Thread feed cards — full-width, no margin/padding from gallery */
  .gallery .veil-thread-feed-card {
    width: 100%;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }
}

@media (min-width: 1400px) {
  .gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
}


/* ===== GALLERY - MOBILE ===== */
@media (max-width: 768px) {
  .gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .gallery .art-piece {
    width: 100%;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
  }

  .gallery .art-piece img {
    aspect-ratio: 1;
  }

  .gallery .veil-thread-feed-card {
    width: 100%;
    border-left: none;
    border-right: none;
    border-top: none;
  }
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (min-width: 769px) and (max-width: 1023px) {
  .gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .gallery .art-piece {
    width: 100%;
    margin: 0;
  }

  .container {
    max-width: 1200px;
  }

  .trending-section,
  .suggested-section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
  }
}


/* ===== GALLERY INLINE SECTIONS ===== */
.gallery-inline-suggested {
  padding: 16px 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}

.gallery-inline-cta {
  padding: var(--spacing-xl) 0 0;
  margin-top: var(--spacing-lg);
}

@media (max-width: 768px) {
  .gallery-inline-suggested {
    padding: var(--spacing-md) 0;
  }
  .gallery-inline-cta {
    padding: var(--spacing-md) 0;
  }
}

@media (min-width: 769px) {
  .gallery-inline-suggested {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
  }
  .gallery-inline-cta {
    padding: 32px 0 0;
    border-top: 1px solid var(--border);
    margin-top: 32px;
  }
}


/* ===== YOU'RE ALL CAUGHT UP ===== */
.caught-up-section {
  display: none;
  text-align: center;
  padding: 40px 20px 20px;
  max-width: 600px;
  margin: 0 auto;
}

/* The caught-up section is now controlled by JS only —
   it shows after gallery loads with items, hidden otherwise */

.caught-up-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.caught-up-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.caught-up-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.caught-up-badge i {
  color: #fff;
  font-size: 14px;
}

.caught-up-text {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.caught-up-sub {
  font-size: 11px;
  color: var(--text-muted);
}


/* ===== GALLERY CARD (Threads/Instagram doomscroll style) ===== */
.art-piece {
  background: var(--bg);
  position: relative;
  cursor: default;
  overflow: hidden;
  border: none;
  border-bottom: 1px solid var(--border);
  opacity: 1;
  transition: background 0.1s;
  will-change: transform;
}

.art-piece:hover {
  background: rgba(255,255,255,0.01);
}

.art-piece .art-image-link {
  cursor: pointer;
  display: block;
  overflow: hidden;
}

.art-piece img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: auto;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.art-piece:hover img {
  transform: scale(1.01);
}

.art-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 6px;
}

.art-card-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333 0%, #555 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.art-card-avatar:hover {
  transform: scale(1.1);
}

.art-card-artist {
  flex: 1;
  min-width: 0;
}

.art-card-artist-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.art-card-artist-name .verified-badge {
  margin-left: 2px;
  width: 12px;
  height: 12px;
}

.art-card-artist-name .verified-badge i {
  font-size: 7px;
}

.art-card-time {
  font-size: 10px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.art-card-more {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

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

.art-card-footer {
  padding: 8px 16px 12px;
}

.art-card-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}

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

.art-card-action:hover {
  color: var(--text-main);
}

.art-card-action:active {
  transform: scale(0.92);
}

.art-card-action i {
  font-size: 18px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s;
}

.art-card-action.liked i {
  color: var(--like-active);
  animation: likePop 0.35s ease;
}

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

.art-card-action-spacer {
  flex: 1;
}

.art-card-action.bookmark {
  color: var(--text-subtle);
}

.art-card-action.bookmark:hover {
  color: #fff;
}

.art-card-likes {
  display: none;
}

.art-card-title {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.art-card-title strong {
  font-weight: 700;
  margin-right: 4px;
}

.art-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.art-card-comments-link {
  font-size: 11px;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.2s;
}

.art-card-comments-link:hover {
  color: var(--text-muted);
}

.art-overlay {
  display: none;
}

.art-meta h3 {
  font-family: var(--font-heading);
  font-size: var(--font-size-large);
  margin: 0 0 4px 0;
  color: #fff;
}

.art-meta p {
  font-size: var(--font-size-small);
  color: #aaa;
  margin: 0;
  font-weight: 500;
}

.art-stats {
  display: none;
}


/* ===== THREADS SECTION ===== */
.threads-section {
  padding: var(--spacing-xl) 0;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 769px) and (max-width: 1023px) {
  .threads-section {
    padding: 80px var(--spacing-xl) 120px;
    max-width: 800px;
  }
}

@media (max-width: 768px) {
  .threads-section {
    padding: var(--spacing-xl) var(--spacing-md) calc(var(--bottom-nav-height) + var(--spacing-xl));
    max-width: none;
  }
}

.threads-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding: 0 20px;
}

.threads-header h2 {
  font-family: var(--font-heading);
  font-size: var(--font-size-xlarge);
}

.btn-new-thread {
  background: #fff;
  color: #000;
  border: none;
  padding: 10px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s;
}

.btn-new-thread:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(255,255,255,0.12);
}

.thread-item {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-md) 20px;
  transition: background 0.1s;
  cursor: pointer;
}

@media (max-width: 768px) {
  .thread-item {
    padding: var(--spacing-md) var(--spacing-md);
  }
}

.thread-item:hover {
  background: rgba(255,255,255,0.01);
}

.thread-header {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

@media (max-width: 768px) {
  .thread-header {
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
  }
}

.thread-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-base);
  color: #fff;
}

@media (max-width: 768px) {
  .thread-avatar {
    width: 36px;
    height: 36px;
    font-size: var(--font-size-small);
  }
}

.thread-author-info {
  flex: 1;
  min-width: 0;
}

.thread-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.thread-author-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  align-items: center;
}

.thread-author-handle {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  font-weight: 500;
}

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

.thread-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .thread-title {
    font-size: var(--font-size-base);
    margin-bottom: 4px;
  }
}

.thread-content {
  color: var(--text-muted);
  font-size: var(--font-size-base);
  line-height: 1.5;
  margin-bottom: var(--spacing-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .thread-content {
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-sm);
    -webkit-line-clamp: 2;
  }
}

.thread-actions {
  display: flex;
  gap: var(--spacing-lg);
  padding-top: var(--spacing-sm);
}

@media (max-width: 768px) {
  .thread-actions {
    gap: var(--spacing-md);
    padding-top: var(--spacing-sm);
  }
}

.thread-action {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12px;
  background: transparent;
  border: none;
  padding: 6px 10px;
  margin: -6px 0;
  border-radius: 9999px;
  transition: all 0.2s;
  font-weight: 600;
  font-family: var(--font-mono);
}

@media (max-width: 768px) {
  .thread-action {
    padding: 4px 8px;
    font-size: 11px;
  }
}

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


/* ===== SUGGESTED USERS SECTION ===== */
.suggested-section {
  padding: 0 0 var(--spacing-xl);
  max-width: none;
  width: 100%;
  margin: 0 auto;
}

.suggested-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 20px 12px;
  scrollbar-width: none;
}

.suggested-scroll::-webkit-scrollbar { display: none; }

.suggested-card {
  width: clamp(130px, 16vw, 160px);
  border-radius: var(--radius-md);
  border: 1px solid var(--veil-border);
  background: var(--bg-surface);
  overflow: hidden;
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 14px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  cursor: pointer;
}

.suggested-card:hover {
  transform: translateY(-2px);
  border-color: var(--veil-border-2);
  background: var(--bg-surface-2);
}

.suggested-card .sug-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333 0%, #555 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  margin-bottom: 8px;
  border: 2px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s, transform 0.2s;
}

.suggested-card:hover .sug-avatar {
  border-color: rgba(255,255,255,0.15);
  transform: scale(1.04);
}

.suggested-card .sug-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}

.suggested-card .sug-handle {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
}

.suggested-card .sug-bio {
  font-size: 10px;
  color: var(--text-subtle);
  text-align: center;
  line-height: 1.3;
  margin-bottom: 6px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggested-card .sug-follow-btn {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 9999px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  width: 100%;
  max-width: 110px;
}

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

.suggested-card .sug-follow-btn.following {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.suggested-card.sk {
  background: rgba(255,255,255,0.02);
}

.suggested-skeleton {
  display: flex;
  gap: 12px;
}

.suggested-card.sk:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  animation: shimmer 1.3s infinite;
  background-size: 200% 100%;
}

@media (max-width: 768px) {
  .suggested-card {
    width: 34vw;
    max-width: 140px;
  }
  .suggested-card .sug-avatar {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
}


/* ===== AUTH: SPLIT SCREEN ===== */
#auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  height: 100vh;
  width: 100vw;
  background: #050505;
  overflow: hidden;
}

/* Left Side (Visual Pane — Desktop Only) */
.veil-visual-pane {
  flex: 1.2;
  position: relative;
  overflow: hidden;
  display: none;
}

@media (min-width: 1024px) {
  .veil-visual-pane { display: block; }
}

.ken-burns-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  animation: veilKenBurnsPerfect 30s ease-in-out infinite alternate;
}

.visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.3), rgba(5,5,5,0.85));
  z-index: 1;
}

.visual-content {
  display: none;
}

.logomark-container {
  margin-bottom: 1.5rem;
  animation: veilLoopInOut 6s ease-in-out infinite;
}

.visual-logomark {
  width: 70px;
  height: 70px;
  filter: brightness(0) invert(1);
}

.visual-quote {
  font-family: 'Inter', sans-serif;
  font-size: 2.2rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: veilSlideUpFade 1s 0.5s forwards ease-out;
}

.visual-subtitle {
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  opacity: 0;
  animation: veilSlideUpFade 1s 0.7s forwards ease-out;
}

/* Right Side (Interaction Pane) */
.veil-interaction-pane {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: #050505;
  backdrop-filter: blur(20px);
  z-index: 10;
}

.grain-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.aura-orb {
  position: absolute;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: veilFloatOrb 10s infinite ease-in-out;
}

.orb-1 { top: -10%; right: -10%; }
.orb-2 { bottom: -5%; left: -10%; animation-delay: 2s; }

/* Auth Container & Logo */
.auth-card-veil {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 5;
}

.veil-main-logo {
  display: block;
  width: 130px;
  margin: 0 auto 2rem auto;
  opacity: 0;
  animation: veilFadeIn 1s 0.2s forwards;
}

/* Tabs (Login / Register) */
.veil-auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

.veil-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 0.9rem;
  color: rgba(255,255,255,0.6);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.3s;
  position: relative;
}

.veil-tab-btn.active {
  color: #ffffff;
  font-weight: 500;
}

.veil-tab-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 50%;
  height: 1px;
  background: #ffffff;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(255,255,255,0.4);
}

/* Forms & Inputs */
#login-form, #register-form {
  animation: veilFadeIn 0.4s ease-out;
}

.veil-form-hide { display: none !important; }

.veil-input-group {
  position: relative;
  margin-bottom: 1.2rem;
}

.veil-input {
  width: 100%;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 12px 40px 12px 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  color: white;
  transition: all 0.3s ease;
  outline: none;
}

.veil-input:-webkit-autofill,
.veil-input:-webkit-autofill:hover,
.veil-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px #050505 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: rgba(255,255,255,0.4);
  transition: background-color 5000s ease-in-out 0s;
}

.veil-input:focus {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.02);
}

.veil-input::placeholder {
  color: rgba(255,255,255,0.35);
  font-weight: 300;
}

.veil-secure-icon {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.3;
  transition: opacity 0.3s;
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.5);
}

.veil-secure-icon svg {
  width: 16px;
  height: 16px;
}

.veil-input:focus ~ .veil-secure-icon {
  opacity: 0.8;
  color: #22c55e;
}

/* Buttons */
.veil-submit-btn {
  width: 100%;
  padding: 12px;
  background: #ffffff;
  color: #000;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

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

.veil-submit-btn:active { transform: translateY(0); }
.veil-submit-btn svg { width: 16px; height: 16px; }

.veil-forgot-link {
  text-align: center;
  margin-top: 12px;
}

.veil-forgot-link a {
  color: rgba(255,255,255,0.35);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.2s;
}

.veil-forgot-link a:hover {
  color: rgba(255,255,255,0.6);
}

/* Google Sign-In Button */
.veil-google-signin {
  margin-bottom: 8px;
}

.veil-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.veil-google-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.veil-google-btn:active {
  background: #f1f3f4;
}

.veil-google-btn svg {
  flex-shrink: 0;
}

[data-theme="light"] .veil-google-btn {
  background: #fff;
  border-color: #dadce0;
}

[data-theme="light"] .veil-google-btn:hover {
  background: #f8f9fa;
}

/* Auth divider */
.veil-auth-divider {
  display: flex;
  align-items: center;
  margin: 12px 0;
  gap: 12px;
}

.veil-auth-divider::before,
.veil-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

[data-theme="light"] .veil-auth-divider::before,
[data-theme="light"] .veil-auth-divider::after {
  background: rgba(0,0,0,0.1);
}

.veil-auth-divider span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="light"] .veil-auth-divider span {
  color: rgba(0,0,0,0.35);
}

.veil-security-notice {
  margin-top: 1.2rem;
  text-align: center;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.4;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.veil-security-notice a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.veil-security-notice a:hover {
  text-decoration: underline;
}

.veil-message-box {
  padding: 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
  display: none;
  text-align: center;
}

.veil-auth-footer {
  margin-top: 2.5rem;
  text-align: center;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.veil-auth-footer:hover { opacity: 1; }

.veil-powered-label {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  display: block;
}

.veil-toolrealm-logo {
  height: 16px;
  filter: brightness(0) invert(1);
}

/* Version Badge */
.auth-version {
  position: absolute;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9999px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.auth-version-desktop {
  top: 1.2rem;
  left: 1.2rem;
  display: none;
}

@media (min-width: 1024px) {
  .auth-version-desktop { display: block; }
  .auth-version-mobile { display: none; }
}

.auth-version-mobile {
  top: 1rem;
  left: 1rem;
}

@media (min-width: 1024px) {
  .auth-version-mobile { display: none; }
}


/* ===== FOOTER (hidden — credit is in right sidebar) ===== */
.fancy-footer {
  display: none;
}

.eg-footer-top {
  display: flex;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-xl);
}

.eg-brand {
  max-width: 260px;
}

.eg-footer-logo {
  height: 18px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.eg-tagline {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--spacing-md);
}

.eg-social {
  display: flex;
  gap: var(--spacing-sm);
}

.eg-social-btn {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.eg-social-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.eg-cols {
  display: flex;
  gap: var(--spacing-2xl);
  flex: 1;
}

.eg-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: var(--spacing-md);
}

.eg-link {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 0;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  transition: color 0.2s;
  font-family: var(--font-body);
}

.eg-link:hover {
  color: #fff;
}

.eg-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-subtle);
}

.eg-bottom-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eg-bottom-copyright {
  font-weight: 500;
}

.eg-bottom-sep {
  opacity: 0.3;
}

.eg-bottom-credit a {
  color: var(--text-muted);
  text-decoration: none;
}

.eg-bottom-credit a:hover {
  color: #fff;
}

.eg-bottom-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eg-bottom-right a {
  color: var(--text-subtle);
  text-decoration: none;
  transition: color 0.2s;
}

.eg-bottom-right a:hover {
  color: #fff;
}

.eg-dot {
  opacity: 0.3;
}

@media (max-width: 768px) {
  .eg-footer-top {
    flex-direction: column;
    gap: var(--spacing-xl);
  }
  .eg-cols {
    flex-direction: column;
    gap: var(--spacing-xl);
  }
  .eg-footer-bottom {
    flex-direction: column;
    gap: var(--spacing-sm);
    text-align: center;
  }
}


/* ===== LOADING SCREEN (removed) ===== */


/* ===== UPDATES POPUP (removed) ===== */
.updates-popup {
  display: none !important;
}

.updates-popup.show {
  display: none !important;
}

.updates-popup-content {
  width: 95vw;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  text-align: center;
}

.updates-popup-content h3 {
  margin-bottom: 6px;
}

.updates-popup-content p {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
}

.feature-list {
  text-align: left;
  margin-bottom: var(--spacing-xl);
}

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

.feature-item:last-child {
  border-bottom: none;
}

.feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}

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

.feature-content p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}


/* ===== INSTALL TOAST (removed — PWA install handled natively) ===== */
.install-toast,
.install-toast.show,
.veil-install-toast,
.veil-install-toast.is-show,
.vit-icon,
.vit-copy,
.vit-actions,
.vit-btn {
  display: none !important;
}


/* ===== VEIL INSTALL TOAST (works on both mobile and desktop) ===== */
.veil-install-toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-height, 64px) + 16px);
  left: 16px;
  right: 16px;
  background: rgba(22,22,22,0.97);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 500;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 480px;
}

.veil-install-toast.is-show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  display: flex;
}

@media (min-width: 1024px) {
  .veil-install-toast {
    bottom: 24px;
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    max-width: 420px;
  }
  .veil-install-toast.is-show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    display: flex;
  }
}

.vit-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

.vit-icon-duo {
  width: 40px;
  height: 40px;
}

.vit-appicon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
}

.vit-logo {
  position: absolute;
  bottom: -2px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #050505;
  padding: 1px;
}

.vit-copy {
  flex: 1;
  min-width: 0;
}

.vit-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.vit-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vit-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.vit-btn {
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: var(--font-body);
  white-space: nowrap;
}

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

.vit-btn.primary {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.vit-btn.primary:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(255,255,255,0.12);
}


/* ===== CTA CARD ===== */
.trending-cta-card {
  background: var(--bg-surface);
  border: 1px solid var(--veil-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.tcc-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tcc-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.3;
}

.tcc-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--spacing-lg);
}

.tcc-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.tcc-btn-primary {
  background: #fff;
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.tcc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,255,255,0.12);
}

.tcc-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.tcc-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-strong);
}


/* ===== DC FALLBACK ===== */
.dc-fallback {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  background: radial-gradient(600px 200px at 30% 10%, rgba(255,255,255,0.08), transparent 60%);
}

/* ===== LIVE DOT (in pages.css for convenience) ===== */
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 6px;
  animation: liveDotPulse 2s infinite ease-in-out;
}
