/* ============================================================
   SECRET ADMIN LOGIN BUTTON - Cyber Security Theme
   ============================================================
   Warna utama:
     #0F172A  → Background gelap utama
     #1E293B  → Background sekunder
     #DC2626  → Neon merah terang (accent)
     #B91C1C  → Merah medium (hover/glow)
   ============================================================ */

/* ---------- Google Font Import ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Poppins:wght@400;500;600;700;800&display=swap');

/* ============================================================
   1. OVERLAY BACKDROP
   ============================================================ */
.sa-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(15,23,42,0.92) 0%, rgba(2,6,23,0.98) 100%);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sa-overlay.sa-active {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   2. POPUP CONTAINER (Glassmorphism Card)
   ============================================================ */
.sa-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  z-index: 99999;
  width: 420px;
  max-width: 90vw;
  padding: 48px 36px 40px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.65) 0%,
    rgba(15, 23, 42, 0.80) 100%
  );
  border: 1px solid rgba(220, 38, 38, 0.25);
  box-shadow:
    0 0 60px rgba(220, 38, 38, 0.15),
    0 0 120px rgba(185, 28, 28, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', 'Poppins', sans-serif;
  overflow: hidden;
}

.sa-popup.sa-active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.sa-popup.sa-closing {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: all 0.4s cubic-bezier(0.4, 0, 1, 1);
}

/* ---------- Animated Border Glow ---------- */
.sa-popup::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    #DC2626 10%,
    transparent 20%,
    transparent 50%,
    #B91C1C 60%,
    transparent 70%
  );
  z-index: -1;
  animation: sa-border-spin 4s linear infinite;
  opacity: 0.6;
}

@keyframes sa-border-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Scanline Effect (Hologram) ---------- */
.sa-popup::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(220, 38, 38, 0.02) 2px,
    rgba(220, 38, 38, 0.02) 4px
  );
  pointer-events: none;
  z-index: 1;
  animation: sa-scanline 8s linear infinite;
}

@keyframes sa-scanline {
  0% { background-position: 0 0; }
  100% { background-position: 0 100px; }
}

/* ============================================================
   3. POPUP INNER ELEMENTS
   ============================================================ */

/* ---------- Shield Icon ---------- */
.sa-shield {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.sa-shield-icon {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: #DC2626;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 12px rgba(220,38,38,0.5));
  animation: sa-shield-pulse 2s ease-in-out infinite;
}

@keyframes sa-shield-pulse {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(220,38,38,0.5)); }
  50% { filter: drop-shadow(0 0 24px rgba(220,38,38,0.8)); }
}

/* ---------- Circular Glow Ring ---------- */
.sa-shield::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(220, 38, 38, 0.2);
  animation: sa-ring-pulse 2s ease-in-out infinite;
}

@keyframes sa-ring-pulse {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(220, 38, 38, 0.2);
  }
  50% {
    transform: scale(1.12);
    border-color: rgba(220, 38, 38, 0.45);
  }
}

/* ---------- Title ---------- */
.sa-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(220, 38, 38, 0.7);
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}

.sa-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: rgba(148, 163, 184, 0.6);
  text-transform: uppercase;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}

/* ============================================================
   4. ADMIN ACCESS BUTTON
   ============================================================ */
.sa-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  padding: 16px 32px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.08) 0%,
    rgba(185, 28, 28, 0.15) 100%
  );
  color: #DC2626;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  z-index: 2;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 0 20px rgba(220, 38, 38, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.3);
}

.sa-btn:hover {
  border-color: rgba(220, 38, 38, 0.7);
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.15) 0%,
    rgba(185, 28, 28, 0.25) 100%
  );
  color: #FCA5A5;
  box-shadow:
    0 0 40px rgba(220, 38, 38, 0.25),
    0 0 80px rgba(185, 28, 28, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px) rotate(0.5deg);
}

.sa-btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.1s;
}

/* ---------- Button Lock Icon ---------- */
.sa-btn-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Button Shimmer Effect ---------- */
.sa-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(220, 38, 38, 0.08) 45%,
    rgba(220, 38, 38, 0.15) 50%,
    rgba(220, 38, 38, 0.08) 55%,
    transparent 100%
  );
  animation: sa-shimmer 3s ease-in-out infinite;
}

@keyframes sa-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ---------- Ripple Effect (on click) ---------- */
.sa-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.4);
  transform: scale(0);
  animation: sa-ripple-anim 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes sa-ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ============================================================
   5. COUNTDOWN TIMER BAR
   ============================================================ */
.sa-timer-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #DC2626 0%, #B91C1C 50%, #DC2626 100%);
  border-radius: 0 0 24px 24px;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.5);
  z-index: 3;
}

/* ---------- Timer Text ---------- */
.sa-timer-text {
  font-family: 'Inter', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  color: rgba(148, 163, 184, 0.4);
  margin-top: 20px;
  position: relative;
  z-index: 2;
}

/* ============================================================
   6. CLOSE BUTTON
   ============================================================ */
.sa-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.5);
  color: rgba(148, 163, 184, 0.5);
  font-size: 16px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  z-index: 3;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.sa-close:hover {
  border-color: rgba(220, 38, 38, 0.4);
  color: #DC2626;
  background: rgba(220, 38, 38, 0.08);
}

/* ============================================================
   7. PARTICLE GLOW EFFECT (Floating Dots)
   ============================================================ */
.sa-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 24px;
  pointer-events: none;
  z-index: 0;
}

.sa-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #DC2626;
  opacity: 0;
  animation: sa-float-particle 6s ease-in-out infinite;
}

.sa-particle:nth-child(1) { left: 10%; top: 80%; animation-delay: 0s; animation-duration: 5s; }
.sa-particle:nth-child(2) { left: 25%; top: 90%; animation-delay: 1s; animation-duration: 6s; }
.sa-particle:nth-child(3) { left: 45%; top: 85%; animation-delay: 2s; animation-duration: 4.5s; }
.sa-particle:nth-child(4) { left: 65%; top: 88%; animation-delay: 0.5s; animation-duration: 5.5s; }
.sa-particle:nth-child(5) { left: 80%; top: 92%; animation-delay: 1.5s; animation-duration: 6.5s; }
.sa-particle:nth-child(6) { left: 90%; top: 78%; animation-delay: 3s; animation-duration: 4s; }
.sa-particle:nth-child(7) { left: 5%;  top: 70%; animation-delay: 2.5s; animation-duration: 7s; }
.sa-particle:nth-child(8) { left: 55%; top: 95%; animation-delay: 0.8s; animation-duration: 5.2s; }

@keyframes sa-float-particle {
  0% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }
  15% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
    transform: translateY(-80px) scale(1.5);
  }
  85% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-160px) scale(0.5);
  }
}

/* ============================================================
   8. LOGO CLICK FEEDBACK (subtle pulse on logo)
   ============================================================ */
.sa-logo-pulse {
  animation: sa-logo-feedback 0.3s ease-out;
}

@keyframes sa-logo-feedback {
  0% { transform: scale(1); }
  50% { transform: scale(0.92); }
  100% { transform: scale(1); }
}



/* ============================================================
   9. HEX GRID DECORATION (background pattern)
   ============================================================ */
.sa-hex-grid {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(30deg, #DC2626 12%, transparent 12.5%, transparent 87%, #DC2626 87.5%, #DC2626),
    linear-gradient(150deg, #DC2626 12%, transparent 12.5%, transparent 87%, #DC2626 87.5%, #DC2626),
    linear-gradient(30deg, #DC2626 12%, transparent 12.5%, transparent 87%, #DC2626 87.5%, #DC2626),
    linear-gradient(150deg, #DC2626 12%, transparent 12.5%, transparent 87%, #DC2626 87.5%, #DC2626),
    linear-gradient(60deg, rgba(220,38,38,0.5) 25%, transparent 25.5%, transparent 75%, rgba(220,38,38,0.5) 75%, rgba(220,38,38,0.5)),
    linear-gradient(60deg, rgba(220,38,38,0.5) 25%, transparent 25.5%, transparent 75%, rgba(220,38,38,0.5) 75%, rgba(220,38,38,0.5));
  background-size: 40px 70px;
  background-position: 0 0, 0 0, 20px 35px, 20px 35px, 0 0, 20px 35px;
}

/* ============================================================
   10. RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 480px) {
  .sa-popup {
    width: 95vw;
    padding: 36px 24px 32px;
    border-radius: 20px;
  }

  .sa-shield {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
  }

  .sa-shield-icon {
    width: 44px;
    height: 44px;
  }

  .sa-title {
    font-size: 12px;
    letter-spacing: 3px;
  }

  .sa-btn {
    padding: 14px 24px;
    font-size: 12px;
    letter-spacing: 2px;
    max-width: 240px;
  }
}

@media (max-width: 360px) {
  .sa-popup {
    padding: 28px 16px 24px;
  }
}
