/**
 * Core Shared Styles
 *
 * Shared foundation styles used across multiple pages.
 * Extracted from explore-v2.css for reuse.
 *
 * Used by: explore, profile, topic, leaderboard, analytics, about, create, privacy, terms
 *
 * Contains:
 * - Page layout (.explore-page, .section-container)
 * - Discovery bar with topic search
 * - Context panels and two-panel layouts
 * - Timeline viewer chrome (not carousel cards - see timeline-carousel.css)
 * - Rotating content sections
 * - Light mode overrides
 */

/* ============================================================================
   Page Layout
   ============================================================================ */

.explore-page {
  position: relative;
  min-height: 100vh;
  background: transparent;
  padding-bottom: 1rem;
}

/* Override Pico CSS .container max-width for explore page to allow full-width sections */
main.container:has(.explore-page) {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* Hide horizontal scrollbar on explore page while keeping content visible */
body:has(.explore-page) {
  overflow-x: hidden;
}

/* Global ambient animation - full page background */
.global-ambient-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.global-ambient-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Ensure all main sections sit above ambient background */
.explore-page > section {
  position: relative;
  z-index: 1;
}

/* Discovery bar section */
.discovery-bar-section {
  position: relative;
  z-index: 1000;
}

/* Base .section-container defined in section-container.css */

/* ============================================================================
   Hero Brand Section - Explore Page Override
   ============================================================================ */

/* Override global hide for explore page hero brand */
.explore-page .hero-brand-section {
  display: block !important;
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 0;
}

.explore-page .hero-brand-title {
  display: flex !important;
  justify-content: center;
  margin: 0;
}

.explore-page .hero-brand-link {
  display: inline-flex !important;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.explore-page .hero-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 16px rgba(0, 168, 255, 0.4);
}

.explore-page .hero-brand-link:hover .hero-brand-logo {
  transform: scale(1.05);
  box-shadow: 0 0 24px rgba(0, 168, 255, 0.6);
}

.explore-page .brand-dash {
  display: inline !important;
  font-size: 2.5rem;
  font-weight: 600;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  transition: text-shadow 0.2s ease;
}

.explore-page .hero-brand-link:hover .brand-dash {
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}

/* Hero brand tagline - static subtitle with rotating word */
.explore-page .hero-brand-tagline {
  display: block !important;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.6);
}

.explore-page .rotating-word {
  display: inline-block;
  color: var(--color-primary, #00a8ff);
  font-weight: 600;
}

.explore-page .rotating-word.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

.explore-page .rotating-word.fade-in {
  animation: fadeIn 0.3s ease-in forwards;
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   Discovery Bar
   ============================================================================ */

.discovery-bar-section {
  padding: 0.5rem 0 1rem;
  margin-bottom: 0.25rem;
  margin-top: 0.25rem;
}

.discovery-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.discovery-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  min-width: 0;
}

/* Discovery Links */
.discovery-links-wrapper {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.discovery-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.1rem 0;
}

.discovery-links::-webkit-scrollbar {
  display: none;
}

.discovery-link {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.discovery-link:hover {
  color: white;
  background: rgba(0, 168, 255, 0.2);
  border-color: rgba(0, 168, 255, 0.4);
}

.discovery-link.active {
  color: white;
  background: rgba(0, 168, 255, 0.25);
  border-color: rgba(0, 168, 255, 0.5);
}

/* Discovery Search Pill - extends .discovery-link */
.discovery-search-pill {
  position: relative;
  overflow: hidden;
  /* Active blue style by default */
  color: white;
  background: rgba(0, 168, 255, 0.25);
  border-color: rgba(0, 168, 255, 0.5);
}

.discovery-search-pill svg {
  flex-shrink: 0;
  margin-left: 0.3rem;
  transition: opacity 0.2s ease;
}

.discovery-search-pill .discovery-search-input {
  width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
  color: white;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  line-height: inherit;
  opacity: 0;
  transition: width 0.2s ease, opacity 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.discovery-search-pill .discovery-search-input:focus {
  outline: none;
  box-shadow: none;
}

.discovery-search-pill .discovery-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Expanded state */
.discovery-search-pill.expanded {
  background: rgba(0, 168, 255, 0.3);
  border-color: rgba(0, 168, 255, 0.6);
}

.discovery-search-pill.expanded .discovery-search-input {
  width: 80px;
  opacity: 1;
  margin-left: 0.25rem;
}

/* No results message */
.discovery-no-results {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

/* Active Filters Row */
.active-filters-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  margin-top: 0.5rem;
}

.active-filters-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.active-filters-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  background: rgba(0, 168, 255, 0.25);
  border: 1px solid rgba(0, 168, 255, 0.4);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background: rgba(0, 168, 255, 0.35);
  border-color: rgba(0, 168, 255, 0.6);
}

.filter-pill-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}

.filter-pill-remove:hover {
  color: white;
  background: rgba(255, 100, 100, 0.5);
}

.clear-all-filters-btn {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.clear-all-filters-btn:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================================================
   Timeline Context Section - Two Panel Layout (1/4 + 3/4)
   ============================================================================ */

.timeline-context-section {
  padding: 0 0 2rem;
}

/* Timeline Header Section - below timeline bar */
.timeline-header-section {
  text-align: center;
  padding: 0.75rem 0 0;
  margin-top: 0.5rem;
}

/* Sub-heading above carousel */
.timeline-subheading-above {
  text-align: left;
  padding: 0 0 0.5rem;
}

.timeline-subheading-above .timeline-description {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.timeline-subheading-above .timeline-create-link {
  color: var(--color-primary, #00a8ff);
  text-decoration: none;
}

.timeline-header-section .timeline-title {
  margin-bottom: 0.35rem;
}

.timeline-header-section .timeline-description {
  margin-bottom: 0;
}

/* Timeline Title */
.timeline-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: white;
  font-style: italic;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.timeline-title .topic-highlight {
  color: inherit;
  font-style: inherit;
  font-weight: inherit;
}

.timeline-title .topic-underline {
  color: inherit;
  font-style: inherit;
  font-weight: inherit;
}

/* Rotating taglines vertical flip animation */
.timeline-title-rotating {
  min-height: 1.75rem;
  display: inline-block;
  overflow: hidden;
}

/* Exit animation - slide up and fade out */
.timeline-title-rotating.rotating-out {
  animation: rotateOut 0.5s ease-in forwards;
}

/* Enter animation - slide up from below and fade in */
.timeline-title-rotating.rotating-in {
  animation: rotateIn 0.5s ease-out forwards;
}

@keyframes rotateOut {
  0% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px) rotateX(-90deg);
  }
}

@keyframes rotateIn {
  0% {
    opacity: 0;
    transform: translateY(20px) rotateX(90deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

.timeline-description {
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 1.5rem 0;
  line-height: 1.4;
}

/* Description also rotates with taglines */
.timeline-description.rotating-out {
  animation: rotateOut 0.5s ease-in forwards;
}

.timeline-description.rotating-in {
  animation: rotateIn 0.5s ease-out forwards;
}

/* Centered variants */
.timeline-title-center {
  text-align: center;
}

.timeline-description-center {
  text-align: center;
}

/* Left-aligned variants */
.timeline-title-left {
  text-align: left;
}

.timeline-description-left {
  text-align: left;
}

/* Ambient Animation Container - covers discovery bar and timeline only */
.ambient-animation-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* JS will calculate proper height */
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-animation-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================================================
   Rotating Content Section
   ============================================================================ */

.rotating-content-section {
  position: relative;
  padding: 0.25rem 0 0.5rem;
  overflow: visible;
  margin-top: 0.5rem;
  /* Scroll-triggered animation - starts invisible */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Solar storm background - full viewport width */
.section-ambient-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  min-height: 400px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.section-ambient-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Animate in when scrolled into view */
.rotating-content-section.scroll-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Centered single-column layout for rotating content */
.rotating-content-section .section-container {
  text-align: center;
  position: relative;
  z-index: 1;
}

.rotating-content-section .timeline-header-section {
  text-align: center;
}

.rotating-content-section .section-dots {
  justify-content: center;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.rotating-content-section .timeline-context-content {
  margin-top: 0;
}

/* Legacy Timeline Title Section - below panels */
.timeline-title-section {
  position: relative;
  padding: 3rem 0 2rem;
  overflow: visible;
}

/* Ensure content stays above animation */
.timeline-title-section > .section-container {
  position: relative;
  z-index: 1;
}

.timeline-title-section .timeline-header-section {
  text-align: center;
}

/* Timeline context content container - for rotation animation */
.timeline-context-content {
  margin-top: 1.5rem;
}

.timeline-context-content.rotating-out {
  animation: rotateOut 0.5s ease-in forwards;
}

.timeline-context-content.rotating-in {
  animation: rotateIn 0.5s ease-out forwards;
}

/* Section Dot Navigation */
.section-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.5rem;
}

.section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.section-dot:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.2);
}

.section-dot.active {
  background: var(--color-primary, #00a8ff);
  transform: scale(1.1);
}

.section-dot:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 168, 255, 0.3);
}

/* ============================================================================
   Rotating Content Section
   ============================================================================ */

.rotating-content-section .section-container {
  position: relative;
  z-index: 1;
}

.rotating-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.rotating-content-wrapper .timeline-header-section {
  text-align: center;
  width: 100%;
}

.rotating-content-wrapper .timeline-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.rotating-content-wrapper .timeline-title .topic-highlight {
  color: var(--color-primary, #00a8ff);
  font-style: normal;
}

.rotating-content-wrapper .timeline-description {
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.rotating-content-wrapper .section-dots {
  justify-content: center;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.rotating-content-wrapper .timeline-context-content {
  margin-top: 0.5rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Responsive: Rotating content section */
@media (max-width: 640px) {
  .rotating-content-wrapper {
    max-width: 100%;
  }

  .rotating-content-wrapper .timeline-title {
    font-size: 1.35rem;
  }
}

/* Top Topics/Contributors when in bottom section */
.explore-chart-wrapper-bottom {
  max-width: 500px;
  margin: 0 auto;
  padding: 1rem 0;
}

.explore-chart-wrapper-bottom .explore-creators-title {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.explore-chart-wrapper-bottom .explore-creators-list {
  max-width: 400px;
  margin: 0 auto;
}

/* ============================================================================
   Create CTA Content
   ============================================================================ */

.context-create-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}

/* Mini Topic Preview Cards - rotating 3-up grid */
.context-topic-previews {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.mini-topic-card {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  background: var(--color-bg-card, #0d1b2a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.mini-topic-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.mini-topic-card.rotating-out {
  animation: miniCardOut 0.3s ease-in forwards;
}

.mini-topic-card.rotating-in {
  animation: miniCardIn 0.3s ease-out forwards;
}

@keyframes miniCardOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9); }
}

@keyframes miniCardIn {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.mini-topic-media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-color: rgba(0, 168, 255, 0.1);
}

.mini-topic-overlay {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
}

.mini-topic-name {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-create-features {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.create-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.6));
  font-size: 0.85rem;
}

.create-feature svg {
  color: var(--color-primary, #00a8ff);
  opacity: 0.8;
  width: 18px;
  height: 18px;
}

/* ============================================================================
   Media Types Showcase
   ============================================================================ */

.context-media-showcase {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  flex-wrap: wrap;
}

.media-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.media-type-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.media-type-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-type-icon.youtube {
  color: #ff0000;
}

.media-type-icon.twitter {
  color: #ffffff;
}

.media-type-icon.stats {
  color: var(--color-primary, #00a8ff);
}

.media-type-icon.images {
  color: #10b981;
}

.media-type-icon.timelines {
  color: #a855f7;
}

.media-type-card span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.6));
  text-align: center;
}

/* ============================================================================
   Profile Preview (matches profile page header style, smaller)
   ============================================================================ */

.context-profile-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
}

.profile-preview-card-link {
  text-decoration: none;
  display: block;
  width: 100%;
  max-width: 700px;
}

.profile-preview-card {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl, 16px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  position: relative;
}

.profile-preview-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl, 16px);
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.02)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.profile-preview-card-link:hover .profile-preview-card {
  border-color: rgba(var(--color-primary-rgb, 0, 168, 255), 0.3);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(var(--color-primary-rgb, 0, 168, 255), 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.profile-preview-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(var(--color-primary-rgb, 0, 168, 255), 0.5);
  box-shadow: 0 0 20px rgba(var(--color-primary-rgb, 0, 168, 255), 0.3);
  flex-shrink: 0;
}

.profile-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.profile-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.profile-preview-username {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-text-primary, white);
  text-align: left;
}

.profile-preview-bio {
  margin: 0;
  font-size: 1.1rem;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.6));
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.profile-preview-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.profile-preview-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.6));
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  background: rgba(var(--color-primary-rgb, 0, 168, 255), 0.1);
  border-radius: var(--radius-sm, 6px);
  transition: all 0.2s ease;
}

.profile-preview-social-link:hover {
  background: rgba(var(--color-primary-rgb, 0, 168, 255), 0.2);
  color: var(--color-primary, #00a8ff);
}

.profile-preview-social-link svg {
  flex-shrink: 0;
}

/* ============================================================================
   Responsive adjustments for new content types
   ============================================================================ */

@media (max-width: 640px) {
  .context-topic-previews {
    gap: 0.5rem;
  }

  .mini-topic-card {
    width: 140px;
    height: 140px;
  }

  .mini-topic-name {
    font-size: 0.7rem;
    bottom: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
  }

  .context-create-features {
    gap: 1rem;
  }

  .create-feature {
    font-size: 0.8rem;
  }

  .context-media-showcase {
    gap: 0.75rem;
    padding: 1rem;
  }

  .media-type-card {
    width: 80px;
    height: 80px;
    gap: 0.35rem;
  }

  .media-type-icon {
    width: 32px;
    height: 32px;
  }

  .media-type-icon svg {
    width: 20px;
    height: 20px;
  }

  .media-type-card span {
    font-size: 0.65rem;
  }

  .profile-preview-card {
    max-width: 100%;
  }
}

/* Staggered animation for context panels */
.timeline-context-panels .context-topic-card {
  transition-delay: 0.1s;
}

.timeline-context-panels .context-discussion-panel {
  transition-delay: 0.25s;
}

.timeline-create-link,
.timeline-description .topic-link {
  color: var(--color-primary, #00a8ff);
  text-decoration: none;
  font-weight: 500;
}

.timeline-create-link:hover,
.timeline-description .topic-link:hover {
  text-decoration: underline;
}

/* Topic page: reduce bottom margin when title is above carousel */
.topic-page .timeline-context-section .timeline-description {
  margin-bottom: 0;
}

.topic-page .timeline-context-section {
  padding-bottom: 0.5rem;
}

.context-panels {
  display: grid;
  /* Fixed width for topic card, discussion takes remaining space */
  grid-template-columns: 240px 1fr;
  gap: 0; /* Remove gap - we'll handle spacing with margin */
  align-items: stretch;
  min-height: 240px;
  margin-top: 1.5rem;
}

/* Left Panel: Topic Preview Card (1/4 width) - Square aspect ratio */
.context-topic-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  background: var(--color-bg-card, #0d1b2a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  aspect-ratio: 1 / 1;
}

.context-topic-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.context-topic-media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.context-topic-card:hover .context-topic-media {
  transform: scale(1.05);
}

.context-topic-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.context-topic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
}

.context-topic-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  z-index: 2;
}

.context-topic-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Right Panel: Discussion (3/4 width) - Transparent with floating items */
.context-panel-discussion {
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Subtle overlap onto the topic card */
  margin-left: -0.25rem;
  position: relative;
  z-index: 2; /* Ensure discussion overlaps topic card */
}

.discussion-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.5rem;
  border-bottom: none;
}

.discussion-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Live indicator */
.discussion-live-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  animation: livePulse 2s ease-in-out infinite;
}

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

/* Discussion Stream */
.discussion-stream {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.discussion-stream::-webkit-scrollbar {
  width: 3px;
}

.discussion-stream::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.discussion-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.discussion-loading-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

/* Discussion Item - Floating glassmorphism style */
.discussion-item {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  /* Match width of input box (exclude button width 32px + gap 0.5rem) */
  margin-right: calc(32px + 0.5rem);
}

.discussion-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.discussion-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  opacity: 0.85;
}

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

.discussion-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
}

.discussion-author {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}

.discussion-author:hover {
  color: var(--color-primary);
}

.discussion-time {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.25);
}

.discussion-text {
  font-size: 0.7rem;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty state */
.discussion-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  text-align: center;
}

.discussion-empty-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  font-style: italic;
}

/* Comment Input Row - anchored to bottom */
.discussion-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0 0.25rem 0;
  border-top: none;
  background: transparent;
  margin-top: auto;
  flex-shrink: 0;
}

.discussion-input {
  flex: 1;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.discussion-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.discussion-input:focus {
  border-color: rgba(0, 168, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.2);
}

.discussion-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(0, 168, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 168, 255, 0.25);
  border-radius: 50%;
  color: var(--color-primary, #00a8ff);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.discussion-submit-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
}

.discussion-submit-btn:not(:disabled):hover {
  background: rgba(0, 168, 255, 0.2);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(0, 168, 255, 0.4);
  transform: scale(1.05);
}

.discussion-submit-btn svg {
  width: 14px;
  height: 14px;
}

.discussion-hint {
  margin: 0;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}

/* Discussion Help Button */
.discussion-help-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.discussion-help-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
}

.discussion-help-btn:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.discussion-help-btn svg {
  flex-shrink: 0;
}

.discussion-help-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(24, 34, 54, 0.95);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: var(--radius-md);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.discussion-help-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(24, 34, 54, 0.95);
}

.discussion-help-btn:hover .discussion-help-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Responsive: Stack on mobile */
@media (max-width: 900px) {
  .context-panels {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .context-panel-metadata {
    order: 1;
  }

  .context-panel-discussion {
    order: 2;
    /* Remove overlap on mobile */
    margin-left: 0;
    padding-left: 0;
  }

  .discussion-stream {
    max-height: 150px;
  }
}

@media (max-width: 600px) {
  /* On small screens, hide discussion panel - can be expandable later */
  .context-panel-discussion {
    display: none;
  }

  .context-panels {
    grid-template-columns: 1fr;
  }
}

.featured-post-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  max-width: 500px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.featured-post-title:hover {
  color: var(--color-primary);
}

.featured-post-attribution {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
}

.attribution-label {
  opacity: 0.7;
}

.attribution-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.attribution-link:hover {
  opacity: 0.8;
}

.attribution-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
}

.attribution-username {
  font-weight: 600;
}

/* Topic Preview Grid */
.topic-preview-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.75rem;
  min-height: 400px;
}

.topic-preview-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.topic-preview-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.topic-preview-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.topic-preview-card:hover .topic-preview-media {
  transform: scale(1.05);
}

.topic-preview-overlay {
  position: absolute;
  inset: -2px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  z-index: 1;
}

.topic-preview-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  z-index: 2;
}

.topic-preview-name {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* No media fallback */
.topic-preview-card-no-media {
  background: linear-gradient(135deg, var(--color-bg-base-light) 0%, var(--color-bg-base-mid) 100%);
}

.topic-preview-card-no-media .topic-preview-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.topic-preview-no-image-cta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.3;
  display: none;
}

.topic-preview-card-no-media .topic-preview-no-image-cta {
  display: block;
}

.topic-preview-no-image-cta .cta-link {
  color: var(--color-primary, #00a8ff);
  text-decoration: underline;
}

/* ============================================================================
   4-Column Topic Grid
   ============================================================================ */

.topic-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 0;
  /* Prevent grid blowout */
  width: 100%;
  box-sizing: border-box;
}

.topic-grid-card {
  position: relative;
  aspect-ratio: 4 / 3;  /* Landscape aspect ratio */
  min-height: 0; /* Let aspect-ratio control height */
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(0, 168, 255, 0.2);
  transition: all 0.3s ease;
  /* Ensure cards don't overflow */
  width: 100%;
  box-sizing: border-box;
}

.topic-grid-card:hover {
  border-color: rgba(0, 168, 255, 0.5);
  box-shadow: 0 4px 20px rgba(0, 168, 255, 0.15);
  transform: translateY(-2px);
}

.topic-grid-card .topic-preview-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.topic-grid-card:hover .topic-preview-media {
  transform: scale(1.05);
}

.topic-grid-card .topic-preview-overlay {
  position: absolute;
  inset: -2px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  z-index: 1;
}

.topic-grid-card .topic-preview-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  z-index: 2;
}

.topic-grid-card .topic-preview-name {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Topic Grid Card Assembly Animation */
.topic-grid-card {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
}

.topic-grid-card.assembled {
  animation: topicCardAssemble 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Staggered delays for each card position */
.topic-grid-card:nth-child(1).assembled { animation-delay: 0ms; }
.topic-grid-card:nth-child(2).assembled { animation-delay: 60ms; }
.topic-grid-card:nth-child(3).assembled { animation-delay: 120ms; }
.topic-grid-card:nth-child(4).assembled { animation-delay: 180ms; }
.topic-grid-card:nth-child(5).assembled { animation-delay: 240ms; }
.topic-grid-card:nth-child(6).assembled { animation-delay: 300ms; }
.topic-grid-card:nth-child(7).assembled { animation-delay: 360ms; }
.topic-grid-card:nth-child(8).assembled { animation-delay: 420ms; }
.topic-grid-card:nth-child(9).assembled { animation-delay: 480ms; }

@keyframes topicCardAssemble {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Search Topics Button */
.search-topics-btn-wrapper {
  display: flex;
  justify-content: center;
  padding: 1rem 0 0;
}

.search-topics-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary, #00a8ff);
  background: transparent;
  border: 1px solid var(--color-primary, #00a8ff);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 168, 255, 0.3);
  text-decoration: none;
}

.search-topics-btn:hover {
  background: rgba(0, 168, 255, 0.15);
  box-shadow: 0 0 25px rgba(0, 168, 255, 0.5);
  transform: translateY(-2px);
}

.search-topics-btn svg {
  transition: transform 0.3s ease;
}

.search-topics-btn:hover svg {
  transform: translateX(4px);
}

/* ============================================================================
   Explore Rankings Section
   ============================================================================ */

.explore-rankings-section {
  padding: 0.75rem 0 2rem;
  box-sizing: border-box;
}

.explore-rankings-section .section-container {
  max-width: none;
  width: 100%;
}

/* Section Header - full viewport width with margin on ends */
.explore-rankings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  /* Full viewport width */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0.75rem 2rem;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
  position: relative;
}

/* Separator line - spans viewport with margin on ends */
.explore-rankings-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.explore-rankings-label {
  font-size: 0.75rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

/* Toggle Buttons */
.explore-rankings-toggle {
  display: flex;
  gap: 0.5rem;
}

.explore-rankings-toggle-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill, 20px);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.explore-rankings-toggle-btn:hover {
  color: white;
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.3);
}

.explore-rankings-toggle-btn.active {
  color: white;
  background: rgba(0, 168, 255, 0.25);
  border-color: rgba(0, 168, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.3);
}

/* Rankings Container - Glassmorphism (matches leaderboard) */
.explore-rankings-section .rankings-container {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 12px);
  padding: 1rem 2rem;
  /* Match header and masonry wrapper width constraint */
  max-width: 1400px;
  margin: 1rem auto 0 auto;
}

/* Rankings Header Row */
.explore-rankings-section .rankings-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.5rem;
}

.explore-rankings-section .rankings-header-rank {
  width: 32px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.explore-rankings-section .rankings-header-creator {
  flex: 1;
  min-width: 120px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

.explore-rankings-section .rankings-header-stat {
  width: 70px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.explore-rankings-section .rankings-header-topics {
  width: 180px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

/* Rankings List */
.explore-rankings-section .rankings-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Individual ranking row */
.explore-rankings-section .ranking-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md, 8px);
  transition: background 0.2s ease;
}

.explore-rankings-section .ranking-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Rank badge */
.explore-rankings-section .ranking-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  flex-shrink: 0;
}

.explore-rankings-section .ranking-row:nth-child(1) .ranking-rank {
  background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
  color: #1a1a2e;
}

.explore-rankings-section .ranking-row:nth-child(2) .ranking-rank {
  background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
  color: #1a1a2e;
}

.explore-rankings-section .ranking-row:nth-child(3) .ranking-rank {
  background: linear-gradient(135deg, #cd7f32 0%, #b5651d 100%);
  color: #1a1a2e;
}

/* Creator/Topic info column */
.explore-rankings-section .ranking-creator {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.explore-rankings-section .ranking-creator-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.explore-rankings-section .ranking-creator-link:hover {
  transform: translateX(2px);
}

.explore-rankings-section .ranking-creator-link:hover .ranking-creator-name {
  color: var(--color-primary);
}

.explore-rankings-section .ranking-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.explore-rankings-section .ranking-creator-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  transition: color 0.2s;
}

/* Stats columns */
.explore-rankings-section .ranking-stat {
  width: 70px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

/* Topics column */
.explore-rankings-section .ranking-topics {
  width: 180px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.explore-rankings-section .ranking-topic-pill {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill, 12px);
  color: var(--color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.explore-rankings-section .ranking-topic-pill:hover {
  color: var(--color-primary);
  border-color: rgba(0, 168, 255, 0.3);
  background: rgba(0, 168, 255, 0.1);
}

/* Rankings Loading */
.rankings-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

/* Rankings Empty State */
.rankings-empty {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Topic row specific styles */
.ranking-row-topic .ranking-creator-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ranking-row-topic .ranking-creator-name {
  max-width: none;
  white-space: normal;
}

.ranking-topic-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 4px);
  object-fit: cover;
  background: rgba(0, 168, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.ranking-topic-thumb-placeholder {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 4px);
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.2) 0%, rgba(0, 168, 255, 0.1) 100%);
  border: 1px solid rgba(0, 168, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Post row specific styles */
.ranking-row-post .ranking-creator-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ranking-post-thumb {
  width: 48px;
  height: 32px;
  border-radius: var(--radius-sm, 4px);
  object-fit: cover;
  background: rgba(0, 168, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.ranking-post-thumb-placeholder {
  width: 48px;
  height: 32px;
  border-radius: var(--radius-sm, 4px);
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.2) 0%, rgba(0, 168, 255, 0.1) 100%);
  border: 1px solid rgba(0, 168, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.ranking-post-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ranking-post-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  transition: color 0.2s;
}

.ranking-post-author {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.ranking-creator-link:hover .ranking-post-title {
  color: var(--color-primary);
}

/* Expand Table Button */
.explore-rankings-section .expand-table-container {
  display: flex;
  justify-content: center;
  padding: 1rem 0 0;
}

.explore-rankings-section .btn-expand-table {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill, 20px);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.explore-rankings-section .btn-expand-table:hover {
  color: var(--color-primary);
  border-color: rgba(0, 168, 255, 0.4);
  background: rgba(0, 168, 255, 0.08);
}

.explore-rankings-section .btn-expand-table svg {
  transition: transform 0.2s ease;
}

/* Responsive */
@media (max-width: 900px) {
  .explore-rankings-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .explore-rankings-section .rankings-header-topics,
  .explore-rankings-section .ranking-topics {
    display: none;
  }
}

@media (max-width: 800px) {
  /* Match masonry wrapper responsive padding */
  .explore-rankings-header {
    padding: 0.75rem 1rem;
  }

  .explore-rankings-header::after {
    left: 1rem;
    right: 1rem;
  }

  .explore-rankings-section .rankings-container {
    padding: 1rem;
  }
}

@media (max-width: 600px) {
  .explore-rankings-toggle-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.7rem;
  }

  .explore-rankings-section .rankings-header,
  .explore-rankings-section .ranking-row {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .explore-rankings-section .rankings-header-stat,
  .explore-rankings-section .ranking-stat {
    width: 50px;
    font-size: 0.75rem;
  }

  .explore-rankings-section .ranking-avatar,
  .explore-rankings-section .ranking-topic-thumb,
  .explore-rankings-section .ranking-topic-thumb-placeholder {
    width: 28px;
    height: 28px;
  }

  .explore-rankings-section .ranking-creator-name {
    font-size: 0.8rem;
    max-width: 100px;
  }

  .explore-rankings-section .ranking-row-topic .ranking-creator-name {
    max-width: none;
    white-space: normal;
  }

  .explore-rankings-section .ranking-rank {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }
}

/* Responsive: 4-column grid */
@media (max-width: 1200px) {
  .topic-grid-4col {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 900px) {
  .topic-grid-4col {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 600px) {
  .topic-grid-4col {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }

  .topic-grid-card .topic-preview-content {
    padding: 1rem;
  }

  .topic-grid-card .topic-preview-name {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .topic-grid-4col {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .topic-grid-card .topic-preview-content {
    padding: 0.75rem;
  }

  .topic-grid-card .topic-preview-name {
    font-size: 0.85rem;
  }

}

/* ============================================================================
   Timeline Context Label (minimal)
   ============================================================================ */

.timeline-context-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding-left: 0.25rem;
}

/* ============================================================================
   Timeline Label (legacy - used on topic pages)
   ============================================================================ */

.timeline-label {
  margin: 0 auto;
  text-align: center;
  padding: 15px 20px;
  width: 100%;
  max-width: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.timeline-label-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.timeline-label-text {
  font-size: 40px;
  font-weight: 500;
  color: var(--color-text-primary);
  font-style: italic;
  letter-spacing: 0.02em;
  margin-top: 20px;
  margin-bottom: 0;
}

.timeline-label-text .topic-highlight {
  color: var(--color-primary);
  font-weight: 600;
  font-style: normal;
}

/* Explore page variant - smaller, left-aligned, subtle */
.timeline-label-explore {
  text-align: left;
  padding: 0 0 0.5rem;
  margin: 0;
}

.timeline-label-explore .timeline-label-text {
  font-size: 0.85rem;
  font-weight: 400;
  margin: 0;
  color: #ffffff;
}

.timeline-label-explore .timeline-label-text .topic-highlight {
  font-weight: 500;
}

@media (max-width: 768px) {
  .timeline-label-explore .timeline-label-text {
    font-size: 0.8rem;
  }
}

.timeline-label-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.timeline-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(24, 34, 54, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
  border-radius: 50%;
  color: rgba(var(--color-primary-rgb), 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.timeline-action-btn svg {
  width: 18px;
  height: 18px;
}

.timeline-action-btn:hover {
  background: rgba(var(--color-primary-rgb), 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.5);
  transform: scale(1.1);
}

.timeline-description {
  font-size: 18px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0 0 12px 0;
  opacity: 0.85;
}

.timeline-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 15px;
}

.timeline-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
  flex-shrink: 0;
}

.timeline-author-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* ============================================================================
   Timeline Viewer Section
   ============================================================================ */

.timeline-viewer-section {
  padding: 2rem 0;
}

.timeline-layout-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-viewer-panels {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  min-height: 500px;
}

.timeline-viewer-content {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-viewer-content-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--color-text-muted);
}

.timeline-viewer-metadata {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.timeline-viewer-meta-placeholder {
  color: var(--color-text-muted);
  text-align: center;
  padding: 2rem;
}

/* Timeline Bar */
.timeline-bar-container {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.timeline-bar-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.timeline-bar-scroll::-webkit-scrollbar {
  display: none;
}

.timeline-bar-track {
  display: flex;
  gap: 0.5rem;
  min-width: max-content;
  padding: 0.5rem 0;
}

.timeline-bar-axis {
  display: flex;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border-secondary);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Tooltip */
.timeline-bar-tooltip {
  position: fixed;
  z-index: 1001;
  background: rgba(20, 30, 48, 0.98);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  max-width: 280px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.tooltip-thumbnail {
  width: 100%;
  height: 120px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.tooltip-title {
  font-weight: 600;
  color: var(--color-text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.tooltip-type {
  font-size: 0.75rem;
  color: var(--color-primary);
  text-transform: uppercase;
}

.tooltip-content-preview {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================================
   Leaderboard / Discover Section
   ============================================================================ */

.explore-section {
  padding: 2.5rem 0;
}

.explore-section + .explore-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.featured-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.featured-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.featured-title-text {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}

.featured-title-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #00a8ff 0%, #33c4ff 50%, #00a8ff 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 168, 255, 0.5);
}

.featured-description {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  opacity: 0.75;
}

/* ============================================================================
   Explore Timeline Carousel Section
   ============================================================================ */

.explore-timeline-section {
  padding: 0 0 1.5rem;
  /* Keep overflow visible for carousel but use isolation to create stacking context */
  overflow: visible;
  isolation: isolate;
  position: relative;
  z-index: 1;
}

/* Recent Posts Header (inside view containers) */
.recent-posts-header {
  grid-column: 1 / -1;
  text-align: center;
  padding-bottom: 1rem;
  margin-bottom: 0.5rem;
}

/* Recent Posts Header for Carousel (above container - full viewport width like carousel wrapper) */
.recent-posts-header-carousel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  /* Full viewport width - matches carousel wrapper */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0.75rem 2rem;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
  position: relative;
}

/* Separator line with gaps on each end - matches vertical view */
.recent-posts-header-carousel::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.recent-posts-header-carousel .recent-posts-label {
  font-size: 0.75rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  text-align: left;
}

.recent-posts-header-carousel .recent-posts-label-suffix {
  display: none;
}

/* Recent Posts Header for Vertical Timeline (above container - matches explore-rankings-header style) */
.recent-posts-header-vertical {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.recent-posts-header-vertical .recent-posts-label {
  font-size: 0.75rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  text-align: left;
}

.recent-posts-header-vertical .recent-posts-label-suffix {
  display: none;
}

/* Topic link in recent posts header */
.recent-posts-topic-link {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-primary, #00a8ff);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.recent-posts-topic-link:hover {
  color: #4dc3ff;
  opacity: 0.9;
}

.recent-posts-topic-link .topic-link-arrow {
  margin-left: 0.15rem;
  display: inline-block;
  transition: transform 0.2s ease;
}

.recent-posts-topic-link:hover .topic-link-arrow {
  transform: translateX(2px);
}

/* Recent Posts Label - matches leaderboard title style */
.recent-posts-label {
  font-size: 1.75rem;
  font-weight: 700;
  font-style: italic;
  color: var(--color-text-primary, rgba(255, 255, 255, 0.95));
  margin: 0;
  text-align: center;
}

.recent-posts-label-prefix {
  font-style: italic;
}

.recent-posts-label-suffix {
  font-style: italic;
}

.recent-posts-label-highlight {
  font-style: normal;
  color: var(--color-primary, #00a8ff);
}

/* Timeline Bar - explore page specific positioning (contained within wrapper) */
.explore-page .carousel-timeline-bar {
  position: absolute;
  bottom: 35px; /* Position from bottom for consistent placement */
  left: 1.5rem;
  right: 1.5rem;
  width: auto;
  padding-bottom: 0.5rem;
}

/* View toggle wrapper on explore page */
.explore-page .timeline-view-toggle-wrapper {
  margin-top: 0.75rem;
}

/* Explore page timeline bar glow effect */
.explore-page .carousel-timeline-glow {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 20%,
    rgba(255, 255, 255, 0.3) 80%,
    transparent 100%
  );
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

/* Explore page tick marks moved to timeline-carousel.css */

/* ============================================================================
   Explore Page Carousel Overrides
   Base styles in components/timeline-carousel.css
   ============================================================================ */

/* Explore page carousel wrapper - full viewport width like vertical view */
.explore-page .timeline-carousel-wrapper {
  padding: 1.5rem 2rem;
  padding-bottom: 50px;
  overflow: hidden; /* Clip content at container edges */
  /* Full viewport width - matches vertical timeline */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  min-height: 400px;
  box-sizing: border-box;
  position: relative;
}

.explore-page .timeline-carousel-wrapper.loading {
  min-height: 400px;
  max-height: 400px;
}

/* When loaded, increase min-height and padding to push timeline bar lower */
.explore-page .timeline-carousel-wrapper.loaded {
  min-height: 480px;
  padding-bottom: 80px;
}

/* ============================================================================
   Horizontal Topics Carousel (below timeline container)
   ============================================================================ */

.horizontal-topics-carousel-wrapper {
  max-width: 90%;
  margin: -0.25rem auto 0; /* Negative margin to overlap timeline container slightly */
  padding: 0.75rem 0; /* Padding for glow overflow */
  box-sizing: border-box;
  overflow: visible;
  position: relative;
  z-index: 2; /* Above timeline container for glow visibility */
}

.horizontal-topics-carousel {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.75rem 0; /* Extra padding for glow overflow */
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  /* Fade edges */
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 1) 3%,
    rgba(0, 0, 0, 1) 97%,
    transparent 100%
  );
  mask-image: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 1) 3%,
    rgba(0, 0, 0, 1) 97%,
    transparent 100%
  );
}

/* Hide scrollbar for Chrome/Safari/Opera */
.horizontal-topics-carousel::-webkit-scrollbar {
  display: none;
}

/* Topic cards in horizontal layout */
.horizontal-topics-carousel .trending-topic-card {
  width: 140px;
  height: 80px;
  flex-shrink: 0;
}

/* Constrain carousel to container width with edge fade */
.explore-page .timeline-carousel {
  padding-top: 0;
  padding-left: 2rem;
  padding-right: 2rem;
  /* Fade content at edges using mask */
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 5%,
    rgba(0, 0, 0, 1) 15%,
    rgba(0, 0, 0, 1) 85%,
    rgba(0, 0, 0, 0.3) 95%,
    transparent 100%
  );
  mask-image: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 5%,
    rgba(0, 0, 0, 1) 15%,
    rgba(0, 0, 0, 1) 85%,
    rgba(0, 0, 0, 0.3) 95%,
    transparent 100%
  );
}

/* Hide action buttons (Details, Discuss) in horizontal carousel */
.explore-page .timeline-carousel .carousel-card-actions {
  display: none !important;
}

/* Explore page loading overlay - matches profile loading style */
.explore-page .timeline-loading-overlay {
  justify-content: center;
  padding: 80px 20px;
  gap: 1rem;
}

.explore-page .timeline-loading-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.03em;
}

.explore-page .timeline-loading-bar {
  width: 140px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.explore-page .timeline-loading-bar-fill {
  background: linear-gradient(90deg, transparent, var(--color-primary, #00a8ff), transparent);
  animation: loadingBar 1.5s ease-in-out infinite;
}

/* @keyframes loadingBar defined in timeline-carousel.css */

/* ============================================================================
   Explore Page Embed Styles
   Base embed styles in components/timeline-carousel.css
   These are explore-specific extensions
   ============================================================================ */

/* Tweet expand overlay for compact tweets - glassmorphism pill */
/* Only show when card is featured */
.tweet-expand-overlay {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: auto;
}

/* Show overlay only when card is featured - carousel styles in timeline-carousel.css */

/* Show media button - blue outline glow style */
.tweet-expand-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  background: transparent;
  color: var(--color-primary, #00a8ff);
  border: 1px solid var(--color-primary, #00a8ff);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 8px rgba(0, 168, 255, 0.3);
}

.tweet-expand-btn:hover {
  background: rgba(0, 168, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 168, 255, 0.5);
}

.tweet-expand-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.tweet-expand-btn svg {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.tweet-view-link {
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.6));
  font-size: 0.65rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tweet-view-link:hover {
  color: var(--color-primary, #00a8ff);
  text-decoration: underline;
}

/* TikTok Embed Wrapper - explore page specific */
.tiktok-embed-wrapper {
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.tiktok-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Instagram Embed Wrapper */
.instagram-embed-wrapper {
  width: 100%;
  height: 100%;
  min-height: 600px;
}

.instagram-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: none;
}

/* Chart Embed Wrapper */
.chart-embed-wrapper {
  width: 100%;
  height: 100%;
  min-height: 250px;
  padding: 1rem;
  box-sizing: border-box;
}

.chart-embed-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Take (Text) Embed */
.take-embed-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  box-sizing: border-box;
}

.take-embed-content p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-primary, white);
  text-align: center;
  font-style: italic;
}

/* Empty State for Timeline */
.timeline-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  color: var(--color-text-muted);
}

.timeline-empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.timeline-empty-state h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--color-text-secondary);
}

.timeline-empty-state p {
  margin: 0;
  font-size: 0.9rem;
}

/* ============================================================================
   Loading States
   ============================================================================ */

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 168, 255, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* @keyframes spin defined in loading-states.css */

/* ============================================================================
   Skeleton Loading Cards
   Carousel skeleton card styles moved to timeline-carousel.css
   ============================================================================ */

/* Skeleton content container */
.skeleton-post-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

/* Skeleton media placeholder - takes full card height */
.skeleton-media {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.03) 100%);
  border-radius: var(--radius-xl);
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 1200px) {
  .topic-preview-grid {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  /* .section-container responsive defined in section-container.css */

  .topic-preview-grid {
    grid-template-columns: repeat(2, 1fr);
    min-height: 200px;
  }

  .timeline-label-text {
    font-size: 28px;
    margin-top: 16px;
  }

  .timeline-action-btn {
    width: 36px;
    height: 36px;
  }

  .timeline-description {
    font-size: 15px;
  }

  .timeline-label {
    max-width: 100%;
    left: 0;
    transform: none;
  }
}

@media (max-width: 480px) {
  .topic-preview-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
  }

  .discovery-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .discovery-search-container {
    order: 0;
  }
}

/* Explore Page Carousel Responsive Overrides moved to timeline-carousel.css */

@media (max-width: 768px) {
  .scrollbar-post-item {
    width: 100px;
    height: 70px;
  }

  .timeline-scrollbar-container {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .scrollbar-post-item {
    width: 80px;
    height: 60px;
  }

  .scrollbar-post-title {
    font-size: 0.5rem;
    -webkit-line-clamp: 1;
  }
}

/* ============================================================================
   Timeline Title Animation
   ============================================================================ */

/* Title and subtitle - visible by default for dynamic updates */
.timeline-label-text,
.timeline-label .timeline-description {
  opacity: 1;
  transform: none;
}

/* Initial load animation - only applies before JS has initialized */
.timeline-label-text.initial-animate {
  opacity: 0;
  transform: translateY(20px);
  animation: titleFadeIn 0.8s ease-out 0.3s forwards;
}

.timeline-label .timeline-description.initial-animate {
  opacity: 0;
  transform: translateY(15px);
  animation: titleFadeIn 0.6s ease-out 0.6s forwards;
}

@keyframes titleFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   Scroll Animations & Ambient Motion
   ============================================================================ */

/* Base state for scroll-animated elements */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================================
   Ambient Background Elements - Network Animation
   ============================================================================ */

/* Ambient orbs canvas - subtle glowing background */
.ambient-orbs-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Gentle float animation for cards on hover */
.hover-float {
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.hover-float:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   Animated Section Transitions
   ============================================================================ */

/* Timeline section entrance */
.explore-timeline-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.explore-timeline-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Discovery bar subtle entrance */
.discovery-bar-section {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  /* Maintain high z-index so tooltip appears above content sections below */
  z-index: 1000;
}

.discovery-bar-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
   Reduced Motion Support
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  .scroll-fade-in,
  .explore-timeline-section,
  .discovery-bar-section,
  .timeline-label-text.initial-animate,
  .timeline-label .timeline-description.initial-animate {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .ambient-orbs-canvas {
    animation: none;
    display: none;
  }

  .hover-float:hover {
    transform: none;
  }
}

/* ============================================================================
   Topic Page Two-Panel Layout (Timeline + Discussion)
   ============================================================================ */

.topic-panels-section {
  padding: 2rem 0;
}

.topic-panels-header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Topic Filter Bar */
.topic-filter-bar-wrapper {
  margin-bottom: 1rem;
}

.topic-filter-bar-wrapper .discovery-bar {
  justify-content: center;
}

.topic-filter-bar-wrapper .discovery-links-wrapper {
  flex: 0 1 auto;
  max-width: 100%;
}

.topic-filter-bar-wrapper .discovery-links {
  justify-content: center;
}

/* Empty state when no posts match filter */
.timeline-filter-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  gap: 1rem;
}

.timeline-filter-empty p {
  margin: 0;
  font-size: 0.9rem;
}

.btn-clear-filters {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.btn-clear-filters:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.topic-panels-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* Outer layout for explore page - container + topics side panel */
.explore-vertical-outer-layout {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 1.5rem;
  align-items: stretch;
  /* No max-width - fills the section-container to align with featured section above */
}

/* Contained layout for explore page vertical timeline (two panels) */
.explore-panels-wrapper .topic-panels-layout {
  /* Left timeline has max-width slightly wider than card max-width (560px + padding), right expands freely */
  grid-template-columns: minmax(auto, 620px) 1fr;
  gap: 0; /* No gap - panels share container */
  padding: 0; /* No padding on wrapper - header spans full width */
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  padding-left: 3rem; /* Extra space for the timeline bar */
  padding-right: 1.5rem;
  box-sizing: border-box;
  position: relative;
  /* Fixed height for container */
  height: 700px;
  min-height: 400px;
}

/* Topics side panel (outside the main container) */
.explore-topics-side-panel {
  display: flex;
  flex-direction: column;
  /* Match the container height */
  height: 700px;
  min-height: 400px;
}

.explore-topics-side-panel .vertical-topics-carousel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.25rem;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.explore-topics-side-panel .vertical-topics-carousel::-webkit-scrollbar {
  display: none;
}

/* Topic cards in vertical layout - full width */
.explore-topics-side-panel .trending-topic-card {
  width: 100%;
  height: 90px;
  flex-shrink: 0;
}

/* Timeline panel - no individual container styling */
.explore-panels-wrapper .topic-panel-timeline-vertical {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  padding-right: 2rem; /* Space between timeline and discussion */
  position: relative;
}

/* Divider between timeline and discussion */
.explore-panels-wrapper .topic-panel-timeline-vertical::after {
  content: '';
  position: absolute;
  right: 0;
  top: 2.5rem; /* Below the header */
  bottom: 1.5rem; /* Above the bottom padding */
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* Timeline bar positioned inside the container */
.explore-panels-wrapper .vertical-timeline-bar {
  position: absolute;
  left: 1rem;
  top: 2.5rem; /* Below the header */
  bottom: 1.5rem;
  width: 24px;
  display: flex;
  justify-content: center;
  z-index: 10;
}

.explore-panels-wrapper .vertical-timeline-bar .vertical-timeline-track {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
}

.explore-panels-wrapper .vertical-timeline-bar .vertical-timeline-glow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
}

.explore-panels-wrapper .vertical-timeline-bar .vertical-timeline-ticks {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

.explore-panels-wrapper .vertical-timeline-posts {
  padding-left: 0;
  padding-right: 0;
}

/* Discussion panel - no container styling, just padding */
.explore-panels-wrapper .topic-panel-discussion {
  background: transparent;
  border: none;
  border-radius: 0;
  padding-left: 2rem; /* Space from divider */
}

/* Post Metadata Panel */
.topic-panel-metadata {
  padding: 1rem;
  margin: 0 auto;
  min-width: 450px;
}

.topic-panel-metadata .topic-panel-content {
  padding: 0;
}

.post-metadata-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Author section */
.metadata-author-section {
  display: flex;
  align-items: center;
}

.metadata-author-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.metadata-author-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.metadata-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(var(--color-primary-rgb, 0, 168, 255), 0.4);
  flex-shrink: 0;
}

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

.metadata-author-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.metadata-author-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary, white);
}

.metadata-author-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Topics section */
.metadata-topics-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.metadata-section-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metadata-topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.metadata-topic-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: white;
  background: rgba(0, 168, 255, 0.15);
  border: 1px solid rgba(0, 168, 255, 0.4);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.metadata-topic-tag:hover {
  background: rgba(0, 168, 255, 0.25);
  border-color: rgba(0, 168, 255, 0.6);
}

/* Stats section */
.metadata-stats-section {
  display: flex;
  gap: 1.5rem;
}

.metadata-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.metadata-stat-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-primary, white);
}

.metadata-stat-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Individual Panels */
.topic-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.topic-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.topic-panel-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  letter-spacing: -0.01em;
}

.panel-live-indicator {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-live-indicator .live-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-green 2s infinite;
}

.topic-panel-content {
  padding: 1rem;
}

/* ============================================================================
   Vertical Timeline
   ============================================================================ */

.topic-panel-timeline-vertical {
  display: flex;
  gap: 0;
  max-height: 700px;
  min-height: 400px;
  position: relative;
}

/* Vertical Timeline Bar - Glowing blue bar on left side of viewport */
.vertical-timeline-bar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  z-index: 100;
  display: none; /* Hidden by default, shown when vertical view is active */
  justify-content: center;
  pointer-events: none;
}

.vertical-timeline-bar .vertical-timeline-track,
.vertical-timeline-bar .vertical-timeline-ticks {
  pointer-events: auto;
}

.vertical-timeline-bar .vertical-timeline-track {
  position: relative;
  width: 2px;
  height: 100%;
  background: transparent;
  border-radius: 1px;
}

.vertical-timeline-bar .vertical-timeline-glow {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--color-primary, #00a8ff) 10%,
    var(--color-primary, #00a8ff) 90%,
    transparent 100%
  );
  opacity: 0.6;
  filter: blur(1px);
  border-radius: 1px;
}

/* Vertical Timeline Ticks - match horizontal bar style */
.vertical-timeline-ticks {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
}

.vertical-timeline-tick {
  position: absolute;
  left: 100%;
  right: auto;
  transform: translateY(-50%);
  width: 12px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

/* Extended hover area for easier interaction */
.vertical-timeline-tick::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -8px;
  right: -8px;
  bottom: -12px;
}

.vertical-timeline-tick:hover {
  background: var(--color-primary, #00a8ff);
  box-shadow: 0 0 8px rgba(0, 168, 255, 0.5);
  width: 16px;
}

.vertical-timeline-tick.active {
  background: var(--color-primary, #00a8ff);
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.7);
  width: 18px;
  height: 3px;
}

/* Date label - only visible on active tick (matching scroll position) */
.vertical-timeline-tick::after {
  content: attr(data-date);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.vertical-timeline-tick.active::after {
  opacity: 1;
}

/* Vertical Timeline Posts (scrollable area) */
.vertical-timeline-posts {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.5rem 1rem 0.25rem; /* Minimal left padding - timeline bar is fixed to viewport */
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.vertical-timeline-posts::-webkit-scrollbar {
  display: none;
}

/* Individual Timeline Post - vertical layout with actions on outside edge */
.vertical-timeline-post {
  position: relative;
  border-radius: var(--radius-md);
  overflow: visible;
  background: var(--color-bg-card, #0d1b2a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  margin-bottom: 0.5rem;
  /* Keep vertical flex for embed content */
  display: flex;
  flex-direction: column;
}

.vertical-timeline-post:last-of-type {
  margin-bottom: 0.5rem;
}

/* Featured (active) post in center - like horizontal carousel */
.vertical-timeline-post.featured {
  border-color: rgba(255, 255, 255, 0.2);
  z-index: 5;
}

/* Adjacent posts (faded) - like horizontal carousel */
.vertical-timeline-post:not(.featured) {
  opacity: 0.5;
  filter: brightness(0.7);
  transform: scale(0.95);
}

.vertical-timeline-post:hover:not(.featured) {
  opacity: 0.8;
  filter: brightness(0.85);
}

.vertical-timeline-post:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Hide action buttons in vertical timeline */
.vertical-timeline-post .carousel-card-actions {
  display: none !important;
}

/* Twitter embed in vertical timeline - transparent background (matches horizontal) */
.vertical-timeline-post.twitter-embed-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  /* Reduce bottom margin to compensate for scale(0.85) creating extra space */
  margin-bottom: -4rem;
}

/* ============================================================================
   Page Embed Card in Vertical Timeline
   Matches the exact styling of featured page card on explore page
   ============================================================================ */

/* Page card container - match chart width, no outline border */
.vertical-timeline-post.page-embed-card {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
  border-radius: 16px;
}

/* Hide external topic pills for page cards */
.vertical-timeline-post.page-embed-card .vertical-topics {
  display: none !important;
}

/* Override container to allow absolute positioning */
.vertical-timeline-post.page-embed-card .post-embed-container {
  display: block;
  position: relative;
  min-height: 280px; /* Match chart height */
  border-radius: 16px;
  overflow: hidden;
}

/* Media wrapper - full bleed background with rounded corners */
.vertical-timeline-post.page-embed-card .page-embed-media-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 16px;
}

/* Media element - fills the container */
.vertical-timeline-post.page-embed-card .page-embed-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* Placeholder when no image */
.vertical-timeline-post.page-embed-card .page-embed-media-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.3) 0%, rgba(0, 80, 120, 0.5) 100%);
  border-radius: 16px;
}

/* Gradient overlay */
.vertical-timeline-post.page-embed-card .page-embed-overlay {
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.1) 70%,
    transparent 100%
  );
}

/* Content area - positioned at bottom */
.vertical-timeline-post.page-embed-card .page-embed-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  z-index: 2;
}

/* Topics container - displayed above title */
.vertical-timeline-post.page-embed-card .page-embed-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

/* Topic pill */
.vertical-timeline-post.page-embed-card .page-embed-topic {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Title */
.vertical-timeline-post.page-embed-card .page-embed-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin: 0 0 0.3rem 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Description */
.vertical-timeline-post.page-embed-card .page-embed-description {
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ============================================================================
   Page Embed Card in Carousel and Grid Views
   ============================================================================ */

/* Container needs to allow absolute children to position properly */
.carousel-post-card.page-embed-card .post-embed-container,
.explore-grid-card.page-embed-card .grid-card-embed-container {
  /* Keep position but ensure it's a positioning context (it already is with absolute) */
  display: block; /* Override flex to allow absolute children to work properly */
  background: transparent; /* Remove the dark background for page embeds */
}

/* Page type indicator in carousel/grid cards */
.carousel-post-card.page-embed-card .page-type-indicator,
.explore-grid-card.page-embed-card .page-type-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  width: auto;
  height: auto;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.carousel-post-card.page-embed-card .page-type-indicator svg,
.explore-grid-card.page-embed-card .page-type-indicator svg {
  width: 12px;
  height: 12px;
}

/* Media wrapper for carousel/grid page cards */
.carousel-post-card.page-embed-card .page-embed-media-wrapper,
.explore-grid-card.page-embed-card .page-embed-media-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.carousel-post-card.page-embed-card .page-embed-media,
.explore-grid-card.page-embed-card .page-embed-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-post-card.page-embed-card .page-embed-media-placeholder,
.explore-grid-card.page-embed-card .page-embed-media-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.3) 0%, rgba(0, 80, 120, 0.5) 100%);
}

.carousel-post-card.page-embed-card .page-embed-overlay,
.explore-grid-card.page-embed-card .page-embed-overlay {
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.1) 70%,
    transparent 100%
  );
}

.carousel-post-card.page-embed-card .page-embed-content,
.explore-grid-card.page-embed-card .page-embed-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  z-index: 2;
}

.carousel-post-card.page-embed-card .page-embed-topics,
.explore-grid-card.page-embed-card .page-embed-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.4rem;
}

.carousel-post-card.page-embed-card .page-embed-topic,
.explore-grid-card.page-embed-card .page-embed-topic {
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.carousel-post-card.page-embed-card .page-embed-title,
.explore-grid-card.page-embed-card .page-embed-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  margin: 0 0 0.2rem 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.carousel-post-card.page-embed-card .page-embed-description,
.explore-grid-card.page-embed-card .page-embed-description {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Hide the default grid overlay for page-embed cards (they have their own overlay) */
.explore-grid-card.page-embed-card .explore-grid-card-overlay {
  display: none;
}

/* ============================================================================
   Featured Embed Card (page/collection/timeline types - new structure)
   Matches sidebar featured card styling with type pill, title, desc, author
   ============================================================================ */

/* Container styling for featured embed cards */
.carousel-post-card.featured-embed-card .post-embed-container,
.explore-grid-card.featured-embed-card .grid-card-embed-container {
  display: block;
  background: transparent;
}

/* Hide default overlays for featured cards */
.explore-grid-card.featured-embed-card .explore-grid-card-overlay {
  display: none;
}

/* Featured embed fills the card */
.featured-embed {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  background: #000;
}

.featured-embed-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a1a2e;
  transition: transform 0.4s ease;
  mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
}

.carousel-post-card.featured-embed-card:hover .featured-embed-bg,
.explore-grid-card.featured-embed-card:hover .featured-embed-bg {
  transform: scale(1.05);
}

/* Legacy gradient - now handled by mask-image on featured-embed-bg */
.featured-embed-gradient {
  display: none;
}

.featured-embed-type {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  z-index: 5;
}

.featured-embed-type svg {
  width: 14px;
  height: 14px;
}

.featured-embed-bottom {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 80px;
  z-index: 5;
}

.featured-embed-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.featured-embed-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.4;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-embed-author {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.featured-embed-author img {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px;
  max-width: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  object-fit: cover;
}

.featured-embed-author span {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Twitter tweet corner masking - scaled down for vertical timeline */
.vertical-timeline-post .twitter-tweet {
  margin: 0 auto !important;
  width: 100% !important;
  min-width: 280px !important;
  max-width: 350px !important;
  border-radius: 12px;
  overflow: visible;
  transform: scale(0.85);
  transform-origin: top center;
  background: transparent;
}

/* Tweet container - transparent background, no clipping */
.vertical-timeline-post .tweet-container {
  padding: 0;
  padding-bottom: 0.5rem;
  margin: 0;
  background: transparent;
  border-radius: 12px;
  overflow: visible;
}

/* Embed container - compact spacing */
.vertical-timeline-post .post-embed-container {
  padding: 0;
}

.vertical-timeline-post .twitter-tweet iframe {
  min-width: 400px !important;
  max-width: 100% !important;
  max-height: 100% !important;
  transform: scale(0.85);
  transform-origin: center center;
  border-radius: 12px !important;
  overflow: hidden !important;
  color-scheme: light !important;
}

/* YouTube embed in vertical timeline - constrain width and center */
.vertical-timeline-post.youtube-embed-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* YouTube responsive wrapper in vertical timeline - larger size */
.vertical-timeline-post .youtube-responsive-wrapper {
  max-height: 315px;
}

/* Chart post card in vertical timeline - constrain width and center */
.vertical-timeline-post.chart-embed-card {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Chart embed in vertical timeline - larger height */
.vertical-timeline-post .chart-embed-wrapper {
  position: relative;
  min-height: 200px;
  max-height: 300px;
  padding: 0.5rem;
}

.vertical-timeline-post .chart-embed-wrapper canvas {
  max-height: 280px !important;
}

/* Data table post card in vertical timeline - match chart width */
.vertical-timeline-post.data-table-embed-card {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Vertical timeline now uses carousel-card classes directly (carousel-card-topics, carousel-card-actions, carousel-action-btn)
   No separate vertical-specific styles needed - just inherit from horizontal carousel */

/* Create Card at top and bottom */
.vertical-timeline-create {
  display: block;
  text-decoration: none;
  margin-top: 0.5rem;
}

/* Top create button uses margin-bottom instead */
.vertical-timeline-create-top {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.vertical-create-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.vertical-timeline-create:hover .vertical-create-content,
.vertical-timeline-create:focus .vertical-create-content {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.5);
  color: var(--color-primary);
  border-style: solid;
}

.vertical-timeline-create:hover .vertical-create-content svg,
.vertical-timeline-create:focus .vertical-create-content svg {
  stroke: var(--color-primary);
}

/* Loading state for vertical timeline */
.vertical-timeline-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
  /* Match container glassmorphism - layer over page background */
  background: rgba(38, 40, 48, 0.98); /* Match page background gradient mid-tone */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20;
  border-radius: 16px; /* Match container border-radius */
}

/* Hide timeline bar and posts while loading */
.topic-panel-timeline-vertical.loading .vertical-timeline-bar {
  opacity: 0;
  visibility: hidden;
}

.topic-panel-timeline-vertical.loading .vertical-timeline-posts {
  opacity: 0;
  visibility: hidden;
}

/* Show posts when loaded */
.topic-panel-timeline-vertical .vertical-timeline-posts {
  transition: opacity 0.3s ease;
}

/* Discussion Panel Specific - Transparent like explore page */
.topic-panel-discussion {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  /* Match timeline height */
  min-height: 350px;
  max-height: 600px;
}

/* Hide header for discussion panel (no title/live indicator needed) */
.topic-panel-discussion .topic-panel-header {
  display: none;
}

.topic-panel-discussion .topic-panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.5rem 0;
}

/* Discussion Stream - Vertical scrolling in panel, fills available height */
.topic-discussion-stream {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  flex: 1;
  min-height: 200px;
  /* No max-height - fills container */
}

.topic-discussion-stream::-webkit-scrollbar {
  width: 4px;
}

.topic-discussion-stream::-webkit-scrollbar-track {
  background: transparent;
}

.topic-discussion-stream::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* Discussion items - Floating glassmorphism style (matches explore page) */
.topic-discussion-stream .discussion-item {
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.topic-discussion-stream .discussion-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.topic-discussion-stream .discussion-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  opacity: 0.85;
}

.topic-discussion-stream .discussion-content {
  flex: 1;
  min-width: 0;
}

.topic-discussion-stream .discussion-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}

.topic-discussion-stream .discussion-author {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.topic-discussion-stream .discussion-author:hover {
  color: var(--color-primary);
}

.topic-discussion-stream .discussion-time {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.3);
}

.topic-discussion-stream .discussion-text {
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  /* Allow text to wrap in panel cards */
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty state */
.topic-discussion-stream .discussion-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  min-height: 80px;
}

.topic-discussion-stream .discussion-empty-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
}

/* Input Row - Full width */
.topic-discussion-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.topic-discussion-input-row .discussion-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.topic-discussion-input-row .discussion-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.topic-discussion-input-row .discussion-input:focus {
  border-color: rgba(0, 168, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.2);
}

.topic-panel-discussion .discussion-hint {
  margin: 0.5rem 0 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

/* Logged in state - hide hint */
.topic-panels-section.logged-in .discussion-hint {
  display: none;
}

/* Responsive - Two Panel Layout */
@media (max-width: 1100px) {
  .topic-panels-layout {
    grid-template-columns: 1.5fr 1fr;
  }

  .explore-panels-wrapper .topic-panels-layout {
    /* Keep timeline max-width, let discussion fill remaining space */
    grid-template-columns: minmax(auto, 580px) 1fr;
    padding: 1.25rem;
    padding-left: 2.5rem;
  }
}

@media (max-width: 900px) {
  .topic-panels-layout {
    grid-template-columns: 1fr;
  }

  .explore-panels-wrapper .topic-panels-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
    padding-left: 2.5rem;
    gap: 1.5rem;
  }

  .explore-panels-wrapper .topic-panel-timeline-vertical {
    padding-right: 0;
  }

  .explore-vertical-outer-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .explore-panels-wrapper .topic-panels-layout {
    height: auto; /* Allow flexible height on smaller screens */
  }

  .explore-topics-side-panel {
    display: none; /* Hide side topics on small screens */
  }

  .explore-panels-wrapper .topic-panel-timeline-vertical::after {
    display: none; /* Hide divider in single column */
  }

  .explore-panels-wrapper .topic-panel-discussion {
    padding-left: 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .explore-panels-wrapper .vertical-timeline-bar {
    left: 0.75rem;
    top: 1rem;
    bottom: 1rem;
  }

  .topic-panel-timeline-vertical {
    max-height: 500px;
  }

  .topic-panel-discussion {
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .vertical-timeline-posts {
    padding: 1rem 1rem 1rem 0.25rem;
  }

  /* Reduce embed sizes on smaller screens */
  .vertical-timeline-post.youtube-embed-card,
  .vertical-timeline-post.chart-embed-card {
    max-width: 100%;
  }

  .vertical-timeline-post .youtube-responsive-wrapper {
    max-height: 220px;
  }

  .vertical-timeline-post .twitter-tweet iframe {
    min-width: 280px !important;
  }
}

@media (max-width: 480px) {
  .topic-panels-header {
    margin-bottom: 1.5rem;
  }

  .topic-panels-layout {
    gap: 1rem;
  }

  .topic-panel-timeline-vertical {
    max-height: 400px;
  }

  .topic-panel-discussion {
    max-height: 350px;
  }
}

/* =========================================================================
   Linked Post Indicator (for Discuss button)
   ========================================================================= */

.linked-post-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(0, 168, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 168, 255, 0.2);
  border-radius: 8px;
  animation: linkedPostSlideIn 0.2s ease-out;
}

@keyframes linkedPostSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.linked-post-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.linked-post-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary, #00a8ff);
  text-decoration: none;
  padding: 0.15rem 0.4rem;
  background: rgba(0, 168, 255, 0.15);
  border-radius: 4px;
  transition: all 0.15s ease;
}

.linked-post-link:hover {
  background: rgba(0, 168, 255, 0.25);
  color: #3dbfff;
}

.linked-post-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.15s ease;
}

.linked-post-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* =========================================================================
   Topic Page Leaderboard Section
   ========================================================================= */

.topic-leaderboard-section {
  padding: 2rem 0 3rem;
}

.topic-leaderboard-section .section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.topic-leaderboard-section .featured-section {
  margin-bottom: 2rem;
}

.topic-leaderboard-section .rankings-section {
  padding-top: 0;
}

/* Ensure proper spacing for nested sections */
.topic-leaderboard-section .timeline-title {
  margin-bottom: 0.5rem;
}

.topic-leaderboard-section .timeline-description {
  margin-bottom: 1.5rem;
}

/* =========================================================================
   Explore Timeline Section with View Toggle
   ========================================================================= */

.explore-timeline-section {
  position: relative;
  padding: 0;
  margin-bottom: 0;
}

.explore-panels-wrapper {
  width: 100%;
  margin-bottom: 1.5rem; /* Space between panels and toggle button */
}

/* Match vertical view section-container to featured section width */
.explore-panels-wrapper .section-container {
  max-width: 2200px;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* Timeline Tagline */
.timeline-tagline {
  text-align: center;
  font-size: 0.85rem;
  color: #fff;
  margin: 0.75rem 0 0.5rem;
  font-weight: 400;
  font-style: italic;
}

/* View Toggle Button Wrapper */
.timeline-view-toggle-wrapper {
  display: flex;
  justify-content: center;
  padding: 0.1rem 0 0.05rem;
}

/* Toggle Button - small glassmorphism rectangular pill */
.timeline-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.65rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-view-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.1);
}

.timeline-view-toggle:active {
  transform: scale(0.98);
}

.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.toggle-icon svg {
  width: 12px;
  height: 12px;
}

.toggle-text {
  white-space: nowrap;
}

/* Carousel Timeline Track and Glow styles moved to components/timeline-carousel.css */

/* Mobile responsiveness for toggle */
@media (max-width: 768px) {
  .timeline-view-toggle {
    padding: 0.3rem 0.7rem;
    font-size: 0.6rem;
  }

  .toggle-icon {
    width: 12px;
    height: 12px;
  }

  .toggle-icon svg {
    width: 10px;
    height: 10px;
  }
}

/* ============================================================================
   View Toggle Button Group (3-button: Horizontal, Vertical, Grid)
   ============================================================================ */

.timeline-view-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.timeline-view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-view-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.timeline-view-toggle-btn.active {
  background: rgba(0, 168, 255, 0.2);
  color: var(--color-primary, #00a8ff);
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.25);
}

.timeline-view-toggle-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
}

/* Mobile responsiveness for toggle group */
@media (max-width: 768px) {
  .timeline-view-toggle-btn {
    width: 28px;
    height: 28px;
  }

  .timeline-view-toggle-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* ============================================================================
   Explore Grid View (Profile-style square cards)
   ============================================================================ */

.explore-grid-view-wrapper {
  padding: 1.5rem 2rem;
  max-width: 90%;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
}

/* Grid header - full viewport width like carousel header */
.recent-posts-header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  /* Full viewport width - matches carousel header */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0.75rem 2rem;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
  position: relative;
}

/* Separator line with gaps on each end - matches carousel header */
.recent-posts-header-grid::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.recent-posts-header-grid .recent-posts-label {
  font-size: 0.75rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  text-align: left;
}

.recent-posts-header-grid .recent-posts-label-suffix {
  display: none;
}

.explore-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-width: 100%;
  margin: 0;
  margin-top: 0.75rem;
}

/* Individual Grid Item - Square card style */
.explore-grid-card {
  position: relative;
  aspect-ratio: 1 / 1;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.explore-grid-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
  z-index: 10;
}

/* Grid card embed container - fills entire square */
.grid-card-embed-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.grid-card-embed-container .embed-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.grid-card-embed-container .embed-image,
.grid-card-embed-container .embed-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* YouTube in square grid - letterboxed */
.grid-card-embed-container .youtube-responsive-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.grid-card-embed-container .youtube-responsive-wrapper iframe {
  width: 100%;
  height: 100%;
}

/* Tweet in square grid - scaled to fit, centered by default */
.grid-card-embed-container .tweet-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center; /* Center tweets that fit within the card */
  justify-content: center;
  padding: 8px;
  overflow: hidden;
  background: transparent;
}

/* Top-align tweets that overflow the card height (class added via JS) */
.grid-card-embed-container .tweet-container.tweet-overflows {
  align-items: flex-start;
  padding-top: 12px; /* Small top padding for breathing room */
}

/* Override Twitter widget backgrounds in grid view to be transparent
   The Twitter widget adds its own dark blue background (#0d1b2a) that doesn't match our card bg */
.grid-card-embed-container .tweet-container .twitter-tweet,
.grid-card-embed-container .tweet-container .twitter-tweet-rendered,
.grid-card-embed-container .tweet-container .twitter-tweet-rendered-true {
  background: transparent !important;
  box-shadow: none !important;
}

.grid-card-embed-container .tweet-container iframe {
  max-height: 100% !important;
  transform: scale(0.85);
  transform-origin: center center; /* Default: scale from center for centered tweets */
  border-radius: 12px !important;
}

/* For overflowing tweets, scale from top so the top stays anchored */
.grid-card-embed-container .tweet-container.tweet-overflows iframe {
  transform-origin: top center;
}

/* Fix white corners on tweet embeds in grid */
.grid-card-embed-container .tweet-container iframe {
  color-scheme: light !important;
}

/* Take/text content in square grid */
.grid-card-embed-container .take-embed-content {
  position: absolute;
  inset: 0;
  padding: 1rem !important;
  font-size: 0.85rem !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg,
    rgba(var(--color-bg-card-rgb, 26, 26, 46), 0.98) 0%,
    rgba(var(--color-bg-base-rgb, 15, 15, 30), 0.95) 100%);
}

/* Chart in square grid */
.grid-card-embed-container .chart-embed-wrapper {
  width: 100%;
  height: 100%;
  padding: 12px;
}

/* Data table in square grid */
.grid-card-embed-container .data-table-embed {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-size: 0.7rem;
}

/* Grid item media (fallback) */
.explore-grid-card-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.1);
}

.explore-grid-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explore-grid-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
}

/* Platform badge - top right corner */
.explore-grid-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.explore-grid-card-badge img,
.explore-grid-card-badge svg {
  width: 14px;
  height: 14px;
}

/* Text preview for posts without media */
.explore-grid-card-text-preview {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: linear-gradient(135deg,
    rgba(var(--color-bg-card-rgb, 26, 26, 46), 0.98) 0%,
    rgba(var(--color-bg-base-rgb, 15, 15, 30), 0.95) 100%);
  overflow: hidden;
}

.explore-grid-card-text-preview .preview-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-primary, #fff);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.explore-grid-card-text-preview .preview-excerpt {
  font-size: 0.75rem;
  color: var(--color-text-secondary, rgba(255,255,255,0.7));
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Page post overlay (title/description on image) */
.explore-grid-card-page .explore-grid-card-media::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.5) 40%,
    rgba(0, 0, 0, 0.2) 70%,
    transparent 100%
  );
  z-index: 1;
}

.explore-grid-card-page-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.explore-grid-card-page-info .page-info-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.explore-grid-card-page-info .page-info-description {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Hover overlay with metadata */
.explore-grid-card-overlay {
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(0.75rem + 2px);
  padding-top: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
}

.explore-grid-card:hover .explore-grid-card-overlay {
  opacity: 1;
}

.explore-grid-card-overlay .overlay-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.explore-grid-card-overlay .overlay-meta {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.explore-grid-card-overlay .overlay-meta-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

/* Show More button */
.explore-grid-show-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 400px;
  margin: 1.5rem auto 0;
  padding: 12px 24px;
  background: transparent;
  border: 1px dashed rgba(0, 168, 255, 0.3);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.explore-grid-show-more:hover {
  border-color: rgba(0, 168, 255, 0.6);
  color: var(--color-primary, #00a8ff);
  background: rgba(0, 168, 255, 0.05);
}

.explore-grid-show-more svg {
  transition: transform 0.2s ease;
}

.explore-grid-show-more:hover svg {
  transform: translateY(2px);
}

/* Responsive Grid */
@media (max-width: 768px) {
  .explore-grid-view-wrapper {
    max-width: 100%;
    padding: 1rem;
    padding-top: 2.5rem;
  }

  .explore-grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .explore-grid-container {
    grid-template-columns: 1fr;
  }

  .explore-grid-card {
    aspect-ratio: 4 / 3;
  }
}

/* ============================================================================
   Grid Topics Carousel (for masonry grid view)
   ============================================================================ */

.grid-topics-carousel-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  box-sizing: border-box;
  overflow: visible;
  position: relative;
}

.grid-topics-carousel {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.75rem 0;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  /* Fade edges */
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 1) 2%,
    rgba(0, 0, 0, 1) 98%,
    transparent 100%
  );
  mask-image: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 1) 2%,
    rgba(0, 0, 0, 1) 98%,
    transparent 100%
  );
}

.grid-topics-carousel::-webkit-scrollbar {
  display: none;
}

/* Topic cards in grid layout carousel */
.grid-topics-carousel .trending-topic-card {
  width: 140px;
  height: 80px;
  flex-shrink: 0;
}

@media (max-width: 800px) {
  .grid-topics-carousel-wrapper {
    padding: 0.5rem 1rem;
  }

  .grid-topics-carousel .trending-topic-card {
    width: 120px;
    height: 70px;
  }
}

/* ============================================================================
   Masonry Grid View (Pinterest-style layout)
   ============================================================================ */

.explore-masonry-wrapper {
  padding: 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
}

.explore-masonry-grid {
  column-count: 4;
  column-gap: 16px;
}

/* Masonry item - breaks inside columns */
.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.masonry-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Tweet container in masonry - matches test/masonry-grid page exactly */
/* These rules must override the global .twitter-tweet styles in index-shared.css */
.masonry-item .tweet-container {
  padding: 0;
  min-height: 150px;
}

.masonry-item .tweet-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  gap: 12px;
}

.masonry-item .tweet-loading .loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #1da1f2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Override global twitter-tweet styles from index-shared.css for masonry */
.masonry-item .twitter-tweet,
.masonry-item .twitter-tweet-rendered,
.masonry-item .twitter-tweet-rendered-true {
  margin: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

/* Override global iframe scaling from index-shared.css for masonry */
.masonry-item .tweet-container iframe,
.masonry-item .twitter-tweet iframe,
.masonry-item .twitter-tweet-rendered-true iframe {
  border: none !important;
  max-width: 100% !important;
  transform: none !important;
}

/* YouTube in masonry */
.masonry-item .youtube-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.masonry-item .youtube-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* YouTube loading state - show high-res thumbnail while iframe loads */
.masonry-item .youtube-wrapper.youtube-loading .youtube-thumbnail-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  z-index: 2;
}

.masonry-item .youtube-wrapper.youtube-loading .youtube-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 3;
}

.masonry-item .youtube-wrapper.youtube-loading iframe {
  opacity: 0;
}

/* Hide thumbnail/overlay once iframe loads */
.masonry-item .youtube-wrapper:not(.youtube-loading) .youtube-thumbnail-placeholder,
.masonry-item .youtube-wrapper:not(.youtube-loading) .youtube-loading-overlay {
  display: none;
}

.masonry-item .youtube-wrapper:not(.youtube-loading) iframe {
  opacity: 1;
}

/* YouTube responsive wrapper in masonry - render iframe larger, scale down for sharper thumbnail */
.masonry-item .youtube-responsive-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.masonry-item .youtube-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  /* Render at 150% size so YouTube serves higher quality thumbnail, then scale to fit */
  width: 150%;
  height: 150%;
  border: none;
  transform: scale(0.6667);
  transform-origin: top left;
}

/* YouTube loading state - matches carousel behavior exactly */
.masonry-item .youtube-responsive-wrapper.youtube-loading .youtube-thumbnail-placeholder {
  display: block !important;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  z-index: 2;
}

.masonry-item .youtube-responsive-wrapper.youtube-loading .youtube-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  z-index: 3;
}

.masonry-item .youtube-responsive-wrapper.youtube-loading iframe {
  opacity: 0;
}

/* Once iframe loads, hide thumbnail and show iframe */
.masonry-item .youtube-responsive-wrapper:not(.youtube-loading) .youtube-thumbnail-placeholder,
.masonry-item .youtube-responsive-wrapper:not(.youtube-loading) .youtube-loading-overlay {
  display: none !important;
}

.masonry-item .youtube-responsive-wrapper:not(.youtube-loading) iframe {
  opacity: 1;
}

/* Instagram embed in masonry */
.masonry-item .instagram-container {
  position: relative;
  min-height: 200px;
  overflow: visible;
}

.masonry-item .instagram-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  gap: 12px;
}

.masonry-item .instagram-loading .loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #E4405F;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.masonry-item .instagram-media {
  margin: 0 !important;
  background: transparent !important;
}

/* Hide unprocessed Instagram blockquote while skeleton is showing */
.instagram-skeleton ~ blockquote.instagram-media {
  display: none !important;
}

/* Hide skeleton once embed.js has created the iframe */
.instagram-container:has(iframe) .instagram-skeleton {
  display: none !important;
}

/* Instagram skeleton placeholder */
.instagram-skeleton {
  background: #ffffff;
  border: 1px solid #dbdbdb;
  border-radius: 12px;
  overflow: hidden;
  min-height: 200px;
  width: calc(100% - 2px);
  min-width: 326px;
  max-width: 540px;
  position: relative;
  box-shadow: 0 0 1px 0 rgba(0,0,0,0.5), 0 1px 10px 0 rgba(0,0,0,0.15);
  margin: 1px;
}

.instagram-skeleton::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.03) 40%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 60%, transparent 100%);
  animation: instagram-skeleton-wave 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes instagram-skeleton-wave {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.instagram-skeleton-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

.instagram-skeleton-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #efefef;
  flex-shrink: 0;
}

.instagram-skeleton-username {
  height: 12px;
  width: 100px;
  background: #efefef;
  border-radius: 4px;
}

.instagram-skeleton-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #efefef;
  position: relative;
  overflow: hidden;
}

.instagram-skeleton-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.04) 50%, transparent 100%);
  animation: instagram-shimmer 1.5s ease-in-out infinite;
}

@keyframes instagram-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.instagram-skeleton-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.instagram-skeleton-image:has(img)::after {
  display: none;
}

.instagram-skeleton-view-more {
  padding: 12px 14px 0;
}

.instagram-skeleton-view-more a {
  color: #0095f6;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.instagram-skeleton-view-more a:hover {
  color: #1877f2;
}

.instagram-skeleton-separator {
  border: none;
  border-top: 1px solid #efefef;
  margin: 0;
}

.instagram-skeleton-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
}

.instagram-skeleton-actions-left {
  display: flex;
  gap: 16px;
}

.instagram-skeleton-actions svg {
  cursor: pointer;
}

.instagram-skeleton-likes {
  padding: 0 14px 4px;
  font-size: 14px;
  font-weight: 600;
  color: #262626;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.instagram-skeleton-comment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px 12px;
}

.instagram-skeleton-comment-row span {
  color: #8e8e8e;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.instagram-skeleton-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
  fill: #8e8e8e;
}

/* TikTok embed in masonry - must override parent .masonry-item overflow:hidden */
.masonry-item.library-item-tiktok {
  overflow: visible !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.masonry-item .tiktok-embed-container {
  overflow: visible;
}

.masonry-item .tiktok-embed-container iframe {
  height: 780px; /* Fixed height for TikTok's 9:16 ratio */
}

/* TikTok official embed blockquote */
.masonry-item .tiktok-embed {
  margin: 0 !important;
  max-width: 100% !important;
}

/* Media card in masonry */
.masonry-item .media-card {
  position: relative;
}

.masonry-item .media-card img,
.masonry-item .media-card video {
  width: 100%;
  display: block;
}

.masonry-item .media-card .card-overlay {
  position: absolute;
  inset: -2px;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.masonry-item .media-card .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.masonry-item .media-card .card-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Media card no-image fallback */
.masonry-item .media-card.no-image {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.masonry-item .media-card .media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}

.masonry-item .media-card .media-placeholder svg {
  width: 40px;
  height: 40px;
  fill: rgba(255, 255, 255, 0.5);
}

.masonry-item .media-card .media-placeholder span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* TikTok Embed Container (direct iframe) */
.tiktok-embed-container {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: visible;
}

.tiktok-embed-container iframe {
  display: block;
  width: 100%;
  height: 780px; /* Fixed height for TikTok's 9:16 ratio */
  border: none;
  border-radius: 0;
}

/* TikTok Embed Fallback */
.tiktok-embed-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: #1a1a1a;
}

.tiktok-embed-fallback a {
  color: #00f2ea;
  text-decoration: none;
  font-weight: 500;
  padding: 12px 24px;
  border: 1px solid #00f2ea;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.tiktok-embed-fallback a:hover {
  background: #00f2ea;
  color: #000;
}

/* Take/text cards in masonry */
.masonry-item .take-card {
  padding: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.masonry-item .take-card .take-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 8px;
  line-height: 1.4;
}

.masonry-item .take-card .take-description {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

.masonry-item .take-card .take-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.masonry-item .take-card .topic-pill {
  background: rgba(0, 168, 255, 0.15);
  border: 1px solid rgba(0, 168, 255, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: rgba(0, 168, 255, 0.9);
}

/* Type indicator badge - bottom right */
.masonry-item .type-indicator {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 5;
}

.masonry-item .type-indicator svg {
  width: 12px;
  height: 12px;
}

/* Primary topic pill - top left (standardized featured card style) */
.masonry-item .topic-pill-header {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  background: rgba(0, 168, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--color-primary, #00a8ff);
  z-index: 5;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.15s ease;
}

.masonry-item .topic-pill-header:hover {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.4);
  transform: scale(1.05);
}

/* Featured cards (page, collection, timeline) in masonry */
.masonry-item .featured-card {
  position: relative;
  min-height: 220px;
}

.masonry-item .featured-card .featured-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.masonry-item .featured-card .featured-overlay {
  position: absolute;
  inset: -2px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
}

.masonry-item .featured-card .featured-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
}

.masonry-item .featured-card .featured-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.masonry-item .featured-card .featured-description {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.masonry-item .featured-card .featured-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}

.masonry-item .featured-card .featured-author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.masonry-item .featured-card .featured-author img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* Featured embed cards (page, collection, timeline) in masonry - newer structure */
.masonry-item .featured-embed {
  position: relative;
  min-height: 220px;
  background: #000;
}

.masonry-item .featured-embed .featured-embed-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a1a2e;
  mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
}

.masonry-item:hover .featured-embed .featured-embed-bg {
  transform: scale(1.05);
}

/* Legacy gradient - now handled by mask-image on featured-embed-bg */
.masonry-item .featured-embed .featured-embed-gradient {
  display: none;
}

.masonry-item .featured-embed .featured-embed-type {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  z-index: 5;
}

.masonry-item .featured-embed .featured-embed-type svg {
  width: 14px;
  height: 14px;
}

.masonry-item .featured-embed .featured-embed-bottom {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 80px;
  z-index: 5;
}

.masonry-item .featured-embed .featured-embed-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.masonry-item .featured-embed .featured-embed-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.masonry-item .featured-embed .featured-embed-author {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
}

.masonry-item .featured-embed .featured-embed-author img {
  width: 28px;
  height: 28px;
  min-width: 28px;
  max-width: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  object-fit: cover;
}

.masonry-item .featured-embed .featured-embed-author span {
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Chart container in masonry */
.masonry-item .chart-container {
  padding: 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
  min-height: 200px;
  max-height: 280px;
  overflow: hidden;
}

.masonry-item .chart-container .chart-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  line-height: 1.3;
}

.masonry-item .chart-container .chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
}

.masonry-item .chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.masonry-item .chart-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.masonry-item .chart-placeholder svg {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.masonry-item .chart-placeholder .chart-type-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-top: 4px;
}

/* Data table in masonry */
.masonry-item .data-table-card {
  padding: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.masonry-item .data-table-card .data-table-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  line-height: 1.3;
}

.masonry-item .data-table-card .data-table-wrapper {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.masonry-item .data-table-card .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.masonry-item .data-table-card .data-table th {
  padding: 6px 8px;
  text-align: left;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.65rem;
}

.masonry-item .data-table-card .data-table td {
  padding: 5px 8px;
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.masonry-item .data-table-card .data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.masonry-item .data-table-card .data-table-more {
  margin-top: 8px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* Show more button for masonry */
.explore-masonry-show-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 24px;
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.explore-masonry-show-more:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

.explore-masonry-show-more svg {
  transition: transform 0.2s ease;
}

.explore-masonry-show-more:hover svg {
  transform: translateY(2px);
}

/* Masonry grid loading state */
.explore-masonry-grid .masonry-loading {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.5);
  break-inside: avoid;
}

/* Responsive masonry */
@media (max-width: 1000px) {
  .explore-masonry-grid {
    column-count: 3;
  }
}

@media (max-width: 800px) {
  .explore-masonry-grid {
    column-count: 2;
  }

  .explore-masonry-wrapper {
    padding: 1rem;
  }
}

@media (max-width: 500px) {
  .explore-masonry-grid {
    column-count: 1;
  }
}

/* ESPN Preview Cards (shared across all pages) */
.espn-preview {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.espn-preview img {
  width: 100%;
  height: auto;
  display: block;
  mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
}

.espn-preview-overlay {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.espn-preview-overlay h3 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.espn-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.espn-preview-link:hover {
  color: #fff;
}

.espn-preview-no-image {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.espn-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 24px;
}

.espn-preview-placeholder h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Substack preview cards */
.substack-preview {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.substack-preview img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 300px;
  object-fit: cover;
}

.substack-preview-overlay {
  position: absolute;
  inset: -2px;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9) 80%, rgba(0, 0, 0, 1));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.substack-preview-overlay h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.substack-preview-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.substack-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #ff6719;
  text-decoration: none;
  transition: color 0.2s ease;
}

.substack-preview-link:hover {
  color: #ff8c4d;
}

.substack-preview-profile {
  background: linear-gradient(135deg, rgba(255, 103, 25, 0.15) 0%, rgba(255, 103, 25, 0.05) 100%);
  border: 1px solid rgba(255, 103, 25, 0.2);
  border-radius: 12px;
  padding: 32px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.substack-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: 400px;
}

.substack-profile-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 103, 25, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.substack-profile-icon svg {
  color: #ff6719;
}

.substack-profile-icon .substack-profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.substack-profile-author {
  font-size: 0.9rem;
  color: #ff6719;
  font-weight: 500;
}

.substack-profile-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.substack-profile-desc {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.masonry-item:has(.substack-preview),
.library-item:has(.substack-preview) {
  border: none !important;
  background: transparent !important;
}

/* ============================================================================
   Timeline Context Panels (Topic Card + Global Discussion)
   ============================================================================ */

.timeline-context-panels {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  margin-top: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Left: Context Topic Card (Square) */
.context-topic-card {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.context-topic-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.context-topic-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--color-surface-secondary, #1a1a2e);
  transition: transform 0.4s ease;
}

.context-topic-link:hover .context-topic-media {
  transform: scale(1.05);
}

.context-topic-overlay {
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
  transition: background 0.3s ease;
}

.context-topic-link:hover .context-topic-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

.context-topic-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  z-index: 2;
}

.context-topic-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Right: Global Discussion Panel - Floating/Transparent Style */
.context-discussion-panel {
  display: flex;
  flex-direction: column;
  /* No background, border, or border-radius - fully transparent */
  background: transparent;
  border: none;
  min-height: 280px;
  overflow: visible;
  /* Overlap with topic card */
  margin-left: -2rem;
  padding-left: 0.5rem;
}

.context-discussion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 0.75rem 0;
  /* No background or border - transparent header */
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.context-discussion-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  letter-spacing: 0.02em;
}

.context-discussion-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: visible;
}

.context-discussion-stream {
  flex: 1;
  overflow-y: auto;
  overflow-x: visible;
  padding: 0.25rem 0.25rem 0.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Discussion input row - floating glassmorphism style */
.context-discussion-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0 0rem 0;
  margin-top: 0.5rem;
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.context-discussion-input-row .discussion-input {
  flex: 1;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--color-text-primary);
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.context-discussion-input-row .discussion-input::placeholder {
  color: var(--color-text-muted);
}

.context-discussion-input-row .discussion-input:focus {
  outline: none;
  border-color: rgba(0, 168, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 8px rgba(0, 168, 255, 0.2);
}

.context-discussion-input-row .discussion-submit-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary, #00a8ff);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.context-discussion-input-row .discussion-submit-btn:disabled {
  background: var(--color-surface-secondary, rgba(255, 255, 255, 0.1));
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.context-discussion-input-row .discussion-submit-btn:not(:disabled):hover {
  background: var(--color-primary-hover, #33b5ff);
  transform: scale(1.05);
}

/* Discussion hint - hidden by default, shown when needed */
.context-discussion-content .discussion-hint {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.35);
  text-align: left;
  padding: 0.25rem 0 0;
  margin: 0;
  display: none;
}

/* Discussion info row - centered below input */
.discussion-info-row {
  display: flex;
  justify-content: center;
}

/* Discussion info button (? circle) */
.discussion-info-btn {
  position: relative;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.6rem;
  font-weight: 600;
  cursor: help;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.discussion-info-btn:hover {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.4);
  color: var(--color-primary, #00a8ff);
}

/* Tooltip for info button */
.discussion-info-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 220px;
  padding: 0.6rem 0.75rem;
  background: rgba(20, 30, 45, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100;
}

.discussion-info-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  margin-left: -5px;
  width: 10px;
  height: 10px;
  background: rgba(20, 30, 45, 0.95);
  border-right: 1px solid rgba(0, 168, 255, 0.3);
  border-bottom: 1px solid rgba(0, 168, 255, 0.3);
  transform: rotate(45deg);
}

.discussion-info-btn:hover .discussion-info-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Loading state */
.context-discussion-stream .discussion-loading {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.context-discussion-stream .discussion-loading-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .timeline-context-panels {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .context-topic-card {
    aspect-ratio: 16 / 9;
    max-height: 200px;
  }

  .context-discussion-panel {
    min-height: 250px;
    overflow: visible;
    margin-left: 0;
    padding-left: 0;
  }
}

/* ============================================================================
   Uploaded Media Count Badge (for carousel/timeline cards with multiple items)
   ============================================================================ */

.uploaded-media-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  z-index: 5;
  pointer-events: none;
}

.uploaded-media-embed {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Data Table Embed for Carousel/Timeline */
.data-table-embed {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.data-table-embed-wrapper {
  flex: 1;
  overflow: hidden;
  padding: 0.5rem;
}

.data-table-embed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.data-table-embed-table th {
  background: var(--color-bg-tertiary);
  padding: 0.375rem 0.5rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.data-table-embed-table td {
  padding: 0.25rem 0.5rem;
  color: var(--color-text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.data-table-embed-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.data-table-more-rows {
  padding: 0.375rem 0.5rem;
  font-size: 0.65rem;
  color: var(--color-text-muted);
  background: var(--color-bg-tertiary);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================================================
   Two-Panel Section: Topics + Leaderboard
   ============================================================================ */

.explore-two-panel-section {
  position: relative;
  overflow: hidden;
  padding: 1rem 0 0.5rem;
  /* Scroll-triggered animation - starts invisible */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  /* Ensure this section stays below discovery-bar-section (z-index: 1000) */
  /* so the "?" tooltip can appear above the trending panel */
  z-index: 1;
}

.explore-two-panel-section.scroll-visible {
  opacity: 1;
  transform: translateY(0);
}

.explore-two-panel-section .section-container {
  max-width: none;
  width: 100%;
  padding: 0 4rem;
  box-sizing: border-box;
}

.explore-two-panel-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem; /* Slightly reduced gap between panels */
  align-items: stretch;
}

.explore-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.explore-panel-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 1rem;
  text-align: left;
}

/* 3-column topic grid for left panel (legacy) */
.topic-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================================================
   Three-Column Layout (Action Buttons | Page Preview | Trending Posts)
   ============================================================================ */

.explore-three-column-layout {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  gap: 1.5rem;
  align-items: start;
  min-height: 520px;
}

.explore-three-column-layout .explore-panel-pages {
  height: 520px;
}

.explore-three-column-layout .explore-panel-trending {
  height: 520px;
}

.explore-three-column-layout .explore-panel-top-users {
  height: 520px;
}

/* Action Buttons Column */
.explore-action-buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 520px;
  gap: 0.75rem;
}

.explore-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.2s ease;
  gap: 0.35rem;
}

.explore-action-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.explore-action-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.action-btn-label {
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

/* Action button variants */
.explore-action-btn-create:hover {
  border-color: rgba(0, 200, 120, 0.4);
  color: #00c878;
  box-shadow: 0 4px 20px rgba(0, 200, 120, 0.15);
}

.explore-action-btn-explore:hover {
  border-color: rgba(0, 168, 255, 0.4);
  color: #00a8ff;
  box-shadow: 0 4px 20px rgba(0, 168, 255, 0.15);
}

.explore-action-btn-topics:hover {
  border-color: rgba(168, 85, 247, 0.4);
  color: #a855f7;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.15);
}

.explore-action-btn-leaderboard:hover {
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.15);
}

/* Responsive: Three-column layout */
@media (max-width: 1100px) {
  .explore-three-column-layout {
    grid-template-columns: 1fr 2.5fr 1fr;
  }

  .explore-action-btn {
    width: 64px;
    height: 64px;
  }

  .explore-action-btn svg {
    width: 20px;
    height: 20px;
  }

  .action-btn-label {
    font-size: 0.55rem;
  }
}

@media (max-width: 900px) {
  .explore-three-column-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .explore-action-buttons {
    flex-direction: row;
    justify-content: center;
    height: auto;
    gap: 0.75rem;
    order: -1;
  }

  .explore-action-btn {
    width: 70px;
    height: 70px;
  }

  .explore-action-btn svg {
    width: 22px;
    height: 22px;
  }

  .action-btn-label {
    font-size: 0.55rem;
  }

  .explore-three-column-layout .explore-panel-pages {
    height: 400px;
  }

  .explore-three-column-layout .explore-panel-trending {
    height: 300px;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .explore-action-buttons {
    gap: 0.5rem;
  }

  .explore-action-btn {
    width: 60px;
    height: 60px;
  }

  .explore-action-btn svg {
    width: 18px;
    height: 18px;
  }

  .action-btn-label {
    font-size: 0.5rem;
  }

  .explore-three-column-layout .explore-panel-pages {
    height: 350px;
  }
}

/* ============================================================================
   Section Separator (between featured and timeline sections)
   ============================================================================ */

.section-separator {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 1rem;
}

.section-separator-line {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 168, 255, 0.3) 20%,
    rgba(0, 168, 255, 0.5) 50%,
    rgba(0, 168, 255, 0.3) 80%,
    transparent 100%
  );
  border-radius: 1px;
}

/* ============================================================================
   Trending Topics Carousel Section
   ============================================================================ */

.trending-topics-section {
  padding: 0 0 1rem;
}

.trending-topics-carousel-wrapper {
  position: relative;
  /* Extend beyond container so fade happens outside container bounds */
  width: calc(100% + 120px);
  margin-left: -60px;
  margin-right: -60px;
}

/* Horizontal layout for topics carousel (in trending-topics-section wrapper) */
.trending-topics-carousel-wrapper .trending-topics-carousel {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.25rem 0;
  /* Use CSS mask - fade starts at 60px (container edge) and ends at edges */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 60px,
    black calc(100% - 60px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 60px,
    black calc(100% - 60px),
    transparent 100%
  );
}

.trending-topics-carousel-wrapper .trending-topics-carousel::-webkit-scrollbar {
  display: none;
}

.trending-topic-card {
  flex-shrink: 0;
  width: 140px;
  height: 90px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.trending-topic-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 168, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 168, 255, 0.1);
}

/* Topic filter card (button) - reset button styles */
button.topic-filter-card {
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

/* Active/selected state for topic filter cards */
.topic-filter-card.active {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(0, 168, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.topic-filter-card.active:hover {
  transform: translateY(-3px) scale(1.02);
}

.trending-topic-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
  mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
}

.trending-topic-card:hover .trending-topic-media {
  transform: scale(1.05);
}

.trending-topic-overlay {
  display: none;
}

.trending-topic-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem 0.65rem;
  box-sizing: border-box;
}

.trending-topic-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Responsive: Trending topics carousel */
@media (max-width: 600px) {
  .trending-topic-card {
    width: 120px;
    height: 75px;
  }

  .trending-topic-name {
    font-size: 0.7rem;
  }
}

/* ============================================================================
   Top Users Panel (Standalone Cards)
   ============================================================================ */

.top-users-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.top-users-loading {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}

/* Skeleton card for topic cards loading state */
.topic-skeleton-card {
  flex: 1;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.topic-skeleton-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer-slide 1.5s ease-in-out infinite;
}

.topic-skeleton-text {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  width: 60%;
  height: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.top-user-card {
  flex: 1;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  /* Entry animation */
  animation: slideInFromLeft 0.5s ease-out forwards;
  opacity: 0;
}

/* Staggered delays for topic cards */
.top-user-card:nth-child(1) { animation-delay: 0.05s; }
.top-user-card:nth-child(2) { animation-delay: 0.12s; }
.top-user-card:nth-child(3) { animation-delay: 0.19s; }

.top-user-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 168, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 168, 255, 0.1);
}

.top-user-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a1a2e;
  transition: transform 0.3s ease;
  mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
}

.top-user-card:hover .top-user-card-bg {
  transform: scale(1.05);
}

.top-user-card-overlay {
  display: none;
}

.top-user-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.6rem 0.75rem;
  box-sizing: border-box;
}

.top-user-username {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  max-width: 100%;
  display: block;
}

.top-user-no-image-cta {
  display: block;
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  margin-top: 0.25rem;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.top-user-no-image-cta .cta-link {
  color: var(--color-primary, #00a8ff);
  text-decoration: underline;
}

/* Responsive: Top users panel */
@media (max-width: 900px) {
  .explore-three-column-layout .explore-panel-top-users {
    height: auto;
    width: 100%;
  }

  .top-users-grid {
    flex-direction: row;
    height: 120px;
  }

  .top-user-card {
    flex: 1;
  }
}

/* ============================================================================
   Three-Panel Layout (Topics | Page Preview | Metadata) - LEGACY
   ============================================================================ */

.explore-three-panel-layout {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 1.5rem;
  align-items: start;
  min-height: 520px;
  margin-bottom: 0.5rem;
}

/* Left panel - fixed height, independent of center content */
.explore-panel-topics {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 520px; /* Fixed height - doesn't change with carousel */
}

/* Horizontal label below topics panel */
.topic-panel-label {
  text-align: center;
  margin-top: 0.5rem;
}

.topic-label-text {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* 2-column topic grid for left panel (3 rows x 2 cols = 6 cards) */
.topic-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.topic-grid-2col .topic-grid-card {
  width: 100%;
  height: 100%;
}

/* 1-column topic grid for left panel (legacy) */
.topic-grid-1col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  min-height: 0; /* Allow flex to shrink content */
}

.topic-grid-1col .topic-grid-card {
  width: 100%;
  flex: 1;
  min-height: 0;
  aspect-ratio: unset; /* Override aspect-ratio - let flex control height */
}

/* Left panel topic name - scale text to fit fixed container */
.topic-grid-1col .topic-preview-name {
  font-size: clamp(0.65rem, 2.5cqw, 0.85rem);
  word-break: break-word;
  hyphens: auto;
}

/* Left panel content container - enable container queries */
.topic-grid-1col .topic-preview-content {
  container-type: inline-size;
}

/* Trending Panel */
.explore-panel-trending {
  display: flex;
  flex-direction: column;
  height: 520px; /* Fixed height - matches left panel */
  overflow: hidden;
}

.trending-panel {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Entry animation */
  animation: slideInFromRight 0.5s ease-out forwards;
  animation-delay: 0.15s;
  opacity: 0;
}

.trending-header {
  padding: 0.875rem 1rem 0.625rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.trending-title {
  font-size: 0.75rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.trending-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.5rem;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.trending-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.trending-loading {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

/* Skeleton item for trending posts loading state */
.trending-skeleton-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.trending-skeleton-thumb {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.trending-skeleton-thumb::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer-slide 1.5s ease-in-out infinite;
}

.trending-skeleton-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.trending-skeleton-title {
  height: 0.75rem;
  width: 85%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.trending-skeleton-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer-slide 1.5s ease-in-out infinite;
}

.trending-skeleton-meta {
  height: 0.6rem;
  width: 50%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.trending-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
  font-size: 0.8rem;
  text-align: center;
}

.trending-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
  /* Entry animation */
  animation: fadeSlideUp 0.4s ease-out forwards;
  opacity: 0;
}

.trending-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

/* Staggered delays for trending items */
.trending-item:nth-child(1) { animation-delay: 0.25s; }
.trending-item:nth-child(2) { animation-delay: 0.32s; }
.trending-item:nth-child(3) { animation-delay: 0.39s; }
.trending-item:nth-child(4) { animation-delay: 0.46s; }
.trending-item:nth-child(5) { animation-delay: 0.53s; }
.trending-item:nth-child(6) { animation-delay: 0.60s; }

.trending-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.trending-item.active {
  background: rgba(0, 168, 255, 0.08);
  border: 1px solid rgba(0, 168, 255, 0.2);
}

.trending-item-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.trending-item-thumbnail img,
.trending-item-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-item-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.3));
}

.trending-item-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.65rem;
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
}

.trending-item-title {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-primary, #fff);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-item-author-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.trending-item-author {
  flex-shrink: 0;
  white-space: nowrap;
}

.trending-item-date {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Responsive: Three-panel layout */
@media (max-width: 1200px) {
  .explore-three-panel-layout {
    grid-template-columns: 260px 1fr 260px;
    gap: 1.25rem;
  }
}

@media (max-width: 1024px) {
  .explore-three-panel-layout {
    grid-template-columns: 220px 1fr 220px;
    gap: 1rem;
  }
}

@media (max-width: 900px) {
  .explore-three-panel-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
  }

  .explore-panel-topics {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    height: 180px; /* Shorter fixed height for tablet - horizontal layout */
  }

  .explore-panel-pages {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }

  .explore-panel-trending {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    height: 300px; /* Adjusted for tablet */
  }

  .topic-grid-2col {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }

  .topic-grid-1col {
    flex-direction: row;
  }

  .topic-grid-1col .topic-grid-card {
    flex: 1;
    aspect-ratio: 1 / 1;
  }

  .trending-panel {
    padding: 0;
  }
}

@media (max-width: 600px) {
  .explore-three-panel-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .explore-panel-topics,
  .explore-panel-pages,
  .explore-panel-trending {
    grid-column: 1 / 2;
    grid-row: auto;
    height: auto; /* On mobile, let height be auto since stacked vertically */
  }

  .explore-panel-topics {
    height: 120px; /* Compact horizontal row on mobile */
  }

  .topic-grid-1col {
    flex-direction: row;
  }

  .topic-grid-1col .topic-grid-card {
    flex: 1;
    aspect-ratio: 1.2 / 1;
  }

  .page-metadata-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
  }

  .metadata-divider {
    width: 1px;
    height: 40px;
    margin: 0;
  }

  .metadata-counts {
    flex-direction: row;
    gap: 1rem;
  }

  .metadata-activity {
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
  }
}

/* Responsive: Two-panel layout */
@media (max-width: 1024px) {
  .explore-two-panel-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .explore-panel-topics .explore-panel-heading,
  .explore-panel-leaderboard .explore-panel-heading {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .topic-grid-3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .explore-panel {
    padding: 1rem;
  }

  .explore-leaderboard-table {
    font-size: 0.8rem;
  }

  .explore-creator-name {
    max-width: 100px;
  }
}

@media (max-width: 480px) {
  .topic-grid-3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .explore-creator-avatar {
    width: 24px;
    height: 24px;
  }

  .explore-creator-name {
    max-width: 80px;
    font-size: 0.8rem;
  }
}

/* ============================================================================
   Two-Panel Section Title (uses .timeline-title)
   ============================================================================ */

.explore-two-panel-section .timeline-title {
  margin-bottom: 0.5rem;
}

.explore-two-panel-section .timeline-description {
  margin-bottom: 1rem;
}

/* Topic highlight in section title - blue, non-italic */
.explore-two-panel-section .timeline-title .topic-highlight {
  color: var(--color-primary, #00a8ff);
  font-style: normal;
  font-weight: 600;
}

/* Topic highlight blue variant - always blue, non-italic */
.topic-highlight-blue {
  color: var(--color-primary, #00a8ff);
  font-style: normal;
  font-weight: 600;
}

/* Dynamic timeline heading */
.timeline-dynamic-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.timeline-dynamic-heading {
  font-size: 1.75rem;
  font-weight: 600;
  color: white;
  font-style: italic;
  margin: 0 0 0.35rem 0;
  text-align: center;
  letter-spacing: -0.02em;
}

.timeline-dynamic-description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.topic-pages-link {
  color: var(--color-primary, #00a8ff);
  text-decoration: underline;
}

.topic-pages-link:hover {
  color: var(--color-primary-light, #33b8ff);
}

/* Panel header for left-aligned title inside topics panel */
.explore-panel-header {
  margin-bottom: 1rem;
}

.explore-panel-header .timeline-title {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.explore-panel-header .timeline-description {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Panel footer for left-aligned title below topics grid */
.explore-panel-footer {
  margin-top: 1.25rem;
}

.explore-panel-footer .timeline-title {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.explore-panel-footer .timeline-description {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Section Discovery Bar spacing */
.explore-two-panel-section .discovery-bar-wrapper {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.explore-two-panel-section .active-filters-row {
  margin-bottom: 1rem;
}

/* Search topics button centered below two-panel layout */
.search-topics-btn-centered {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

/* Timeline title row - inline heading + description anchored below timeline bar */
.carousel-timeline-bar .timeline-title-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0 2rem;
  flex-wrap: wrap;
}

.timeline-title-inline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
  white-space: nowrap;
}

.timeline-title-separator {
  color: var(--color-text-muted);
  font-weight: 300;
}

.timeline-description-inline {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin: 0;
}

.timeline-description-inline .timeline-link-blue {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity var(--transition-fast);
}

.timeline-description-inline .timeline-link-blue:hover {
  opacity: 0.8;
}

/* Search topics button wrapper */
.search-topics-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Responsive: Stack on smaller screens */
@media (max-width: 768px) {
  .carousel-timeline-bar .timeline-title-row {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    padding: 0 1rem;
  }

  .timeline-title-separator {
    display: none;
  }

  .timeline-title-inline {
    font-size: 1rem;
    white-space: normal;
  }

  .timeline-description-inline {
    font-size: 0.85rem;
  }
}

/* ============================================================================
   Top Posts Panel - Right side of two-panel section
   Simplified card design with cover images (no complex embeds)
   ============================================================================ */

.explore-panel-posts {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.explore-top-posts-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.explore-top-posts-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl, 16px);
  min-height: 300px;
}

.explore-top-posts-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
}

.explore-top-posts-loading .loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0, 168, 255, 0.25);
  border-top-color: #00a8ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.top-posts-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Individual top post card */
.top-post-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.3s ease;
}

.top-post-card.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.top-post-card:hover {
  transform: scale(1.02);
}

/* Media wrapper - full bleed background */
.top-post-media-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.top-post-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-post-media-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.3) 0%, rgba(0, 80, 120, 0.5) 100%);
}

/* Gradient overlay for text readability */
.top-post-overlay {
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.1) 70%,
    transparent 100%
  );
}

/* Platform badge (X, YouTube, etc.) */
.top-post-platform-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  color: white;
}

.top-post-platform-youtube {
  color: #ff0000;
}

/* Content area - positioned at bottom */
.top-post-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  z-index: 2;
}

.top-post-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.top-post-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.top-post-topic {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Post indicator dots */
.explore-posts-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.25rem;
}

.explore-post-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.explore-post-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

.explore-post-dot.active {
  background: var(--color-primary, #00a8ff);
}

/* ============================================================================
   Pages Panel - Right side of two-panel section (replacing posts)
   ============================================================================ */

/* Slide-in animation from right */
@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(60px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Shimmer animation for skeleton loading states */
@keyframes shimmer-slide {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Slide-in animation from left (for topic cards) */
@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade-in and slide-up animation (for trending items) */
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.explore-panel-pages {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 1rem;
}

/* Top ~3/4: Pages preview area */
.explore-pages-preview {
  flex: 3;
  min-height: 280px;
  border-radius: var(--radius-xl, 16px);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  /* Slide-in animation */
  animation: slideInFromRight 0.6s ease-out forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

.explore-pages-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-muted, rgba(255, 255, 255, 0.4));
  font-size: 0.9rem;
}

/* Page Preview Card */
.page-preview-card {
  position: relative;
  height: 100%;
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
  background: #000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.page-preview-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(var(--color-primary-rgb, 0, 168, 255), 0.15);
}

/* Page type indicator (top left) */
.page-type-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s ease;
}

.page-type-indicator svg {
  width: 12px;
  height: 12px;
}

.page-preview-card:hover .page-type-indicator {
  transform: scale(1.05);
}

/* Card link covers the background area */
.page-preview-card-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Background media layer */
.page-preview-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(0, 168, 255, 0.1);
  transition: transform 0.4s ease;
  mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
}

/* Legacy gradient overlay - now handled by mask-image */
.page-preview-media::after {
  display: none;
}

.page-preview-card:hover .page-preview-media {
  transform: scale(1.05);
}

/* Gradient overlay - DEPRECATED: gradient now on .page-preview-media::after */
.page-preview-overlay {
  display: none;
}

/* Content layer */
.page-preview-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  box-sizing: border-box;
  z-index: 3;
  pointer-events: none; /* Allow clicks to pass through to the card link */
}

/* Topic pill (bottom right - matches masonry grid) */
.page-preview-topic-pill {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  background: rgba(0, 168, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 500;
  color: #00a8ff;
  z-index: 4;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.15s ease;
  pointer-events: auto;
}

.page-preview-topic-pill:hover {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.4);
  transform: scale(1.05);
}

/* Title and description at bottom */
.page-preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page-preview-title-link {
  text-decoration: none;
  color: inherit;
}

.page-preview-title {
  margin: 0;
  font-size: 2.16rem;
  font-weight: 700;
  color: white;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-preview-description {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.45;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-preview-attribution {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.page-preview-attribution .attribution-label {
  opacity: 0.8;
}

.page-preview-attribution .attribution-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  pointer-events: auto; /* Re-enable clicks for author link */
}

.page-preview-attribution .attribution-author:hover {
  color: #33c4ff;
}

.page-preview-attribution .attribution-author:hover .attribution-username {
  text-shadow: 0 0 10px rgba(0, 168, 255, 0.6), 0 0 20px rgba(0, 168, 255, 0.4);
  text-decoration: none;
}

.page-preview-attribution .attribution-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-preview-attribution .attribution-author:hover .attribution-avatar {
  border-color: rgba(0, 168, 255, 0.6);
  box-shadow: 0 0 10px rgba(0, 168, 255, 0.5), 0 0 20px rgba(0, 168, 255, 0.3);
}

.page-preview-attribution .attribution-username {
  font-weight: 600;
  color: inherit;
}

/* Responsive: Smaller screens */
@media (max-width: 768px) {
  .page-preview-content {
    padding: 1rem;
  }

  .page-preview-topic-pill {
    bottom: 10px;
    right: 10px;
    font-size: 0.55rem;
    padding: 0.2rem 0.4rem;
  }

  .page-preview-title {
    font-size: 1.15rem;
  }

  .page-preview-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
  }
}

/* Bottom ~1/4: Author preview */
.explore-author-preview {
  flex: 1;
  min-height: 100px;
  /* Slide-in animation with staggered delay */
  animation: slideInFromRight 0.6s ease-out forwards;
  animation-delay: 0.25s;
  opacity: 0;
}

.author-preview-card-link {
  text-decoration: none;
  display: block;
  height: 100%;
}

.author-preview-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  height: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 12px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  position: relative;
}

.author-preview-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg, 12px);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.author-preview-card-link:hover .author-preview-card {
  border-color: rgba(var(--color-primary-rgb, 0, 168, 255), 0.3);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.2),
    0 0 12px rgba(var(--color-primary-rgb, 0, 168, 255), 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.author-preview-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(var(--color-primary-rgb, 0, 168, 255), 0.4);
  box-shadow: 0 0 12px rgba(var(--color-primary-rgb, 0, 168, 255), 0.2);
  flex-shrink: 0;
}

.author-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.author-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.author-preview-username {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary, white);
}

.author-preview-bio {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.6));
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.author-preview-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.author-preview-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.6));
  text-decoration: none;
  padding: 0.15rem 0.4rem;
  background: rgba(var(--color-primary-rgb, 0, 168, 255), 0.1);
  border-radius: var(--radius-xs, 4px);
  transition: all 0.2s ease;
}

.author-preview-social-link:hover {
  background: rgba(var(--color-primary-rgb, 0, 168, 255), 0.2);
  color: var(--color-primary, #00a8ff);
}

.author-preview-social-link svg {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
}

/* Responsive: Smaller screens */
@media (max-width: 768px) {
  .explore-panel-pages {
    gap: 0.75rem;
  }

  .author-preview-card {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .author-preview-avatar {
    width: 44px;
    height: 44px;
  }

  .author-preview-username {
    font-size: 0.9rem;
  }

  .author-preview-bio {
    font-size: 0.75rem;
  }
}

/* ============================================================================
   Explore Stats Section (Top Topics/Contributors)
   ============================================================================ */

.explore-stats-section {
  position: relative;
  padding: 1.5rem 0;
}

.explore-stats-section .section-container {
  position: relative;
  z-index: 1;
}

/* ============================================================================
   Topic Influence Chart Panel
   ============================================================================ */

.explore-panel-chart {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.explore-chart-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.explore-chart-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.explore-chart-container-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

/* Chart Info Button - positioned in top right of container */
.chart-info-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  z-index: 10;
}

.chart-info-btn:hover {
  border-color: rgba(0, 168, 255, 0.5);
  background: rgba(0, 168, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.chart-info-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  transform: none;
  width: 220px;
  padding: 0.75rem;
  background: rgba(15, 20, 30, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  z-index: 100;
}

.chart-info-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 4px;
  border: 6px solid transparent;
  border-top-color: rgba(15, 20, 30, 0.95);
}

.chart-info-btn:hover .chart-info-tooltip {
  opacity: 1;
  visibility: visible;
}

.explore-chart-container {
  position: relative;
  flex: 1;
  min-height: 0;
}

.explore-chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-lg);
}

.explore-chart-loading .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 168, 255, 0.25);
  border-top-color: #00a8ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.explore-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.explore-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.explore-chart-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.explore-chart-legend-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

/* ============================================================================
   Rotating Chart/Creators Views
   ============================================================================ */

.explore-rotating-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  display: flex;
  flex-direction: column;
}

.explore-rotating-view.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  flex: 1;
}

/* View indicator dots */
.explore-view-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.explore-view-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.explore-view-dot:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.2);
}

.explore-view-dot.active {
  background: var(--color-primary, #00a8ff);
}

/* ============================================================================
   Top Creators List
   ============================================================================ */

.explore-creators-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.explore-creators-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 0.75rem 0;
  text-align: center;
}

.explore-creators-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.explore-creators-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.explore-creators-loading .loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0, 168, 255, 0.25);
  border-top-color: #00a8ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Individual creator row */
.explore-creator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md, 8px);
  transition: background 0.2s ease;
}

.explore-creator-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.explore-creator-profile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.explore-creator-profile-link:hover {
  transform: translateX(2px);
}

.explore-creator-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  flex-shrink: 0;
}

.explore-creator-row:nth-child(1) .explore-creator-rank {
  background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
  color: #1a1a2e;
}

.explore-creator-row:nth-child(2) .explore-creator-rank {
  background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
  color: #1a1a2e;
}

.explore-creator-row:nth-child(3) .explore-creator-rank {
  background: linear-gradient(135deg, #cd7f32 0%, #b5651d 100%);
  color: #1a1a2e;
}

.explore-creator-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.explore-creator-info {
  min-width: 0;
}

.explore-creator-username {
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

/* Creator topics */
.explore-creator-topics {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.explore-creator-topic-pill {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill, 12px);
  color: var(--color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.explore-creator-topic-pill:hover {
  color: var(--color-primary);
  border-color: rgba(0, 168, 255, 0.3);
  background: rgba(0, 168, 255, 0.1);
}

/* Topic icon (for Top Topics list) */
.explore-topic-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.explore-topic-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explore-topic-icon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.2) 0%, rgba(0, 100, 200, 0.1) 100%);
  color: var(--color-primary, #00a8ff);
}

/* Topic post count (right side of row) */
.explore-topic-post-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  margin-left: auto;
  flex-shrink: 0;
}

.explore-topic-post-count .post-count-number {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.5));
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.explore-topic-post-count .post-count-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.5));
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Topic name in topics list - allow full name */
.explore-creator-row:has(.explore-topic-post-count) .explore-creator-username {
  max-width: none;
}

/* Responsive: Creators/Topics list */
@media (max-width: 768px) {
  .explore-creator-avatar {
    width: 28px;
    height: 28px;
  }

  .explore-creator-username {
    font-size: 0.8rem;
    max-width: 80px;
  }

  .explore-creator-topic-pill {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }

  .explore-topic-icon {
    width: 28px;
    height: 28px;
  }

  .explore-topic-post-count .post-count-number,
  .explore-topic-post-count .post-count-label {
    font-size: 0.6rem;
  }
}
