/* ==========================================================================
   eLHa Management — Ultra-Craft Obsidian Black & Crisp White Stylesheet
   - Latar Hitam Pekat (#000000), Teks Putih Tajam (#FFFFFF), Aksen Merah (#EF3326)
   - Animasi Kinetik Teks, Scroll Reveal, Spotlight Hover, & Click Ripple Global
   - Proteksi Seleksi UI & Single-Scrollbar Modal Responsif (Mobile & Desktop)
   ========================================================================== */

:root {
  --bg-black: #000000;
  --bg-surface: #0b0b0e;
  --bg-elevated: #121218;
  --ink-white: #ffffff;
  --ink-soft: #d4d4d8;
  --ink-muted: #8a8a95;
  --border-subtle: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.42);
  --elha-red: #ef3326;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-black);
  color: var(--ink-white);
}

body {
  background-color: var(--bg-black);
  color: var(--ink-white);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

/* Izinkan seleksi teks hanya di kolom input & kode tiket */
input,
textarea,
select,
pre,
.allow-select {
  user-select: text !important;
  -webkit-user-select: text !important;
}

.font-display {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
}

.font-mono-code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

/* Top Reading Scroll Progress Line */
.scroll-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 60;
  pointer-events: none;
}
.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffffff 0%, #ef3326 60%, #ffffff 100%);
  box-shadow: 0 0 10px rgba(239, 51, 38, 0.65);
  transition: width 0.08s linear;
}

/* ==========================================================================
   CINEMATIC AMBIENT OBSIDIAN HERO + FLOATING SPOTLIGHT
   ========================================================================== */
@keyframes aurora-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.72;
  }
  50% {
    transform: translate3d(2.5%, -3%, 0) scale(1.06);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.72;
  }
}

.bg-obsidian-hero {
  background-color: #000000;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.038) 1px, transparent 1px);
  background-size: 46px 46px;
}

.hero-ambient-glow {
  position: absolute;
  inset: -15%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 48% 42% at 76% 28%, rgba(255, 255, 255, 0.11), transparent 72%),
    radial-gradient(ellipse 36% 36% at 16% 24%, rgba(239, 51, 38, 0.14), transparent 68%),
    radial-gradient(ellipse 40% 35% at 50% 85%, rgba(255, 255, 255, 0.06), transparent 70%);
  animation: aurora-drift 10s ease-in-out infinite;
  z-index: 0;
}

/* ==========================================================================
   ANIMASI TEKS KINETIK (SHIMMER, STAGGER REVEAL & FLOATING)
   ========================================================================== */
@keyframes text-shimmer-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.text-kinetic-shimmer {
  background: linear-gradient(110deg, #ffffff 15%, #9ca3af 38%, #ffffff 52%, #ef3326 70%, #ffffff 88%);
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: text-shimmer-flow 6.5s ease-in-out infinite;
}

@keyframes hero-enter-up {
  0% {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.anim-hero-1 { animation: hero-enter-up 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both; }
.anim-hero-2 { animation: hero-enter-up 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both; }
.anim-hero-3 { animation: hero-enter-up 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both; }
.anim-hero-4 { animation: hero-enter-up 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.38s both; }
.anim-hero-5 { animation: hero-enter-up 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.48s both; }
.anim-hero-card { animation: hero-enter-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both; }

@keyframes subtle-float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}
.hero-float-card {
  animation: subtle-float 7s ease-in-out infinite;
}
.hero-float-card:hover {
  animation-play-state: paused;
}

/* Scroll Reveal Classes (Triggered via IntersectionObserver) */
.reveal-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth View Transition Animation */
@keyframes view-fade-slide {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.view-animate-in {
  animation: view-fade-slide 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Modal Spring Pop-In */
@keyframes modal-spring {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal-spring-box {
  animation: modal-spring 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ==========================================================================
   INFINITE MONOCHROME MARQUEE TICKER STRIP
   ========================================================================== */
@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.marquee-viewport {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}

/* ==========================================================================
   UNIVERSAL CLICK RIPPLE, TACTILE SPRING & CTA SHIMMER (SAAT DIKLIK APAPUN!)
   ========================================================================== */
button,
a,
[onclick] {
  position: relative;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s ease,
              border-color 0.2s ease,
              color 0.2s ease,
              box-shadow 0.25s ease;
}

button:active:not(:disabled),
a:active {
  transform: scale(0.955) !important;
}

/* Shimmer sweep across primary white buttons */
.btn-shine-white {
  overflow: hidden;
}
.btn-shine-white::after {
  content: '';
  position: absolute;
  top: 0;
  left: -130%;
  width: 65%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-22deg);
  transition: left 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.btn-shine-white:hover::after {
  left: 145%;
}

/* Global Click Ripple Wave Element (Spawned dynamically on every tap/click) */
@keyframes global-click-ripple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.65;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.8);
    opacity: 0;
  }
}

.click-ripple-wave {
  position: fixed;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45) 0%, rgba(239, 51, 38, 0.28) 55%, transparent 75%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  animation: global-click-ripple 0.52s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Subtle Pop Animation on Quantity / Price Value Updates */
@keyframes value-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.anim-value-pop {
  animation: value-pop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Dark Monochrome Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #070709;
}
::-webkit-scrollbar-thumb {
  background: #2c2c34;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ffffff;
}

/* Sticky Pure Black Header */
.site-header-black {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

/* Seamless Logo Rendering on Black Background */
.elha-logo-img {
  display: block;
  object-fit: contain;
  mix-blend-mode: lighten;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Architectural Obsidian Cards with Cursor Spotlight Border */
.obsidian-card {
  position: relative;
  background: linear-gradient(160deg, #111116 0%, #09090c 100%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.3s ease;
}

.obsidian-card-hover {
  --mx: 50%;
  --my: 50%;
}
.obsidian-card-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.075), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
.obsidian-card-hover:hover::before {
  opacity: 1;
}
.obsidian-card-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 26px 52px -20px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Luxury Black-Edition E-Ticket Boarding Pass */
.eticket-pass-dark {
  position: relative;
  background: linear-gradient(155deg, #131319 0%, #070709 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  overflow: hidden;
  box-shadow: 0 20px 45px -18px rgba(0, 0, 0, 0.9);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.eticket-pass-dark:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.5);
}

.eticket-perforation-dark {
  position: relative;
  border-top: 2px dashed rgba(255, 255, 255, 0.18);
  margin: 1.25rem 0;
}
.eticket-perforation-dark::before,
.eticket-perforation-dark::after {
  content: '';
  position: absolute;
  top: -12px;
  width: 22px;
  height: 22px;
  background-color: #050507;
  border-radius: 9999px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.eticket-perforation-dark::before { left: -32px; }
.eticket-perforation-dark::after { right: -32px; }

/* Scanner Animated Beam */
@keyframes scan-beam {
  0% { top: 10%; opacity: 0.7; }
  50% { top: 86%; opacity: 1; }
  100% { top: 10%; opacity: 0.7; }
}
.scanner-laser {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ef3326, #ffffff, #ef3326, transparent);
  box-shadow: 0 0 14px rgba(239, 51, 38, 0.85);
  animation: scan-beam 2.2s ease-in-out infinite;
  pointer-events: none;
}

/* Smooth Horizontal Tab Track */
.no-scrollbar::-webkit-scrollbar,
.h-scroll-track::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.h-scroll-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Lock outer page scroll when modal is open so only ONE clean scrollbar appears */
html.modal-open-lock,
body.modal-open-lock {
  overflow: hidden !important;
}
.modal-single-scroll {
  overscroll-behavior: contain;
}

/* Live Camera QR Scanner Viewport Styling */
#qrCameraReader {
  width: 100%;
  overflow: hidden;
  border-radius: 1rem;
}
#qrCameraReader video {
  width: 100% !important;
  max-height: 320px !important;
  object-fit: cover !important;
  border-radius: 0.875rem !important;
}
#qrCameraReader__dashboard,
#qrCameraReader__status_span {
  display: none !important;
}

.qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

@media (max-width: 767px) {
  body {
    padding-bottom: 80px;
  }
}

/* Print Mode */
@media print {
  body * { visibility: hidden !important; }
  #ticketZoomModal, #ticketZoomModal * { visibility: visible !important; }
  #ticketZoomModal {
    position: fixed !important;
    inset: 0 !important;
    background: #ffffff !important;
    padding: 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }
  .no-print { display: none !important; }
}
