/* =============================================
   EXTRA ANIMATIONS & POLISH
   ============================================= */

/* Scroll-based reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Glowing text cursor / highlight effect */
.hero-headline .cursor {
  display: inline-block;
  width: 3px; height: 0.9em;
  background: rgba(255,255,255,0.7);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { to { opacity: 0; } }

/* Number counter animation */
@keyframes countUp {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}
.count-up { animation: countUp 0.5s ease forwards; }

/* Parallax tilt on hero cards */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
.hero-card:nth-child(1) { animation: float 6s ease-in-out infinite; }
.hero-card:nth-child(2) { animation: float 7s ease-in-out infinite 1s; }
.hero-card:nth-child(3) { animation: float 5.5s ease-in-out infinite 0.5s; }
.hero-card:nth-child(4) { animation: float 6.5s ease-in-out infinite 1.5s; }

/* Gradient animated border on subscribe card */
.subscribe-sticky {
  position: relative;
}
.subscribe-sticky::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-xl) + 1px);
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05), rgba(255,255,255,0.15));
  background-size: 200% 200%;
  animation: gradientBorder 4s ease infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes gradientBorder {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* Scrollbar for scroll rows */
.scroll-row { padding-bottom: 8px; }

/* Image loading fade-in */
img {
  transition: opacity 0.4s ease;
}
img[loading="lazy"] {
  opacity: 0;
}
img.loaded, img:not([loading]) {
  opacity: 1;
}

/* Creator card hover glow */
.creator-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at 50% 100%, rgba(255,255,255,0.06) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.creator-card:hover::after { opacity: 1; }

/* Smooth page transitions */
#app > * { animation: pageEnter 0.35s cubic-bezier(0.4,0,0.2,1); }

/* Nav active indicator dot */
.nav-link.active {
  position: relative;
}

/* Category pill emoji spacing */
.pill svg { flex-shrink: 0; }

/* Dashboard sidebar mobile overlay */
@media (max-width: 1024px) {
  .sidebar-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 29;
    display: none;
  }
  .sidebar-mobile-overlay.active {
    display: block;
  }
}

/* Stats animate on scroll */
.hero-stat-num {
  transition: all 0.3s ease;
}

/* Ensure scroll rows don't clip */
.scroll-row-wrap {
  position: relative;
  margin-left: -24px;
  margin-right: -24px;
  padding: 0;
}
.scroll-row {
  padding-left: 24px;
  padding-right: 24px;
}
.scroll-arrow.left  { left: 12px; }
.scroll-arrow.right { right: 12px; }

/* Enhanced masonry item hover */
.masonry-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0);
  transition: box-shadow 0.3s ease;
}
.masonry-item:hover::before {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

/* Pill hover glow */
.pill.active {
  box-shadow: 0 0 16px rgba(255,255,255,0.1);
}

/* Content card like count */
.content-card-meta {
  position: absolute;
  bottom: 8px; right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  opacity: 0;
  transition: var(--transition-fast);
}
.content-card:hover .content-card-meta { opacity: 1; }

/* Earnings card shimmer on load */
.earnings-card.loaded::before {
  animation: shimmer 3s infinite 2s;
}

/* Dashboard mobile toggle button */
.dash-mobile-menu-btn {
  display: none;
  position: fixed;
  top: calc(var(--navbar-height) + 16px);
  left: 16px;
  z-index: 40;
  width: 40px; height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
}
@media (max-width: 1024px) {
  .dash-mobile-menu-btn { display: flex; }
  .dashboard-page { padding: 24px 16px 100px; }
  .earnings-grid { grid-template-columns: 1fr 1fr; }
}

/* Animated gradient text for hero */
.hero-headline-gradient {
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #c0c0c0 30%,
    #808080 60%,
    #c0c0c0 80%,
    #ffffff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 4s linear infinite;
}
@keyframes gradientText {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Noise texture overlay on hero */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}
.hero-content { z-index: 2; }
