/* ==========================================================================
   XPTEAM — Dance Cover Community
   Custom Styles & Animations
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
  --bg-primary:    #050505;
  --bg-secondary:  #111111;
  --surface:       #181818;
  --red-accent:    #8B0000;
  --red-glow:      #B22222;
  --red-deep:      #5A0000;
  --text-primary:  #FFFFFF;
  --text-muted:    #B3B3B3;
  --ease-out:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   Base Reset & Body
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar            { width: 4px; }
::-webkit-scrollbar-track      { background: #0a0a0a; }
::-webkit-scrollbar-thumb      { background: var(--red-accent); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-glow); }

/* --------------------------------------------------------------------------
   Scroll Progress Bar
   -------------------------------------------------------------------------- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #5A0000, #B22222, #FF4444);
  z-index: 9999;
  transition: width 0.08s linear;
  box-shadow: 0 0 8px rgba(178, 34, 34, 0.6);
}

/* --------------------------------------------------------------------------
   Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(50px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-18px); }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-28px) scale(1.04); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(1.12); }
}
@keyframes redGlowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(139,0,0,0.3), 0 0 40px rgba(139,0,0,0.1); }
  50%       { box-shadow: 0 0 40px rgba(178,34,34,0.6), 0 0 80px rgba(178,34,34,0.2); }
}
@keyframes blobMorph {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  33%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  66%  { border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50%       { transform: translateY(10px); opacity: 0.3; }
}
@keyframes musicBar {
  0%, 100% { height: 4px; }
  50%       { height: 18px; }
}
@keyframes rippleEffect {
  0%   { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes cursorBlink {
  0%, 100% { border-color: var(--red-glow); }
  50%       { border-color: transparent; }
}

/* --------------------------------------------------------------------------
   Reveal on Scroll
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left  { opacity: 0; transform: translateX(-50px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal-right { opacity: 0; transform: translateX(50px);  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal-left.visible, .reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

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

/* --------------------------------------------------------------------------
   Mouse Spotlight
   -------------------------------------------------------------------------- */
#spotlight {
  position: fixed;
  width: 350px; height: 350px;
  pointer-events: none; z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,0,0,0.12) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: left 0.15s ease, top 0.15s ease;
}

/* --------------------------------------------------------------------------
   NAVBAR
   -------------------------------------------------------------------------- */
#navbar {
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
}
#navbar.scrolled {
  background: rgba(5, 5, 5, 0.88) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(139, 0, 0, 0.2) !important;
}
.nav-link {
  position: relative;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--red-accent), var(--red-glow));
  transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Mobile Menu */
#mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open { transform: translateX(0); }

.mobile-nav-link {
  display: block;
  padding: 14px 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.3s ease, padding-left 0.3s ease;
}
.mobile-nav-link:hover { color: #fff; padding-left: 8px; }

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  transform-origin: center;
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(5,5,5,0.95) 0%,
    rgba(90,0,0,0.35) 40%,
    rgba(5,5,5,0.9) 100%
  );
}
.hero-overlay-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
}
.hero-title {
  font-family: 'Bebas Neue', cursive;
  letter-spacing: 0.02em;
  line-height: 0.88;
}

/* Hero typewriter: fixed line box so flex row doesn’t jump when text is briefly empty */
.typewriter-slot {
  display: inline-block;
  vertical-align: middle;
  line-height: 1.25rem;
  min-height: 1.25rem;
  min-width: min(100%, 28ch);
}

/* Staggered hero text reveal */
.hero-animate { opacity: 0; animation: fadeUp 0.9s var(--ease-out) forwards; }
.hero-animate:nth-child(1) { animation-delay: 0.2s; }
.hero-animate:nth-child(2) { animation-delay: 0.4s; }
.hero-animate:nth-child(3) { animation-delay: 0.6s; }
.hero-animate:nth-child(4) { animation-delay: 0.8s; }
.hero-animate:nth-child(5) { animation-delay: 1.0s; }
.hero-animate:nth-child(6) { animation-delay: 1.2s; }
.hero-animate:nth-child(7) { animation-delay: 1.4s; }

/* Ambient Glow Blobs */
.ambient-blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px); pointer-events: none;
  animation: pulseGlow 5s ease-in-out infinite;
}
.ambient-blob.blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(139,0,0,0.35) 0%, transparent 70%);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.ambient-blob.blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(178,34,34,0.25) 0%, transparent 70%);
  bottom: 50px; right: -50px;
  animation-delay: 2.5s;
}
.ambient-blob.blob-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(90,0,0,0.4) 0%, transparent 70%);
  top: 40%; left: 50%;
  animation-delay: 1.5s;
}

/* Story Highlights */
.highlight-ring {
  background: linear-gradient(135deg, #8B0000, #FF4444, #8B0000);
  padding: 2.5px; border-radius: 50%;
  animation: spinSlow 4s linear infinite;
}
.highlight-inner {
  background: var(--bg-primary);
  border-radius: 50%; padding: 3px;
}

/* Stat Cards */
.stat-card {
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139,0,0,0.18);
  border-radius: 14px;
  transition: all 0.35s var(--ease-out);
}
.stat-card:hover {
  border-color: rgba(178,34,34,0.5);
  box-shadow: 0 0 35px rgba(139,0,0,0.25), 0 8px 32px rgba(0,0,0,0.5);
  transform: translateY(-5px);
}

/* Scroll Indicator */
.scroll-indicator { animation: scrollBounce 2s ease-in-out infinite; }

/* --------------------------------------------------------------------------
   GLASS MORPHISM
   -------------------------------------------------------------------------- */
.glass {
  background: rgba(18, 18, 18, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.05);
}
.glass-red {
  background: rgba(139,0,0,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139,0,0,0.2);
}

/* --------------------------------------------------------------------------
   SECTION COMMON
   -------------------------------------------------------------------------- */
.section-label {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--red-glow);
  font-weight: 600;
}
.section-title {
  font-family: 'Bebas Neue', cursive;
  letter-spacing: 0.02em;
  line-height: 0.9;
}
.section-divider {
  width: 50px; height: 2px;
  background: linear-gradient(90deg, var(--red-accent), var(--red-glow));
  margin: 16px 0;
  border-radius: 2px;
}
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-accent), var(--red-glow), var(--red-accent), transparent);
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn-primary {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #5A0000, #9E0000);
  color: #fff;
  border: none;
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 600; font-size: 0.875rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  text-decoration: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #8B0000, #C22222);
  box-shadow: 0 8px 32px rgba(139,0,0,0.55);
  transform: translateY(-2px);
  color: #fff;
}
.btn-outline {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 600; font-size: 0.875rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  text-decoration: none;
}
.btn-outline:hover {
  border-color: var(--red-accent);
  box-shadow: 0 8px 24px rgba(139,0,0,0.2), inset 0 0 20px rgba(139,0,0,0.05);
  transform: translateY(-2px);
  color: #fff;
}
.btn-sm-red {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  color: var(--red-glow);
  border: 1px solid rgba(178,34,34,0.4);
  padding: 8px 18px;
  border-radius: 50px;
  font-weight: 600; font-size: 0.75rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.btn-sm-red:hover {
  background: rgba(139,0,0,0.15);
  border-color: var(--red-glow);
  box-shadow: 0 0 18px rgba(139,0,0,0.3);
  color: #fff;
}

/* Ripple */
.btn-ripple { position: relative; overflow: hidden; }
.btn-ripple .ripple-wave {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  animation: rippleEffect 0.6s ease-out forwards;
  pointer-events: none;
  transform-origin: center;
}

/* --------------------------------------------------------------------------
   ABOUT SECTION
   -------------------------------------------------------------------------- */
.about-img-wrap {
  position: relative; overflow: hidden; border-radius: 16px;
  transition: transform 0.5s var(--ease-out);
}
.about-img-wrap:hover { transform: scale(1.02); }
.about-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.about-img-wrap:hover img { transform: scale(1.06); }
.about-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(139,0,0,0.12);
  border: 1px solid rgba(139,0,0,0.25);
  color: var(--text-muted);
  font-size: 0.78rem; font-weight: 500;
  padding: 5px 12px; border-radius: 50px;
  transition: all 0.3s ease;
}
.about-tag:hover {
  background: rgba(139,0,0,0.22);
  border-color: rgba(178,34,34,0.5);
  color: #fff;
}

/* --------------------------------------------------------------------------
   SHOWCASE — category cards (YouTube links)
   -------------------------------------------------------------------------- */
.showcase-category-card {
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.showcase-category-card:hover {
  border-color: rgba(178,34,34,0.35);
  box-shadow: 0 20px 60px rgba(139,0,0,0.25), 0 0 0 1px rgba(139,0,0,0.1);
  transform: translateY(-6px);
}
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(5,5,5,0.95) 0%,
    rgba(139,0,0,0.15) 55%,
    transparent 100%
  );
  transition: opacity 0.3s ease;
}

/* --------------------------------------------------------------------------
   ACTIVITY CARDS
   -------------------------------------------------------------------------- */
.activity-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 16px;
  padding: 32px 24px;
  position: relative; overflow: hidden;
  transition: all 0.4s var(--ease-out);
}
.activity-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-accent), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.activity-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(139,0,0,0.08) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.4s ease;
}
.activity-card:hover {
  transform: translateY(-8px);
  border-color: rgba(178,34,34,0.35);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(139,0,0,0.12);
}
.activity-card:hover::before, .activity-card:hover::after { opacity: 1; }

.activity-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #4A0000, #9E0000);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  transition: all 0.35s var(--ease-spring);
  position: relative; z-index: 1;
}
.activity-card:hover .activity-icon {
  box-shadow: 0 0 28px rgba(178,34,34,0.55);
  transform: scale(1.1) rotate(-5deg);
}

/* --------------------------------------------------------------------------
   SOCIAL MEDIA CARDS
   -------------------------------------------------------------------------- */
.social-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 16px; padding: 28px 24px;
  position: relative; overflow: hidden;
  transition: all 0.4s var(--ease-out);
  cursor: pointer;
}
.social-card:hover { transform: translateY(-6px); }

/* Platform-specific hover glows */
.social-card.instagram:hover  { border-color: rgba(228,64,95,0.4);  box-shadow: 0 20px 50px rgba(228,64,95,0.12); }
.social-card.tiktok:hover     { border-color: rgba(105,201,208,0.4); box-shadow: 0 20px 50px rgba(105,201,208,0.12); }
.social-card.youtube:hover    { border-color: rgba(255,0,0,0.4);    box-shadow: 0 20px 50px rgba(255,0,0,0.12); }

.social-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 16px;
  transition: transform 0.35s var(--ease-spring);
}
.social-card:hover .social-icon-wrap { transform: scale(1.12) rotate(-4deg); }

.social-card.instagram .social-icon-wrap  { background: linear-gradient(135deg, #833ab4, #e1306c, #f77737); color: #fff; }
.social-card.tiktok .social-icon-wrap     { background: #000; color: #fff; border: 1px solid rgba(105,201,208,0.3); }
.social-card.youtube .social-icon-wrap    { background: #FF0000; color: #fff; }

/* --------------------------------------------------------------------------
   MEMBER HUB
   -------------------------------------------------------------------------- */
.hub-wrapper {
  background: rgba(8,8,8,0.9);
  border: 1px solid rgba(139,0,0,0.2);
  border-radius: 20px; overflow: hidden;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 0 80px rgba(139,0,0,0.08);
}
.hub-sidebar {
  background: rgba(12,12,12,0.95);
  border-right: 1px solid rgba(139,0,0,0.12);
}
.hub-topbar {
  background: rgba(10,10,10,0.9);
  border-bottom: 1px solid rgba(139,0,0,0.1);
}
.hub-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  color: var(--text-muted); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s ease;
  border-left: 2px solid transparent;
}
.hub-nav-item:hover, .hub-nav-item.active {
  background: rgba(139,0,0,0.12); color: #fff;
}
.hub-nav-item.active { border-left-color: var(--red-accent); }

.hub-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red-glow);
  animation: redGlowPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
.hub-mini-card {
  background: rgba(20,20,20,0.8);
  border: 1px solid rgba(139,0,0,0.1);
  border-radius: 10px; padding: 14px;
  transition: border-color 0.3s ease;
}
.hub-mini-card:hover { border-color: rgba(178,34,34,0.3); }

.hub-announcement {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: all 0.2s ease;
}
.hub-announcement:hover { padding-left: 6px; }
.hub-announcement:last-child { border-bottom: none; }

/* Hub float animation */
.hub-float { animation: float 5s ease-in-out infinite; }

/* --------------------------------------------------------------------------
   JOIN CTA SECTION
   -------------------------------------------------------------------------- */
.join-section {
  position: relative; overflow: hidden;
}
.join-glow-1 {
  position: absolute;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,0,0,0.2) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none; filter: blur(60px);
  animation: pulseGlow 4s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
footer { border-top: 1px solid rgba(139,0,0,0.15); }
.footer-social-link {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(24,24,24,1);
  border: 1px solid rgba(139,0,0,0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
}
.footer-social-link:hover {
  background: rgba(139,0,0,0.18);
  border-color: var(--red-accent);
  color: #fff;
  box-shadow: 0 0 15px rgba(139,0,0,0.3);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   BACK TO TOP
   -------------------------------------------------------------------------- */
#back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 46px; height: 46px;
  background: linear-gradient(135deg, #5A0000, #9E0000);
  color: #fff; border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 200;
  opacity: 0; transform: translateY(20px);
  transition: all 0.35s var(--ease-out);
  box-shadow: 0 4px 20px rgba(139,0,0,0.45);
  font-size: 0.9rem;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover {
  background: linear-gradient(135deg, #8B0000, #C22222);
  box-shadow: 0 8px 30px rgba(139,0,0,0.65);
  transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   MUSIC TOGGLE
   -------------------------------------------------------------------------- */
#music-toggle {
  position: fixed; bottom: 2rem; left: 2rem;
  width: 46px; height: 46px;
  background: rgba(18,18,18,0.92);
  backdrop-filter: blur(12px);
  color: var(--text-muted);
  border: 1px solid rgba(139,0,0,0.28);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 200;
  transition: all 0.35s ease;
  font-size: 0.85rem;
}
#music-toggle:hover, #music-toggle.playing {
  color: #fff; border-color: var(--red-accent);
  box-shadow: 0 0 22px rgba(139,0,0,0.45);
}
#music-toggle.playing { animation: redGlowPulse 2s ease-in-out infinite; }

.music-bars { display: flex; align-items: flex-end; gap: 2.5px; height: 18px; }
.music-bar {
  width: 3px; border-radius: 2px;
  background: var(--red-glow);
  animation: musicBar 0.9s ease-in-out infinite;
}
.music-bar:nth-child(1) { animation-delay: 0s; }
.music-bar:nth-child(2) { animation-delay: 0.15s; }
.music-bar:nth-child(3) { animation-delay: 0.3s; }
.music-bar:nth-child(4) { animation-delay: 0.45s; }

/* --------------------------------------------------------------------------
   RESPONSIVE — Explicit fallbacks (supplement Tailwind breakpoints)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  /* Ensure desktop nav hides & hamburger shows below lg (1024px) */
  #desktop-nav        { display: none !important; }
  #menu-btn           { display: flex !important; }
  #nav-join-btn-wrap  { display: none; }

  .hero-title { font-size: clamp(4rem, 12vw, 9rem); }
}
@media (max-width: 767px) {
  /* Ensure CTA pill in navbar hides below md (768px) */
  #nav-join-btn { display: none !important; }

  .hero-title    { font-size: clamp(3.5rem, 14vw, 6rem); }
  .section-title { font-size: clamp(2.8rem, 10vw, 5rem); }
  #music-toggle  { bottom: 5.5rem; }
  .hero-bg       { background-attachment: scroll; }
}
@media (max-width: 479px) {
  .hero-title    { font-size: clamp(3rem, 16vw, 4.5rem); }
  .hub-wrapper   { border-radius: 14px; }
  .hub-sidebar   { display: none; }
}

/* --------------------------------------------------------------------------
   SHIMMER EFFECT (for loading states)
   -------------------------------------------------------------------------- */
.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% auto;
  animation: shimmer 2.5s linear infinite;
}

/* --------------------------------------------------------------------------
   UTILITY
   -------------------------------------------------------------------------- */
.text-red-accent  { color: var(--red-accent); }
.text-red-glow    { color: var(--red-glow); }
.text-muted-xp    { color: var(--text-muted); }
.bg-surface       { background-color: var(--surface); }
.border-red-dim   { border-color: rgba(139,0,0,0.2); }

.tag-pill {
  display: inline-flex; align-items: center;
  background: rgba(139,0,0,0.1);
  border: 1px solid rgba(139,0,0,0.2);
  color: var(--red-glow); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 50px;
}

/* Image gradient overlay */
.img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5,5,5,0.85) 0%, transparent 60%);
  pointer-events: none;
}

/* About img wrap needs relative */
.about-img-wrap { position: relative; }

/* Prevent FOUC on load */
body.loading * { animation-play-state: paused !important; }
