/* ==========================================================================
   SIM-BMD DINAS PERDAGANGAN KOTA MADIUN - ULTRA ANIMATED MAINTENANCE CSS
   Domain: bmddisdag.webaplikasi.my.id
   ========================================================================== */

:root {
  --bg-deep: #030712;
  --bg-glow: #081229;
  --glass-bg: rgba(10, 18, 36, 0.62);
  --glass-border: rgba(6, 182, 212, 0.28);
  --primary: #06b6d4;
  --secondary: #10b981;
  --accent: #f59e0b;
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --anim-speed: 1;
}

[data-theme="light"] {
  --bg-deep: #eef6ff;
  --bg-glow: #dbeafe;
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(8, 145, 178, 0.3);
  --text-main: #0f172a;
  --text-sub: #475569;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* 1. Animated 3D Perspective Cyber Floor Grid */
.perspective-grid-wrap {
  position: fixed;
  inset: 0;
  perspective: 600px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.cyber-grid-floor {
  position: absolute;
  width: 200%;
  height: 130%;
  left: -50%;
  bottom: -45%;
  background-image:
    linear-gradient(to right, rgba(6, 182, 212, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 185, 129, 0.16) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: rotateX(68deg);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 15%, transparent 72%);
  animation: floorMove calc(6s / var(--anim-speed)) linear infinite;
}

@keyframes floorMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 56px; }
}

/* 2. Floating Aurora Nebulas */
.aurora-blob {
  position: fixed;
  border-radius: 9999px;
  filter: blur(95px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.42;
}

.blob-cyan {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  top: -120px;
  left: -100px;
  animation: blobDrift1 calc(12s / var(--anim-speed)) ease-in-out infinite alternate;
}

.blob-emerald {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
  bottom: -120px;
  right: -90px;
  animation: blobDrift2 calc(14s / var(--anim-speed)) ease-in-out infinite alternate;
}

.blob-amber {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.22;
  animation: blobPulse calc(8s / var(--anim-speed)) ease-in-out infinite alternate;
}

@keyframes blobDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(110px, 80px) scale(1.22); }
}

@keyframes blobDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-110px, -70px) scale(1.18); }
}

@keyframes blobPulse {
  0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.15; }
  100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0.32; }
}

/* 3. Glassmorphic Hologram Container */
.holo-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 25px 70px -15px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(6, 182, 212, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

/* Animated Conic Border Glow */
.holo-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(6, 182, 212, 0.25) 60deg,
    transparent 120deg,
    rgba(16, 185, 129, 0.25) 240deg,
    transparent 300deg
  );
  animation: rotateConic calc(14s / var(--anim-speed)) linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

@keyframes rotateConic {
  100% { transform: rotate(360deg); }
}

/* 4. 3D Gyroscope & Holographic Asset Core */
.gyro-stage {
  position: relative;
  width: 270px;
  height: 270px;
  margin: 0 auto;
  perspective: 900px;
  transform-style: preserve-3d;
}

.gyro-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform-style: preserve-3d;
}

.ring-outer {
  border: 2px dashed rgba(6, 182, 212, 0.45);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
  animation: gyroSpin1 calc(16s / var(--anim-speed)) linear infinite;
}

.ring-middle {
  inset: 20px;
  border: 2px solid rgba(16, 185, 129, 0.4);
  border-top-color: transparent;
  border-bottom-color: transparent;
  animation: gyroSpin2 calc(10s / var(--anim-speed)) linear infinite;
}

.ring-inner {
  inset: 42px;
  border: 2px dotted rgba(245, 158, 11, 0.55);
  animation: gyroSpin3 calc(8s / var(--anim-speed)) linear infinite;
}

.ring-tilt-1 {
  inset: 12px;
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-left-color: transparent;
  border-right-color: transparent;
  animation: gyroTilt1 calc(7s / var(--anim-speed)) ease-in-out infinite alternate;
}

@keyframes gyroSpin1 {
  0% { transform: rotateZ(0deg) rotateX(22deg); }
  100% { transform: rotateZ(360deg) rotateX(22deg); }
}

@keyframes gyroSpin2 {
  0% { transform: rotateZ(360deg) rotateY(28deg); }
  100% { transform: rotateZ(0deg) rotateY(28deg); }
}

@keyframes gyroSpin3 {
  0% { transform: rotateZ(0deg); }
  100% { transform: rotateZ(-360deg); }
}

@keyframes gyroTilt1 {
  0% { transform: rotateX(55deg) rotateY(-25deg) rotateZ(0deg); }
  100% { transform: rotateX(-55deg) rotateY(25deg) rotateZ(180deg); }
}

/* 5. Floating Orbiting Asset Nodes */
.orbit-node {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(6, 182, 212, 0.55);
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.node-1 {
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  animation: floatNode calc(3.2s / var(--anim-speed)) ease-in-out infinite;
}

.node-2 {
  bottom: 14px;
  left: -6px;
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.35);
  animation: floatNode calc(3.8s / var(--anim-speed)) ease-in-out 0.8s infinite;
}

.node-3 {
  bottom: 14px;
  right: -6px;
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
  animation: floatNode calc(4.1s / var(--anim-speed)) ease-in-out 1.5s infinite;
}

@keyframes floatNode {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-10px) scale(1.08); }
}

/* 6. Center Levitating Hologram Cube & Laser Scan Line */
.center-holo-core {
  position: absolute;
  inset: 64px;
  border-radius: 28px;
  background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.28), rgba(16, 185, 129, 0.12) 60%, rgba(15, 23, 42, 0.85));
  border: 1.5px solid rgba(6, 182, 212, 0.6);
  box-shadow:
    0 0 35px rgba(6, 182, 212, 0.4),
    inset 0 0 20px rgba(16, 185, 129, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: coreLevitate calc(4s / var(--anim-speed)) ease-in-out infinite;
}

@keyframes coreLevitate {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(2deg); }
}

.laser-sweep {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #22d3ee, #34d399, #22d3ee, transparent);
  box-shadow: 0 0 16px 4px rgba(34, 211, 238, 0.85);
  animation: laserMove calc(2.4s / var(--anim-speed)) ease-in-out infinite;
}

@keyframes laserMove {
  0%, 100% { top: 8%; opacity: 0.35; }
  50% { top: 90%; opacity: 1; }
}

/* 7. Equalizer / Telemetry Bars */
.eq-bar {
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(to top, #06b6d4, #10b981);
  animation: eqBounce calc(1.1s / var(--anim-speed)) ease-in-out infinite;
}

@keyframes eqBounce {
  0%, 100% { height: 6px; opacity: 0.45; }
  50% { height: 22px; opacity: 1; }
}

/* 8. Shimmer Gradient Text & Progress Bar */
.text-shimmer {
  background: linear-gradient(90deg, #22d3ee, #34d399, #fbbf24, #22d3ee);
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textShine calc(5s / var(--anim-speed)) linear infinite;
}

@keyframes textShine {
  0% { background-position: 0% center; }
  100% { background-position: 250% center; }
}

.progress-glow {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.progress-glow::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: barSweep calc(1.8s / var(--anim-speed)) infinite;
}

@keyframes barSweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 9. Shockwave Pulse Ring on Trigger */
.shockwave-ring {
  position: absolute;
  inset: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  border-radius: 50%;
  border: 3px solid #22d3ee;
  pointer-events: none;
  animation: expandWave 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes expandWave {
  0% { transform: scale(1); opacity: 0.95; }
  100% { transform: scale(22); opacity: 0; }
}
