/* ========================================================
   YPIB CINEMATIC ANIMATIONS & 3D SPECIAL EFFECTS
   Domain: https://ypib.my.id
   ======================================================== */

/* Cinematic Preloader */
#cinematic-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #0a1329 0%, #030712 100%);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#cinematic-preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-emblem-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 28px;
}

.preloader-logo {
  width: 100%;
  height: 100%;
  animation: pulseEmblem 2.5s infinite ease-in-out;
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.6));
}

.preloader-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 2px dashed rgba(245, 158, 11, 0.4);
  animation: rotateRing 12s linear infinite;
}

.preloader-ring-reverse {
  position: absolute;
  top: -18px;
  left: -18px;
  right: -18px;
  bottom: -18px;
  border-radius: 50%;
  border: 1px dotted rgba(16, 185, 129, 0.35);
  animation: rotateRingRev 18s linear infinite;
}

.preloader-title {
  font-family: var(--font-cinematic);
  font-size: 1.15rem;
  letter-spacing: 4px;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 12px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.preloader-progress-track {
  width: 240px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.preloader-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #10b981, #22d3ee);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
  transition: width 0.2s ease;
}

.preloader-counter {
  font-family: monospace;
  color: var(--gold-400);
  font-size: 0.85rem;
  margin-top: 10px;
  letter-spacing: 2px;
}

@keyframes pulseEmblem {
  0%, 100% {
    transform: scale(0.96);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateRingRev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Audio Visualizer Waves (when sound active) */
.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.sound-bar {
  width: 3px;
  height: 4px;
  background: var(--gold-400);
  border-radius: 2px;
  transition: height 0.15s ease;
}

.btn-sound-toggle.playing .sound-bar:nth-child(1) { animation: bounceBar 0.6s infinite ease alternate; }
.btn-sound-toggle.playing .sound-bar:nth-child(2) { animation: bounceBar 0.8s infinite ease alternate 0.2s; }
.btn-sound-toggle.playing .sound-bar:nth-child(3) { animation: bounceBar 0.5s infinite ease alternate 0.4s; }
.btn-sound-toggle.playing .sound-bar:nth-child(4) { animation: bounceBar 0.9s infinite ease alternate 0.1s; }

@keyframes bounceBar {
  0% { height: 4px; }
  100% { height: 18px; }
}

/* 3D Perspective Card Tilt */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tilt-inner {
  transition: transform 0.2s ease-out;
}

/* Glowing Border Beam */
.glow-beam-card {
  position: relative;
}

.glow-beam-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #f59e0b, transparent, #10b981, transparent, #22d3ee);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.glow-beam-card:hover::before {
  opacity: 0.6;
}

/* Cinematic Video Modal */
.cinema-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(25px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  padding: 24px;
}

.cinema-modal.open {
  opacity: 1;
  visibility: visible;
}

.cinema-modal-inner {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: #000;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), var(--glow-gold);
  overflow: hidden;
}

.cinema-modal-video {
  width: 100%;
  aspect-ratio: 16/9;
}

.cinema-modal-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.cinema-modal-close:hover {
  color: var(--gold-400);
  transform: scale(1.15);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: rgba(7, 14, 30, 0.96);
  backdrop-filter: blur(25px);
  border-left: 1px solid var(--border-glass);
  z-index: 99999;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
}

.mobile-nav-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-glass);
}

.drawer-close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
}

.drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-links a {
  font-size: 1.05rem;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-links a.active,
.drawer-links a:hover {
  color: var(--gold-400);
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}
