/* ==========================================================================
   DJ ANTLER — High Performance Cyberpunk & Club Dynamic Animation System
   Optimized for Silky-Smooth 60fps / 120fps Mobile & Desktop Scrolling
   ========================================================================== */

:root {
  --brand-crimson: #ff1e56;
  --brand-neon-red: #ff2d55;
  --brand-cyan: #00f2fe;
  --brand-purple: #9d4edd;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   1. Base & Viewport Smooth Scrolling Configuration
   -------------------------------------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-overflow-scrolling: touch;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  background-color: #050608;
}

/* Layout containment for blazing-fast scroll performance */
section {
  content-visibility: auto;
  contain-intrinsic-size: auto 650px;
}

#hero {
  content-visibility: visible;
}

/* --------------------------------------------------------------------------
   2. Chrome & Metallic Typography
   -------------------------------------------------------------------------- */
.chrome-title, .chrome-text {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f8fafc 20%,
    #cbd5e1 40%,
    #475569 50%,
    #ffffff 65%,
    #cbd5e1 85%,
    #64748b 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.15));
  background-size: 100% 100%;
}

.text-glow-red {
  text-shadow: 0 0 20px rgba(255, 30, 86, 0.6), 0 0 40px rgba(255, 30, 86, 0.3);
}

.text-glow-cyan {
  text-shadow: 0 0 20px rgba(0, 242, 254, 0.6), 0 0 40px rgba(0, 242, 254, 0.3);
}

/* --------------------------------------------------------------------------
   3. Preloader Animation Styles
   -------------------------------------------------------------------------- */
#preloader {
  transition: opacity 0.5s var(--ease-smooth), visibility 0.5s var(--ease-smooth), transform 0.5s var(--ease-spring);
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  pointer-events: none;
}

@keyframes laserSweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.laser-text-sweep {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.4) 0%,
    #ff1e56 25%,
    #00f2fe 50%,
    #ffffff 75%,
    rgba(255, 255, 255, 0.4) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: laserSweep 3s infinite linear;
}

@keyframes eqBounce {
  0%, 100% { height: 6px; }
  50% { height: 26px; }
}

.eq-bar {
  animation: eqBounce 1.2s infinite ease-in-out;
  transform: translateZ(0);
}
.eq-bar:nth-child(1) { animation-delay: 0.0s; }
.eq-bar:nth-child(2) { animation-delay: 0.2s; }
.eq-bar:nth-child(3) { animation-delay: 0.4s; }
.eq-bar:nth-child(4) { animation-delay: 0.1s; }
.eq-bar:nth-child(5) { animation-delay: 0.3s; }

/* --------------------------------------------------------------------------
   4. Scroll Progress Indicator Bar
   -------------------------------------------------------------------------- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #ff1e56, #9d4edd, #00f2fe, #ff1e56);
  background-size: 200% 100%;
  z-index: 9999;
  transform: translateZ(0);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   5. Hardware-Accelerated Reveal Animations (Intersection Observer)
   -------------------------------------------------------------------------- */
.reveal-init {
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate3d(0, 20px, 0);
  backface-visibility: hidden;
}

.reveal-up {
  transform: translate3d(0, 25px, 0);
}

.reveal-down {
  transform: translate3d(0, -25px, 0);
}

.reveal-left {
  transform: translate3d(-25px, 0, 0);
}

.reveal-right {
  transform: translate3d(25px, 0, 0);
}

.reveal-zoom {
  transform: scale3d(0.95, 0.95, 1);
}

/* Active revealed state */
.reveal-init.reveal-active {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1) !important;
}

/* Stagger delays for grid items and card children */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.10s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.20s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.30s; }
.stagger-7 { transition-delay: 0.35s; }
.stagger-8 { transition-delay: 0.40s; }

/* --------------------------------------------------------------------------
   6. Glassmorphism & Ambient Glow Cards
   -------------------------------------------------------------------------- */
.glass-card {
  background: rgba(12, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring), border-color 0.3s ease;
  transform: translateZ(0);
}

.glass-card:hover {
  border-color: rgba(255, 30, 86, 0.35);
  box-shadow: 0 16px 35px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 30, 86, 0.12);
}

/* Ambient laser glows */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  transform: translateZ(0);
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: rgba(255, 30, 86, 0.10);
  top: -80px;
  left: -80px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: rgba(0, 242, 254, 0.07);
  top: 40%;
  right: -100px;
}

.glow-3 {
  width: 400px;
  height: 400px;
  background: rgba(157, 78, 221, 0.07);
  bottom: 10%;
  left: 5%;
}

/* --------------------------------------------------------------------------
   7. Micro-Interactions & Hover Effects
   -------------------------------------------------------------------------- */
.laser-grid {
  position: absolute;
  inset: 0;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  pointer-events: none;
}

.btn-glow {
  position: relative;
  transition: all 0.25s var(--ease-spring);
  transform: translateZ(0);
}

.btn-glow:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 25px rgba(255, 30, 86, 0.5), 0 0 50px rgba(255, 30, 86, 0.2);
}

.genre-card {
  transition: all 0.3s var(--ease-spring);
  transform: translateZ(0);
}

.genre-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 35px -8px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 30, 86, 0.18);
}

/* Soundpad Active Visuals */
.sound-pad {
  user-select: none;
  touch-action: manipulation;
  transition: all 0.12s ease;
  transform: translateZ(0);
}

.sound-pad:active, .sound-pad.pad-active {
  background: rgba(255, 30, 86, 0.3) !important;
  border-color: #ff1e56 !important;
  transform: scale(0.95);
  box-shadow: 0 0 20px rgba(255, 30, 86, 0.45);
}

.genre-preset-btn.active {
  background: rgba(255, 30, 86, 0.25);
  border-color: #ff1e56;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 30, 86, 0.3);
}

/* Floating status pill animation */
@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.animate-float {
  animation: floatGentle 4s ease-in-out infinite;
  transform: translateZ(0);
}

/* --------------------------------------------------------------------------
   8. Back to Top Floating Button
   -------------------------------------------------------------------------- */
#back-to-top {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 15px, 0);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s var(--ease-spring);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

/* --------------------------------------------------------------------------
   9. Custom Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #050608;
}

::-webkit-scrollbar-thumb {
  background: #232838;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff1e56;
}

/* --------------------------------------------------------------------------
   10. Mobile & Tablet Responsiveness Enhancements
   -------------------------------------------------------------------------- */
img, video, iframe, canvas {
  max-width: 100%;
  height: auto;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* Smooth Horizontal Snap Scroll on Mobile */
.mobile-swipe-row {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  width: 100%;
  max-width: 100%;
}

.mobile-swipe-card {
  flex: 0 0 80vw;
  max-width: 290px;
  min-width: 0;
  scroll-snap-align: center;
  scroll-snap-stop: normal;
}

@media (min-width: 640px) {
  .mobile-swipe-row {
    display: grid;
    overflow-x: visible;
    overflow-y: visible;
    scroll-snap-type: none;
  }
  .mobile-swipe-card {
    flex: auto;
    max-width: none;
    scroll-snap-align: none;
  }
}

/* Mobile Specific GPU & Scrolling Optimizations */
@media (max-width: 768px) {
  .glass-card {
    background: rgba(12, 14, 20, 0.94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .ambient-glow {
    filter: blur(40px);
    opacity: 0.35;
  }

  .reveal-left, .reveal-right, .reveal-up, .reveal-down {
    transform: translate3d(0, 15px, 0);
  }
}
