/**
 * Explore Page V2 Styles (Rewritten)
 *
 * Clean, minimal styles for:
 * - Discovery bar with topic search
 * - Featured topic section with preview grid
 * - Timeline viewer
 * - Leaderboard section
 */

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

.explore-page {
  position: relative;
  min-height: 100vh;
  background: var(--color-bg-primary);
  padding-bottom: 4rem;
}

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

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

.section-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.discovery-bar-section {
  padding: 0.5rem 0 1rem;
  margin-bottom: 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);
  box-shadow: 0 0 8px rgba(0, 168, 255, 0.3);
}

.discovery-link.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.4);
}

/* 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);
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.4);
}

.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: 1rem 0 2rem;
}

/* 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: var(--color-primary, #00a8ff);
  font-style: normal;
  font-weight: 600;
}

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

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

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

.context-panels {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 2.5rem;
  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;
}

.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;
}

/* 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;
  }

  .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 Topic Section
   ============================================================================ */

.featured-topic-section {
  padding: 1rem 0 0;
}

.featured-topic-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Featured Topic Card */
.featured-topic-card {
  display: block;
  position: relative;
  width: 50%;
  flex: 0 0 50%;
  height: 400px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(0, 168, 255, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.featured-topic-card:hover {
  border-color: rgba(0, 168, 255, 0.5);
  box-shadow: 0 8px 40px rgba(0, 168, 255, 0.2);
  transform: translateY(-2px);
}

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

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

.featured-topic-card:hover .featured-topic-media {
  transform: scale(1.03);
}

.featured-topic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 1;
}

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

.featured-topic-label {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.featured-topic-name {
  margin: 0 0 0.5rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.featured-topic-description {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
}

/* Featured Post Info */
.featured-topic-post-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.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;
  border: 1px solid rgba(0, 168, 255, 0.2);
  transition: all 0.3s ease;
}

.topic-preview-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-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: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 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%);
}

/* ============================================================================
   Featured Topic Timeline Track
   ============================================================================ */

.featured-topic-timeline-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scrollbar-width: none;
}

.featured-topic-timeline-track::-webkit-scrollbar {
  display: none;
}

/* ============================================================================
   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;
}

.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: thin;
}

.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;
}

/* ============================================================================
   Comments Section
   ============================================================================ */

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

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-secondary);
}

.comments-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.comments-title svg {
  color: var(--color-primary);
}

.comments-count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.comment-input-container {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.comment-input-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-input {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--radius-md);
  resize: none;
  outline: none;
  transition: border-color 0.2s ease;
}

.comment-input:focus {
  border-color: var(--color-primary);
}

.comment-submit-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comment-submit-btn:not(:disabled):hover {
  background: var(--color-primary-hover);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.load-more-comments-btn {
  width: 100%;
  padding: 0.75rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-primary);
  background: transparent;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-more-comments-btn:hover {
  background: rgba(var(--color-primary-rgb), 0.1);
}

/* ============================================================================
   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.5rem;
  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.85rem;
  color: var(--color-text-muted);
  opacity: 0.75;
}

/* Section Separator - glowing blue line */
.section-separator-glow {
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--color-primary, #00a8ff) 20%,
    var(--color-primary, #00a8ff) 80%,
    transparent 100%
  );
  opacity: 0.6;
  filter: blur(1px);
  margin: 3rem 0 1.5rem 0;
}

/* ============================================================================
   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;
}

/* Timeline Bar below carousel - spans full viewport width like carousel */
.carousel-timeline-bar {
  position: relative;
  margin-top: 0.25rem;
  padding: 12px 2rem 0;
  /* Break out of the section-container to span full viewport width */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

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

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

.timeline-bar-ticks {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
}

/* Tick marks - vertical lines pointing upward (above the timeline) */
.timeline-bar-tick {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  width: 2px;
  height: 12px;
  background: rgba(255, 255, 255, calc(0.3 * var(--tick-opacity, 1)));
  border: none;
  border-radius: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
  opacity: var(--tick-opacity, 1);
}

/* Extended hover area for easier interaction */
.timeline-bar-tick::before {
  content: '';
  position: absolute;
  top: -15px;
  left: -12px;
  right: -12px;
  bottom: -8px;
  /* Transparent but captures hover/click events */
}

.timeline-bar-tick:hover {
  background: var(--color-primary, #00a8ff);
  box-shadow: 0 0 8px rgba(0, 168, 255, 0.5);
  height: 16px;
  opacity: 1; /* Override fade on hover */
}

.timeline-bar-tick.active {
  background: var(--color-primary, #00a8ff);
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.7);
  height: 18px;
  width: 3px;
  opacity: 1; /* Override fade on active */
}

/* Date label on tick hover/active - appears above tick */
.timeline-bar-tick::after {
  content: attr(data-date);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  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);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 500;
  color: white;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.timeline-bar-tick:hover::after,
.timeline-bar-tick.active::after {
  opacity: 1;
}

/* Prevent date labels from being clipped at screen edges */
.timeline-bar-tick:first-child::after {
  left: 0;
  transform: translateX(0);
}

.timeline-bar-tick:last-child::after {
  left: auto;
  right: 0;
  transform: translateX(0);
}

/* Carousel Wrapper - break out of container to full viewport width */
.timeline-carousel-wrapper {
  position: relative;
  margin-bottom: 0rem;
  overflow: visible;
  /* Break out of the section-container to span full viewport width */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

/* Loading overlay */
.timeline-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg-primary);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.timeline-loading-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-primary);
  text-shadow: 0 0 20px rgba(0, 168, 255, 0.6), 0 0 40px rgba(0, 168, 255, 0.3);
  letter-spacing: 0.05em;
}

/* Animated dots */
.loading-dots::after {
  content: '';
  animation: loadingDots 1s steps(4, end) infinite;
}

@keyframes loadingDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* Loading bar container */
.timeline-loading-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

/* Animated loading bar fill */
.timeline-loading-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  border-radius: 3px;
  animation: loadingBar 1.5s ease-in-out infinite;
}

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

/* Hide carousel content while loading */
.timeline-carousel-wrapper.loading .timeline-carousel {
  opacity: 0;
}

/* Hide loading overlay when loaded */
.timeline-carousel-wrapper.loaded .timeline-loading-overlay {
  display: none;
}

/* Loaded state - fade in real carousel content */
.timeline-carousel-wrapper.loaded .timeline-carousel {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Main Carousel Container - fixed height to prevent layout shift */
.timeline-carousel {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: visible;
  min-height: 450px;
  /* Disable CSS scroll-snap entirely - handle smooth centering in JS to avoid jerky behavior */
  scroll-snap-type: none;
  scrollbar-width: none;
  padding: 1rem 0 1.5rem;
  /* Allow horizontal scrolling for user */
  -webkit-overflow-scrolling: touch;
}

.timeline-carousel::-webkit-scrollbar {
  display: none;
}


/* Carousel Navigation Arrows */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
}

.timeline-carousel-wrapper:hover .carousel-nav {
  opacity: 1;
}

.carousel-nav:hover {
  background: rgba(0, 168, 255, 0.4);
  border-color: rgba(0, 168, 255, 0.6);
  box-shadow: 0 0 20px rgba(0, 168, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-nav-prev {
  left: 1rem;
}

.carousel-nav-next {
  right: 1rem;
}

/* Carousel Post Card - Content only, no chrome */
.carousel-post-card {
  flex: 0 0 auto;
  /* scroll-snap disabled - handled by JS for smoother behavior */
  width: 500px;
  height: 400px;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: visible;
  background: var(--color-bg-card, #0d1b2a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Only transition opacity/filter/transform for featured state changes, not background/border */
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  /* Keep cards aligned at top so expansion goes downward */
  align-self: flex-start;
}

/* Smooth fade-in for embed content */
.carousel-post-card .post-embed-container > *:not(.embed-loading) {
  animation: embedFadeIn 0.3s ease-out;
}

@keyframes embedFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Featured (active) card in center - no glow */
.carousel-post-card.featured {
  border-color: rgba(255, 255, 255, 0.2);
  z-index: 5;
}

/* Adjacent cards (faded) */
.carousel-post-card:not(.featured) {
  opacity: 0.5;
  filter: brightness(0.7);
  transform: scale(0.9);
}

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

/* Embed Container - full card */
.carousel-post-card .post-embed-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Twitter embed container - align to top */
.carousel-post-card.twitter-embed-card .post-embed-container {
  align-items: flex-start;
  justify-content: flex-start;
}

/* Loading spinner */
.carousel-post-card .embed-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ============================================================================
   Embed Type Specific Styles
   ============================================================================ */

/* Twitter Card - transparent background */
.carousel-post-card.twitter-embed-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.carousel-post-card.twitter-embed-card.featured {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  height: auto !important;
  min-height: 400px;
}

/* Allow embed container to expand for Twitter */
.carousel-post-card.twitter-embed-card.featured .post-embed-container {
  height: auto;
}

.carousel-post-card.twitter-embed-card.featured .tweet-container {
  height: auto;
}

.carousel-post-card.twitter-embed-card:not(.featured) {
  opacity: 0.5;
  filter: brightness(0.7);
  transform: scale(0.9);
  height: 400px;
  overflow: hidden;
}

/* YouTube Card - transparent background */
.carousel-post-card.youtube-embed-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.carousel-post-card.youtube-embed-card.featured {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.carousel-post-card.youtube-embed-card:not(.featured) {
  opacity: 0.5;
  filter: brightness(0.7);
  transform: scale(0.9);
}

/* YouTube Loading Placeholder */
.youtube-responsive-wrapper.youtube-loading .youtube-thumbnail-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.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;
}

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

/* Hide placeholder when iframe is loaded */
.youtube-responsive-wrapper:not(.youtube-loading) .youtube-thumbnail-placeholder,
.youtube-responsive-wrapper:not(.youtube-loading) .youtube-loading-overlay {
  display: none;
}

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

/* Twitter Embed */
.carousel-post-card .twitter-tweet {
  margin: 0 auto !important;
  width: 100% !important;
  min-width: 400px !important;
  max-width: 550px !important;
  border-radius: 12px;
  overflow: hidden;
}

/* No glow on featured tweets */
.carousel-post-card.featured .twitter-tweet {
  box-shadow: none;
}

.carousel-post-card .twitter-tweet iframe {
  min-width: 400px !important;
  max-width: 100% !important;
  border-radius: 12px !important;
}

/* Tweet container - align to top */
.carousel-post-card .tweet-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  width: 100%;
}

/* 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-post-card.featured .tweet-expand-overlay {
  display: flex;
}

/* 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;
}

/* Small loading spinner for expand button */
.loading-spinner-small {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* YouTube Embed Wrapper - responsive 16:9 */
.youtube-responsive-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

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

/* TikTok Embed Wrapper */
.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: 280px;
  overflow: hidden;
}

.instagram-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  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;
}

/* Image/Video Embed */
.carousel-post-card .embed-image,
.carousel-post-card .embed-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Embed Placeholder */
.carousel-post-card .embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  min-height: 250px;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
}

/* Embed Fallback (for failed embeds) */
.embed-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
  min-height: 250px;
  padding: 2rem;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.7);
}

.embed-fallback svg {
  opacity: 0.6;
}

.embed-fallback a {
  color: var(--color-primary, #00a8ff);
  text-decoration: none;
  font-size: 0.9rem;
}

.embed-fallback a:hover {
  text-decoration: underline;
}

.twitter-fallback {
  background: linear-gradient(135deg, rgba(29, 155, 240, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
}

/* ============================================================================
   Timeline Comment Section (Expandable)
   ============================================================================ */

.timeline-comment-section {
  margin-top: 1.5rem;
  padding: 0 2rem;
}

/* Toggle Button */
.comment-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 auto;
}

.comment-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 168, 255, 0.3);
  color: var(--color-text-primary);
}

.comment-toggle-btn .comment-icon {
  opacity: 0.7;
}

.comment-toggle-btn .chevron-icon {
  opacity: 0.5;
  transition: transform 0.3s ease;
}

.timeline-comment-section.expanded .comment-toggle-btn .chevron-icon {
  transform: rotate(180deg);
}

.timeline-comment-section.expanded .comment-toggle-btn {
  background: rgba(0, 168, 255, 0.1);
  border-color: rgba(0, 168, 255, 0.3);
  color: var(--color-text-primary);
}

/* Comment Count Badge */
.comment-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(0, 168, 255, 0.2);
  border-radius: 9px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* Comment Panel */
.comment-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.2s ease;
  opacity: 0;
}

.timeline-comment-section.expanded .comment-panel {
  max-height: 400px;
  opacity: 1;
}

.comment-panel-content {
  padding: 1rem 0;
  max-width: 600px;
  margin: 0 auto;
}

/* Comment Input Row */
.comment-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.comment-input-field {
  flex: 1;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--color-text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

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

.comment-input-field:focus {
  border-color: rgba(0, 168, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.comment-input-row .comment-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(0, 168, 255, 0.4);
  border-radius: 50%;
  color: var(--color-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-input-row .comment-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.comment-input-row .comment-submit-btn:not(:disabled):hover {
  background: rgba(0, 168, 255, 0.15);
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 168, 255, 0.3);
}

/* Comment List */
.comment-list {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.comment-list::-webkit-scrollbar {
  width: 4px;
}

.comment-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.comment-list-empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* Individual Comment */
.comment-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.comment-author {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: none;
}

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

.comment-time {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.comment-text {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
  word-break: break-word;
}

/* Login prompt */
.comment-login-prompt {
  text-align: center;
  padding: 1rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.comment-login-prompt a {
  color: var(--color-primary);
  text-decoration: none;
}

.comment-login-prompt a:hover {
  text-decoration: underline;
}

/* Loading state */
.comment-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.comment-loading .loading-spinner {
  width: 24px;
  height: 24px;
}

/* ============================================================================
   Minimal Timeline Bar
   ============================================================================ */

.timeline-bar-minimal {
  padding: 1.5rem 0 1rem;
  position: relative;
}

.timeline-bar-line {
  position: relative;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.timeline-bar-ticks {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
}

.timeline-tick {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.5);
  transform: translateX(-50%);
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 1;
}

.timeline-tick:hover {
  background: rgba(0, 168, 255, 0.5);
  border-color: rgba(0, 168, 255, 0.8);
  transform: translateX(-50%) scale(1.3);
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.5);
}

.timeline-tick.active {
  background: var(--color-primary, #00a8ff);
  border-color: white;
  transform: translateX(-50%) scale(1.4);
  box-shadow: 0 0 16px rgba(0, 168, 255, 0.7);
  z-index: 2;
}

/* Timeline bar labels */
.timeline-bar-labels {
  display: flex;
  justify-content: space-between;
  padding-top: 0.75rem;
  pointer-events: none;
}

.timeline-bar-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.timeline-bar-label.start {
  text-align: left;
}

.timeline-bar-label.end {
  text-align: right;
}

/* 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 {
  to { transform: rotate(360deg); }
}

/* ============================================================================
   Skeleton Loading Cards
   ============================================================================ */

/* Skeleton card base - matches carousel-post-card dimensions */
.carousel-post-card.skeleton-card {
  background: var(--color-bg-card, #0d1b2a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.carousel-post-card.skeleton-card.featured {
  border-color: rgba(255, 255, 255, 0.15);
}

.carousel-post-card.skeleton-card:not(.featured) {
  opacity: 0.5;
  filter: brightness(0.7);
  transform: scale(0.9);
}

/* 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);
}

/* Skeleton spacers for proper centering */
.carousel-spacer.skeleton-spacer {
  flex: 0 0 calc((100vw - 500px) / 2);
}

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

@media (max-width: 1200px) {
  .featured-topic-row {
    flex-direction: column;
  }

  .featured-topic-card {
    width: 100%;
    flex: none;
    height: 350px;
  }

  .topic-preview-grid {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .section-container {
    padding: 0 1rem;
  }

  .featured-topic-card {
    height: 280px;
  }

  .featured-topic-name {
    font-size: 1.75rem;
  }

  .featured-topic-content {
    padding: 1.25rem;
  }

  .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;
  }
}

/* Timeline Carousel Responsive */
@media (max-width: 1200px) {
  .carousel-post-card {
    width: 450px;
    height: 360px;
  }
}

@media (max-width: 768px) {
  .carousel-post-card {
    width: 85vw;
    height: 320px;
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
  }

  .scrollbar-post-item {
    width: 100px;
    height: 70px;
  }

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

@media (max-width: 480px) {
  .carousel-post-card {
    width: 90vw;
    height: 280px;
  }

  .carousel-nav-prev {
    left: 0.5rem;
  }

  .carousel-nav-next {
    right: 0.5rem;
  }

  .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);
}

/* Fade in from left */
.scroll-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
.scroll-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up animation */
.scroll-scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scroll-scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children animations - apply to parent container */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.08s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.16s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.24s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.32s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.4s; }

.stagger-children.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;
}

/* Pulsing glow effect on primary elements */
.pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 168, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 168, 255, 0.4);
  }
}

/* Shimmer effect for loading/highlights */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* 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);
}

/* Featured topic section entrance */
.featured-topic-section {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.featured-topic-section.visible {
  opacity: 1;
}

/* Discovery bar subtle entrance */
.discovery-bar-section {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

/* Leaderboard section */
.discover-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

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

@media (prefers-reduced-motion: reduce) {
  .scroll-fade-in,
  .scroll-fade-left,
  .scroll-fade-right,
  .scroll-scale-in,
  .stagger-children > *,
  .explore-timeline-section,
  .featured-topic-section,
  .discovery-bar-section,
  .discover-section,
  .timeline-label-text.initial-animate,
  .timeline-label .timeline-description.initial-animate {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .ambient-orbs-canvas,
  .pulse-glow,
  .shimmer::after {
    animation: none;
  }

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

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