/**
 * Timeline Carousel Component
 * Reusable horizontal timeline carousel for displaying posts
 * Used on: explore page, profile pages, topic pages
 */

/* ============================================================================
   Size Variant API
   ============================================================================ */

/* Base dimensions (default - used on profile/topic pages) */
.carousel-post-card {
  --carousel-card-width: 276px;
  --carousel-card-height: 168px;
}

/* Size modifier class */
.carousel-post-card--large {
  --carousel-card-width: 460px;
  --carousel-card-height: 280px;
}

/* Context-based sizing (explore page gets large cards) */
.explore-page .carousel-post-card {
  --carousel-card-width: 380px;
  --carousel-card-height: 230px;
}

/* Explore page carousel - tighter spacing between posts */
.explore-page .timeline-carousel {
  gap: 0;
}

.explore-page .carousel-post-card {
  margin-left: -20px;
}

.explore-page .carousel-post-card:first-child {
  margin-left: 0;
}

/* ============================================================================
   Timeline Carousel Wrapper
   ============================================================================ */

.timeline-carousel-wrapper {
  position: relative;
  width: 100%;
}

/* Loading State (matches profile loading style) */
.timeline-loading-overlay,
.carousel-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 1rem;
  background: transparent;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

.loading-dots {
  display: inline-block;
  /* Fixed width prevents layout shift when dot content changes */
  min-width: 1.2em;
  text-align: left;
}

.loading-dots::after {
  content: '';
  animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

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

.timeline-loading-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--color-primary, #00a8ff), 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,
.timeline-carousel-wrapper.loaded .carousel-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
   ============================================================================ */

.timeline-carousel {
  display: flex;
  align-items: flex-start;
  gap: 0.15rem;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 260px;
  scrollbar-width: none;
  padding: 0.35rem calc(50vw - 190px) 0.5rem;
  -webkit-overflow-scrolling: touch;
}

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

/* ============================================================================
   Carousel Post Card
   ============================================================================ */

.carousel-post-card {
  flex: 0 0 auto;
  width: var(--carousel-card-width, 276px);
  height: var(--carousel-card-height, 168px);
  position: relative;
  border-radius: var(--radius-md, 8px);
  overflow: visible;
  /* No container - content only */
  background: transparent;
  border: none;
  transition: opacity 0.5s ease-out, filter 0.5s ease-out, transform 0.5s ease-out;
  cursor: pointer;
}

/* 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 - content only */
.carousel-post-card.featured {
  z-index: 5;
}

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

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

/* ============================================================================
   Create Post Card
   ============================================================================ */

.carousel-create-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.carousel-create-card:hover {
  background: rgba(0, 168, 255, 0.08);
  border-color: rgba(0, 168, 255, 0.4);
  transform: scale(1.02);
  opacity: 1 !important;
  filter: none !important;
}

.carousel-create-card .create-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.carousel-create-card .create-card-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.carousel-create-card:hover .create-card-icon {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.5);
  color: var(--color-primary, #00a8ff);
  transform: scale(1.1);
}

.carousel-create-card .create-card-text {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.carousel-create-card:hover .create-card-text {
  color: var(--color-primary, #00a8ff);
}

/* ============================================================================
   Load More Card
   ============================================================================ */

.carousel-load-more-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-load-more-card:hover {
  background: rgba(0, 168, 255, 0.08);
  border-color: rgba(0, 168, 255, 0.4);
  transform: scale(1.02);
  opacity: 1 !important;
  filter: none !important;
}

.carousel-load-more-card .load-more-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
}

.carousel-load-more-card .load-more-card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.carousel-load-more-card:hover .load-more-card-icon {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.5);
  color: var(--color-primary, #00a8ff);
  transform: scale(1.1);
}

.carousel-load-more-card .load-more-card-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.carousel-load-more-card:hover .load-more-card-text {
  color: var(--color-primary, #00a8ff);
}

.carousel-load-more-card .load-more-spinner {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-load-more-card.loading {
  pointer-events: none;
  opacity: 0.7 !important;
}

/* ============================================================================
   Topic Pills Row
   ============================================================================ */

.carousel-card-topics {
  position: absolute;
  top: -28px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.5rem;
  z-index: 10;
  overflow: hidden;
}

.carousel-topic-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.carousel-topic-pill:hover {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.4);
  color: var(--color-primary, #00a8ff);
  transform: scale(1.05);
}

.carousel-topic-more {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

/* ============================================================================
   Action Buttons Row
   ============================================================================ */

.carousel-card-actions {
  position: absolute;
  bottom: -34px;
  left: 0;
  right: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.4rem;
  z-index: 10;
}

/* Only show action buttons when card is featured */
.carousel-post-card.featured .carousel-card-actions {
  display: flex;
}

.carousel-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  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;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  /* Ensure consistent alignment for both <a> and <button> elements */
  box-sizing: border-box;
  vertical-align: middle;
  line-height: 1;
  font-family: inherit;
  /* Reset anchor-specific defaults */
  height: auto;
  margin: 0;
}

/* Ensure anchor tags align consistently with buttons */
a.carousel-action-btn {
  display: inline-flex;
  align-items: center;
}

.carousel-action-btn:hover {
  background: rgba(0, 168, 255, 0.1);
  border-color: rgba(0, 168, 255, 0.35);
  color: var(--color-primary, #00a8ff);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-action-btn svg {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.carousel-action-btn:hover svg {
  opacity: 1;
}

/* Delete button - danger styling */
.carousel-action-btn-danger {
  color: rgba(255, 255, 255, 0.5);
}

.carousel-action-btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.carousel-action-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================================
   Embed Container
   ============================================================================ */

.carousel-post-card .post-embed-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-md, 8px);
}

/* Twitter embed cards need overflow visible to prevent border clipping */
.carousel-post-card.twitter-embed-card .post-embed-container {
  overflow: visible;
}

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

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

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

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

/* ============================================================================
   Page Embed Card (pages displayed in carousel)
   Matches the exact styling of top-post-card on explore page
   ============================================================================ */

/* Page embed card - remove any container styling */
.carousel-post-card.page-embed-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.carousel-post-card.page-embed-card .post-embed-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

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

/* Override flex centering - page card needs position relative for absolute children */
.carousel-post-card.page-embed-card .post-embed-container {
  display: block;
  position: relative;
}

/* Media wrapper - full bleed background */
.carousel-post-card.page-embed-card .page-embed-media-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

/* Media element - fills the container */
.carousel-post-card.page-embed-card .page-embed-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder when no image */
.carousel-post-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%);
}

/* Gradient overlay for text readability */
.carousel-post-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%
  );
}

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

/* Title */
.carousel-post-card.page-embed-card .page-embed-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin: 0 0 0.25rem 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);
}

/* Topics container */
.carousel-post-card.page-embed-card .page-embed-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}

/* Topic pill */
.carousel-post-card.page-embed-card .page-embed-topic {
  font-size: 0.65rem;
  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: 4px;
}

/* Description */
.carousel-post-card.page-embed-card .page-embed-description {
  font-size: 0.75rem;
  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);
}

/* ============================================================================
   Featured Embed Card (page/collection/timeline in carousel)
   Matches explore page featured cards exactly
   ============================================================================ */

/* Featured embed card - remove any container styling */
.carousel-post-card.featured-embed-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

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

/* Override flex centering for featured cards */
.carousel-post-card.featured-embed-card .post-embed-container {
  display: block;
  position: relative;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Featured card container */
.carousel-featured-card {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: #000;
}

/* Background media - image */
.carousel-featured-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  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%);
}

/* Background media - video */
video.carousel-featured-media {
  object-fit: cover;
}

/* Placeholder when no image */
.carousel-featured-media-placeholder {
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.2) 0%, rgba(0, 60, 100, 0.4) 100%);
}

/* Hover zoom effect */
.carousel-post-card.featured-embed-card:hover .carousel-featured-media,
.carousel-post-card.page-embed-card:hover .carousel-featured-media {
  transform: scale(1.05);
}

/* Legacy gradient overlay - now handled by mask-image */
.carousel-featured-overlay {
  display: none;
}

/* Type indicator (top left) - matches canonical featured-embed-type */
.carousel-featured-type-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.carousel-post-card.featured-embed-card:hover .carousel-featured-type-indicator,
.carousel-post-card.page-embed-card:hover .carousel-featured-type-indicator {
  transform: scale(1.05);
}

/* Content overlay */
.carousel-featured-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;
}

/* Topic pill (top left - standardized featured card style) */
.carousel-featured-topic-pill {
  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: #00a8ff;
  z-index: 4;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.15s ease;
  pointer-events: auto;
}

.carousel-featured-topic-pill:hover {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.4);
  transform: scale(1.05);
}

/* Info section (bottom) */
.carousel-featured-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.carousel-featured-title {
  margin: 0;
  font-size: 1.08rem;
  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;
}

.carousel-featured-description {
  margin: 0;
  font-size: 0.68rem;
  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;
}

/* Author attribution (bottom right) */
.carousel-featured-attribution {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  z-index: 10;
}

.carousel-featured-attribution .attribution-author {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  pointer-events: auto;
}

.carousel-featured-attribution .attribution-author:hover {
  color: #33c4ff;
}

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

.carousel-featured-attribution .attribution-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.carousel-featured-attribution .attribution-username {
  font-weight: 500;
  color: inherit;
}

/* ============================================================================
   Featured Embed (New simplified structure for page/collection/timeline)
   Matches the sidebar featured card styling
   ============================================================================ */

.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 {
  transform: scale(1.05);
}

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

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

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

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

/* Featured embed attribution - clickable author link with hover effects */
.featured-embed-attribution {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  z-index: 5;
}

.featured-embed-attribution .attribution-author {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.featured-embed-attribution .attribution-author:hover {
  color: #33c4ff;
}

.featured-embed-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;
  object-fit: cover;
}

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

.featured-embed-attribution .attribution-username {
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================================
   Twitter Embed Card
   Featured tweets expand to full height, non-featured are constrained
   ============================================================================ */

/* Twitter embed cards - base styling */
.carousel-post-card.twitter-embed-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  overflow: visible;
}

.carousel-post-card.twitter-embed-card .post-embed-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Featured state - expand to fit full tweet */
.carousel-post-card.twitter-embed-card.featured {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  height: auto !important;
  min-height: auto;
  display: flex;
  flex-direction: column;
}

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

/* Non-featured state - constrained and faded */
.carousel-post-card.twitter-embed-card:not(.featured) {
  opacity: 0.5;
  filter: brightness(0.7);
  transform: scale(0.9);
  overflow: hidden;
}

/* Tweet container */
.carousel-post-card .tweet-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  width: 100%;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

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

.carousel-post-card .twitter-tweet {
  margin: 0 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

.carousel-post-card .twitter-tweet iframe {
  min-width: 0 !important;
  max-width: 100% !important;
  transform: scale(0.85);
  transform-origin: top center;
  border-radius: 12px !important;
  overflow: hidden !important;
  margin-bottom: -15% !important;
}

/* Target the Twitter widget wrapper after it renders */
.carousel-post-card .twitter-tweet-rendered-true {
  border-radius: 12px !important;
  overflow: hidden !important;
  background: transparent !important;
}

/* Remove any default box-shadow, border, outline from Twitter embeds */
.carousel-post-card .twitter-tweet,
.carousel-post-card .twitter-tweet-rendered-true,
.carousel-post-card .twitter-tweet iframe {
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

/* Fix white corners in dark mode - color-scheme: dark causes iframes to render white backgrounds */
.carousel-post-card .twitter-tweet iframe {
  color-scheme: light !important;
}

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

/* Action buttons for featured Twitter cards - relative positioning since card has auto height */
.carousel-post-card.twitter-embed-card.featured .carousel-card-actions {
  position: relative;
  bottom: auto;
  margin-top: 8px;
}

/* ============================================================================
   YouTube Embed Card
   ============================================================================ */

.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-embed-wrapper,
.youtube-responsive-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

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

/* YouTube Loading States */
.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;
}

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

/* ============================================================================
   Data Table Embed Card
   Uses same pattern as featured-embed-card for consistent sizing
   ============================================================================ */

/* Data table embed card - same pattern as featured-embed-card */
.carousel-post-card.data-table-embed-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Hide external topic pills for data table cards */
.carousel-post-card.data-table-embed-card .carousel-card-topics {
  display: none !important;
}

/* Override flex centering for data table cards */
.carousel-post-card.data-table-embed-card .post-embed-container {
  display: block;
  position: relative;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Data table featured card container - fills the card */
.carousel-data-table-card {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 80, 120, 0.3) 0%, rgba(0, 40, 60, 0.5) 100%);
  display: flex;
  flex-direction: column;
}

/* Data table header area */
.carousel-data-table-header {
  padding: 0.75rem 1rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* Data table content area */
.carousel-data-table-content {
  flex: 1;
  overflow: hidden;
  padding: 0.5rem;
}

.carousel-data-table-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-data-table-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.65rem;
}

.carousel-data-table-table th,
.carousel-data-table-table td {
  padding: 0.3rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.carousel-data-table-table th {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.03);
}

.carousel-data-table-table td {
  color: rgba(255, 255, 255, 0.85);
}

.carousel-data-table-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Data table footer */
.carousel-data-table-footer {
  padding: 0.4rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.carousel-data-table-rows-info {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Type indicator for data table */
.carousel-data-table-type-indicator {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.carousel-data-table-type-indicator svg {
  width: 10px;
  height: 10px;
}

/* Hover effects */
.carousel-post-card.data-table-embed-card:hover .carousel-data-table-card {
  background: linear-gradient(135deg, rgba(0, 100, 150, 0.35) 0%, rgba(0, 50, 75, 0.55) 100%);
}

/* ============================================================================
   Chart Embed Card
   Uses same pattern as featured-embed-card for consistent sizing
   ============================================================================ */

/* Chart embed card - same pattern as featured-embed-card */
.carousel-post-card.chart-embed-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

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

/* Override flex centering for chart cards */
.carousel-post-card.chart-embed-card .post-embed-container {
  display: block;
  position: relative;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Chart card container - fills the card exactly like featured-embed-card */
.carousel-chart-card {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: transparent;
}

/* Chart background media - image */
.carousel-chart-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.4s ease;
}

/* Chart background media - video */
video.carousel-chart-media {
  object-fit: cover;
}

/* Placeholder when no image */
.carousel-chart-media-placeholder {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(30, 64, 175, 0.4) 100%);
}

/* Hover zoom effect */
.carousel-post-card.chart-embed-card:hover .carousel-chart-media {
  transform: scale(1.05);
}

/* Gradient overlay for text readability */
.carousel-chart-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%
  );
  pointer-events: none;
}

/* Type indicator (bottom right) */
.carousel-chart-type-indicator {
  position: absolute;
  bottom: 12px;
  right: 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;
}

.carousel-chart-type-indicator svg {
  width: 12px;
  height: 12px;
}

.carousel-post-card.chart-embed-card:hover .carousel-chart-type-indicator {
  transform: scale(1.05);
}

/* Content overlay (bottom) */
.carousel-chart-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  padding-right: 100px; /* Space for type indicator */
  z-index: 3;
  pointer-events: none;
}

/* Chart title */
.carousel-chart-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  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);
}

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

.carousel-timeline-bar {
  position: relative;
  padding: 8px 2rem 0;
  width: 100%;
  box-sizing: border-box;
}

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

.carousel-timeline-glow {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
  transform: translateY(-50%);
  border-radius: 1px;
}

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

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

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

.timeline-bar-tick:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  height: 16px;
  opacity: 1;
}

.timeline-bar-tick.active {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.7);
  height: 18px;
  width: 3px;
  opacity: 1;
}

/* Date label on tick hover/active */
.timeline-bar-tick::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.65rem;
  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;
}

/* ============================================================================
   Empty State
   ============================================================================ */

.timeline-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.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.1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

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

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

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

/* ============================================================================
   Mobile Responsive
   ============================================================================ */

@media (max-width: 768px) {
  .timeline-carousel {
    min-height: 240px;
    gap: 0.35rem;
    padding: 0.5rem calc(50vw - 150px) 0.75rem;
  }

  .carousel-post-card {
    --carousel-card-width: 180px;
    --carousel-card-height: 120px;
  }

  .carousel-card-topics {
    top: -28px;
  }

  .carousel-topic-pill {
    font-size: 0.55rem;
    padding: 0.15rem 0.4rem;
  }

  .carousel-card-actions {
    bottom: -36px;
    gap: 0.5rem;
  }

  .carousel-action-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.65rem;
  }

  .carousel-timeline-bar {
    padding: 8px 1rem 0;
  }

  .timeline-bar-tick {
    height: 10px;
  }

  .timeline-bar-tick.active {
    height: 14px;
  }
}

@media (max-width: 480px) {
  .carousel-post-card {
    --carousel-card-width: 156px;
    --carousel-card-height: 108px;
  }

  .carousel-create-card .create-card-icon {
    width: 60px;
    height: 60px;
  }

  .carousel-create-card .create-card-icon svg {
    width: 32px;
    height: 32px;
  }

  .carousel-create-card .create-card-text {
    font-size: 0.85rem;
  }
}

/* ============================================================================
   Explore Page Responsive Overrides
   ============================================================================ */

@media (max-width: 1200px) {
  .explore-page .carousel-post-card {
    --carousel-card-width: 380px;
    --carousel-card-height: 240px;
  }

  .explore-page .timeline-carousel {
    gap: 0.15rem;
    padding-left: calc(50vw - 190px);
    padding-right: calc(50vw - 190px);
  }
}

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

  .explore-page .timeline-carousel {
    gap: 0.35rem;
    padding-left: 7.5vw;
    padding-right: 7.5vw;
  }
}

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

  .explore-page .timeline-carousel {
    gap: 0.35rem;
    padding-left: 5vw;
    padding-right: 5vw;
  }
}

/* Explore page tick marks - use data-date attribute for tooltip */
.explore-page .timeline-bar-tick {
  background: rgba(255, 255, 255, calc(0.4 * var(--tick-opacity, 1)));
}

.explore-page .timeline-bar-tick:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.explore-page .timeline-bar-tick.active {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.7);
}

/* Explore page tick tooltip - glassmorphism style */
.explore-page .timeline-bar-tick::after {
  content: attr(data-date);
  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);
}

/* ============================================================================
   Temporal Divider Band
   Visual transition between hero content and timeline
   ============================================================================ */

.temporal-divider-band {
  position: relative;
  /* Break out of any container to span full viewport width */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* No fade gradient - transparent background */
  background: transparent;
  /* No hard edges */
  border: none;
  padding: 0;
  /* Eliminate any gap with timeline section below */
  margin-bottom: 0;
}

/* Top fade - blends with hero section above */
.temporal-divider-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 24px;
  pointer-events: none;
}

.temporal-divider-fade-top {
  top: 0;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0) 0%,
    transparent 100%
  );
}

.temporal-divider-fade-bottom {
  /* Hidden - we want the dark color to continue into timeline */
  display: none;
}

/* Content container - centered */
.temporal-divider-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 20px;
  z-index: 1;
}

/* Subtle glow line */
.temporal-divider-glow-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;
}

/* Text styling - muted, small caps feel */
.temporal-divider-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  /* Ensure readable but muted */
  user-select: none;
}

/* Clock icon - subtle */
.temporal-divider-icon {
  opacity: 0.5;
  flex-shrink: 0;
}

/* ============================================================================
   Temporal Divider - Responsive
   ============================================================================ */

@media (min-width: 1024px) {
  .temporal-divider-band {
    min-height: 100px;
  }

  .temporal-divider-content {
    padding: 32px 20px;
    gap: 16px;
  }

  .temporal-divider-glow-line {
    width: 160px;
  }

  .recent-posts-label {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .temporal-divider-band {
    min-height: 64px;
  }

  .temporal-divider-content {
    padding: 16px 16px;
    gap: 10px;
  }

  .temporal-divider-glow-line {
    width: 80px;
  }

  .recent-posts-label {
    font-size: 0.8rem;
  }
}

/* ============================================================================
   Temporal Divider - Reduced Motion
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  .temporal-divider-glow-line {
    box-shadow: none;
  }
}

/* ============================================================================
   Timeline Section Background
   Continues the lighter background from temporal divider
   ============================================================================ */

.explore-page .explore-timeline-section {
  /* Subtle background banding - ~1% lightness shift, very gradual fade */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.01) 0%,
    rgba(255, 255, 255, 0.01) 70%,
    rgba(255, 255, 255, 0.008) 85%,
    rgba(255, 255, 255, 0.006) 100%
  );
  /* Full viewport width like the divider */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  /* Ensure seamless connection with divider - no gap */
  margin-top: 0;
  padding-top: 0;
  /* Override entrance animation - background should always be visible */
  /* The content inside animates, not the section background */
  opacity: 1 !important;
  transform: none !important;
}

/* Section separator above timeline - gradual fade IN to the band */
.explore-page .section-separator {
  position: relative;
  /* Full viewport width to match timeline section */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.001) 10%,
    rgba(255, 255, 255, 0.002) 20%,
    rgba(255, 255, 255, 0.003) 30%,
    rgba(255, 255, 255, 0.004) 40%,
    rgba(255, 255, 255, 0.005) 50%,
    rgba(255, 255, 255, 0.006) 60%,
    rgba(255, 255, 255, 0.007) 70%,
    rgba(255, 255, 255, 0.008) 80%,
    rgba(255, 255, 255, 0.009) 90%,
    rgba(255, 255, 255, 0.01) 100%
  );
}

/* Temporal divider below timeline - very gradual fade OUT continuing from timeline */
.explore-page .temporal-divider-band-bottom {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.006) 0%,
    rgba(255, 255, 255, 0.0054) 10%,
    rgba(255, 255, 255, 0.0048) 20%,
    rgba(255, 255, 255, 0.0042) 30%,
    rgba(255, 255, 255, 0.0036) 40%,
    rgba(255, 255, 255, 0.003) 50%,
    rgba(255, 255, 255, 0.0024) 60%,
    rgba(255, 255, 255, 0.0018) 70%,
    rgba(255, 255, 255, 0.0012) 80%,
    rgba(255, 255, 255, 0.0006) 90%,
    transparent 100%
  );
  /* Extend the height for a longer fade */
  min-height: 80px;
}

@media (min-width: 1024px) {
  .explore-page .temporal-divider-band-bottom {
    min-height: 100px;
  }
}

/* Move the entrance animation to the timeline content wrapper instead */
.explore-page .explore-timeline-section .timeline-carousel-wrapper {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ============================================================================
   Temporal Divider Band - Bottom Variant
   Fades OUT from timeline back to normal background
   ============================================================================ */

.temporal-divider-band-bottom {
  /* No fade gradient - transparent background */
  background: transparent;
  /* Shorter height for bottom variant */
  min-height: 40px;
  /* No gap with timeline above */
  margin-top: 0;
}

.temporal-divider-band-bottom .temporal-divider-content {
  /* Less padding for bottom variant - just the line */
  padding: 8px 20px;
}

@media (min-width: 1024px) {
  .temporal-divider-band-bottom {
    min-height: 50px;
  }

  .temporal-divider-band-bottom .temporal-divider-content {
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .temporal-divider-band-bottom {
    min-height: 32px;
  }

  .temporal-divider-band-bottom .temporal-divider-content {
    padding: 6px 16px;
  }
}

/* ============================================================================
   Data Table Grid Card Styling
   ============================================================================ */

.data-table-card {
  cursor: pointer;
}

.data-table-bg {
  background: linear-gradient(135deg,
    rgba(0, 100, 150, 0.4) 0%,
    rgba(0, 50, 80, 0.6) 100%
  );
}

/* Table grid pattern overlay */
.data-table-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20% 25%;
  opacity: 0.8;
}

/* ============================================================================
   Data Table Preview Card (with actual table)
   ============================================================================ */

/* Remove outer border from masonry-item when containing embeds */
.masonry-item:has(.data-table-preview-card),
.library-item:has(.data-table-preview-card),
.masonry-item:has(.tweet-container),
.library-item:has(.tweet-container),
.masonry-item:has(.twitter-tweet),
.library-item:has(.twitter-tweet),
.masonry-item:has(.youtube-wrapper),
.library-item:has(.youtube-wrapper),
.masonry-item:has(.youtube-embed-container),
.library-item:has(.youtube-embed-container),
.masonry-item:has(.youtube-embed-wrapper),
.library-item:has(.youtube-embed-wrapper),
.masonry-item:has(.youtube-responsive-wrapper),
.library-item:has(.youtube-responsive-wrapper),
.masonry-item:has(.espn-preview),
.library-item:has(.espn-preview),
.masonry-item:has(.substack-preview),
.library-item:has(.substack-preview),
.masonry-item:has(.generic-link-preview),
.library-item:has(.generic-link-preview) {
  border: none !important;
  background: transparent !important;
}

.data-table-preview-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  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-lg, 12px);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.data-table-preview-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.data-table-preview-content {
  flex: 1;
  overflow: hidden;
  padding: 0;
}

.data-table-preview-content .data-table-wrapper {
  max-height: 280px;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.data-table-preview-content .data-table-wrapper::-webkit-scrollbar {
  display: none;
}

.data-table-preview-content .data-table-viewer {
  font-size: 0.75rem;
  width: 100%;
  border-collapse: collapse;
}

.data-table-preview-content .data-table-viewer th,
.data-table-preview-content .data-table-viewer td {
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.data-table-preview-content .data-table-viewer th {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
}

.data-table-preview-content .data-table-viewer tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Prevent link-like underline styling on table content */
.data-table-preview-card,
.data-table-preview-card *,
.data-table-preview-card:hover,
.data-table-preview-card:hover *,
.data-table-preview-card .data-table-viewer,
.data-table-preview-card .data-table-viewer *,
.data-table-preview-card:hover .data-table-viewer,
.data-table-preview-card:hover .data-table-viewer * {
  text-decoration: none !important;
}

/* Footer with title */
.data-table-preview-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.data-table-preview-footer .data-table-preview-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================================
   Data Table Light Mode Adjustments
   ============================================================================ */
