/* ===============================
   PAGE 7: UNDER MAINTENANCE STYLE
   =============================== */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Orbitron', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  overflow: hidden;
}

/* ===============================
   💥 BRICK SHATTER CLICK EFFECT
   =============================== */

.shatter span {
  display: inline-block;
  position: relative;
  transition: transform 0.6s ease, opacity 0.8s ease;
}

/* Animasi potongan batu jatuh */
.shatter span.fall {
  opacity: 0;
  transform: translate(
    calc(var(--x) * 1px),
    calc(var(--y) * 1px)
  ) rotate(calc(var(--r) * 1deg)) scale(0.8);
  transition: transform 0.8s ease-out, opacity 1s ease-out;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Orbitron', sans-serif;
  background: #000;
  overflow-x: hidden;
  display: block; /* ← ubah dari flex ke block */
}

/* Pastikan navbar & divider kelihatan */
.navbar, .navbar-divider {
  position: relative;
  z-index: 10;
}

/* Section ini aja yang di tengah */
.maintenance-section {
  min-height: calc(100vh - 120px); /* biar space buat navbar & divider */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 2;
  position: relative;
  animation: fadeIn 1.2s ease-in-out forwards;
}


/* Centered layout */
.maintenance-section {
  text-align: center;
  z-index: 2;
  position: relative;
  animation: fadeIn 1.2s ease-in-out forwards;
}

/* Glitch text animation */
.glitch {
  position: relative;
  font-size: 42px;
  font-weight: 700;
  color: cyan;
  text-shadow:
    0 0 10px cyan,
    0 0 20px cyan,
    0 0 40px rgba(0,255,255,0.8);
  animation: flicker 2.5s infinite alternate;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  color: cyan;
  background: transparent;
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 magenta;
  clip: rect(0, 900px, 0, 0);
  animation: glitchTop 2s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 lime;
  clip: rect(0, 900px, 0, 0);
  animation: glitchBottom 2.3s infinite linear alternate-reverse;
}

/* Subtitle text */
.maintenance-section p {
  color: #aaa;
  font-size: 16px;
  margin-top: 20px;
  text-shadow: 0 0 8px rgba(0,255,255,0.6);
  animation: fadeInUp 1.8s ease-in-out;
}

/* === Light Mode (auto-detect, no JS changes) === */
body:not(.dark-mode) {
  background: #f6f6f6;
}

body:not(.dark-mode) .glitch {
  color: #000;
  text-shadow:
    0 0 8px #fff,
    0 0 16px #fff,
    0 0 30px rgba(255,255,255,0.8);
}

body:not(.dark-mode) .glitch::before {
  text-shadow: -2px 0 #aaa;
}
body:not(.dark-mode) .glitch::after {
  text-shadow: -2px 0 #888;
}
body:not(.dark-mode) p {
  color: #333;
  text-shadow: 0 0 6px #fff;
}

/* === Keyframes === */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.3; }
}

@keyframes glitchTop {
  0% { clip: rect(0, 900px, 0, 0); }
  10% { clip: rect(10px, 900px, 50px, 0); }
  20% { clip: rect(80px, 900px, 100px, 0); }
  40% { clip: rect(20px, 900px, 70px, 0); }
  60% { clip: rect(60px, 900px, 90px, 0); }
  80% { clip: rect(10px, 900px, 40px, 0); }
  100% { clip: rect(0, 900px, 0, 0); }
}

@keyframes glitchBottom {
  0% { clip: rect(0, 900px, 0, 0); }
  15% { clip: rect(60px, 900px, 90px, 0); }
  35% { clip: rect(20px, 900px, 60px, 0); }
  55% { clip: rect(70px, 900px, 100px, 0); }
  75% { clip: rect(40px, 900px, 80px, 0); }
  100% { clip: rect(0, 900px, 0, 0); }
}

/* ===================================================
   📱 MOBILE DARK MODE TOGGLE -> SINGLE BUTTON STYLE
   =================================================== */
@media (max-width: 768px) {
  /* Sembunyikan label text */
  .toggle-slider .label-text {
    display: none !important;
  }

  /* Hapus background toggle bar */
  .toggle-slider {
    background: none !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
  }

  /* Jadikan knob tombol bulat besar */
  .toggle-slider .knob {
    position: static !important;
    transform: none !important;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  /* 🌙 Dark mode button style */
  body.dark-mode .toggle-slider .knob {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0ff;
    box-shadow: 0 0 8px #0ff, inset 0 0 6px rgba(0,255,255,0.6);
  }

  body.dark-mode .toggle-slider .knob span.icon {
    color: #0ff;
    font-size: 20px;
    content: '🌙';
  }

  /* ☀️ Light mode button style */
  body:not(.dark-mode) .toggle-slider .knob {
    background: #fff;
    border: 2px solid #000;
    box-shadow: 0 0 8px #000, inset 0 0 5px rgba(0,0,0,0.3);
  }

  body:not(.dark-mode) .toggle-slider .knob span.icon {
    color: #000;
    font-size: 20px;
    content: '☀️';
  }

  /* Efek hover */
  .toggle-slider .knob:hover {
    transform: scale(1.15);
  }
}
