/* ==================== CANVAS BACKGROUND ==================== */
#hologram-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}



/* grid hologram scanline */
.certificate-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,255,255,0.05) 0px,
    rgba(0,255,255,0.05) 2px,
    transparent 2px,
    transparent 4px
  );
  animation: scanMove 3s linear infinite;
  pointer-events: none;
  z-index: 3;
}
@keyframes scanMove {
  from { transform: translateY(-100%); }
  to   { transform: translateY(100%); }
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  background: transparent !important;
}

/* ==================== GLOBE ==================== */
.certificate-section {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  perspective: 1600px;
  position: relative;
  overflow: hidden;
}

.orbit {
  position: relative;
  width: 800px;
  height: 400px;
  transform-style: preserve-3d;
  transition: opacity 0.4s ease;
}
.orbit.show { opacity: 1; pointer-events: auto; }
.orbit.hide { opacity: 0; pointer-events: none; }

/* certificate dalam globe */
.certificate {
  position: absolute;
  width: 220px;
  height: 150px;
  top: 50%; left: 50%;
  margin: -75px 0 0 -110px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(120, 0, 255, 0.08); /* light default */
  border: 1px solid rgba(120, 0, 255, 0.5);
  box-shadow: 0 0 20px rgba(120,0,255,0.7),
              0 0 40px rgba(120,0,255,0.3) inset;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.certificate img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* crop tengah */
}
.certificate:hover {
  transform: scale(1.2) translateZ(60px);
  box-shadow: 0 0 25px cyan, 0 0 60px rgba(0,255,255,0.6) inset;
}

/* ==================== BUTTON STYLE ==================== */
/* ==================== BUTTON STYLE ==================== */
button {
  font-family: 'Orbitron', sans-serif;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* ==== DARK MODE ==== */
body.dark-mode button {
  background: rgba(0,255,255,0.1);
  border: 1px solid cyan;
  color: cyan;
  box-shadow: 0 0 10px cyan, 0 0 20px rgba(0,255,255,0.6) inset;
}
body.dark-mode button:hover {
  background: cyan;
  color: black;
  box-shadow: 0 0 15px cyan, 0 0 30px cyan;
}

/* ==== LIGHT MODE ==== */
button {
  background: rgba(0,0,0,0.05);
  border: 1px solid black;
  color: black;
  box-shadow: 0 0 10px black, 0 0 20px rgba(0,0,0,0.4) inset;
}
button:hover {
  background: black;
  color: white;
  box-shadow: 0 0 15px black, 0 0 30px black;
}




/* posisi button */
.controls-top {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}
.controls-bottom-left {
  position: absolute;
  bottom: 30px;
  left: 30px;
  z-index: 1000;
}
.controls-bottom-right {
  position: absolute;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

/* ==================== RANDOM VIEW ==================== */
#random-view {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#random-view.show {
  opacity: 1;
  transform: scale(1);
}

.random-card {
  background: rgba(0,0,0,0.6);
  border: 1px solid cyan;
  box-shadow: 0 0 20px cyan;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: white;
  max-width: 600px;
  width: 80%;
}
.random-card .img-wrapper {
  width: 100%;
  height: 250px;
  overflow: hidden;
  margin: 15px 0;
}
.random-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.random-controls {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

/* ==================== ALL VIEW ==================== */
#all-view {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  padding: 80px 20px 40px;
  z-index: 2000;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#all-view.show {
  opacity: 1;
  transform: scale(1);
}

.all-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
  align-items: center;
  width: 100%;
  padding-bottom: 40px;
}
.cert-card {
  background: rgba(0,0,0,0.7);
  border: 2px solid cyan;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: white;
  max-width: 600px;
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cert-card .img-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
  margin: 12px 0;
  border-radius: 8px;
  background: black;
}
.cert-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* tombol return */
#return-globe {
  position: absolute;
  top: 20px;
  left: 20px;
  margin: 0;
  z-index: 3000;
}

/* === DARK MODE === */
body.dark-mode .certificate {
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.6);
  box-shadow: 0 0 20px rgba(0,255,255,0.7),
              0 0 40px rgba(0,255,255,0.3) inset;
}
body.dark-mode #hologram-canvas {
  background: #000;
}

/* === LIGHT MODE DEFAULT (tanpa class) === */
#hologram-canvas {
  background: #f5f5f5;
}

/* ==================== TITLE & SUBTITLE ==================== */
.cert-title {
  text-align: center;
  margin-top: 60px;
  margin-bottom: 20px;
  font-family: 'Orbitron', sans-serif;
}

.certificate-title {
  font-size: 48px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-family: 'Orbitron', sans-serif;
  position: relative;
  z-index: 2000;
  color: #111; /* light default */
  text-shadow: 
    0 0 6px #111,
    0 0 12px rgba(0,0,0,0.8),
    0 0 24px rgba(0,0,0,0.6);
}

.certificate-subtitle {
  text-align: center;
  font-size: 18px;
  margin-bottom: 40px;
  font-family: 'Orbitron', sans-serif;
  position: relative;
  z-index: 2000;
  color: #333;
  text-shadow: 
    0 0 4px #111,
    0 0 10px rgba(0,0,0,0.6);
}

/* DARK MODE TITLE */
body.dark-mode .certificate-title {
  color: #0ff;
  text-shadow: 
    0 0 6px #0ff,
    0 0 12px #0ff,
    0 0 24px rgba(0,255,255,0.8);
}
body.dark-mode .certificate-subtitle {
  color: rgba(255,255,255,0.7);
  text-shadow: 
    0 0 4px #0ff,
    0 0 12px rgba(0,255,255,0.6);
}

/* Biar global-header tetap di pojok kanan atas di page5 */
.global-header {
  position: absolute !important; /* override absolute */
  top: 20px;
  right: 90px;
  z-index: 9999;
  display: flex;
  align-items: center;
}




/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 768px) {
  .certificate-title { font-size: 32px; }
  .certificate-subtitle { font-size: 14px; }

  .certificate {
    width: 140px;
    height: 100px;
    margin: -50px 0 0 -70px;
  }

  .random-card {
    width: 90%;
    padding: 15px;
    font-size: 14px;
  }
  .random-card img {
    max-height: 40vh;
  }

  .all-container .cert-card {
    width: 90%;
    padding: 15px;
  }
  .all-container .cert-card .img-wrapper {
    height: 150px;
  }

  button {
    font-size: 12px;
    padding: 8px 12px;
  }
}


/* === MOBILE THEME TOGGLE === */
@media (max-width: 768px) {
  /* Sembunyikan label text */
  .toggle-slider .label-text {
    display: none !important;
  }

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

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

  /* === Dark Mode Knob === */
  body.dark-mode .toggle-slider .knob {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0ff;
    box-shadow: 0 0 10px #0ff;
  }
  body.dark-mode .toggle-slider .knob span.icon {
    color: #0ff;
  }

  /* === Light Mode Knob === */
  body:not(.dark-mode) .toggle-slider .knob {
    background: #fff;
    border: 2px solid #000;
    box-shadow: 0 0 10px #000;
  }
  body:not(.dark-mode) .toggle-slider .knob span.icon {
    color: #000;
  }

  /* Hover effect */
  .toggle-slider .knob:hover {
    transform: scale(1.1);
  }
}



