@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
  --biru-aptrg: #003366;
  --merah-aptrg: #d32f2f;
  --abu-teks: #333;
  --putih: #ffffff;
  --abu-border: #dee2e6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #000000; /* Warna fallback jika video gagal dimuat */
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin: 0;
  padding: 0;
}

/* === BAGIAN VIDEO BACKGROUND === */
#video-bg {
  position: fixed;
  right: 0;
  bottom: 0;
  min-width: 100%; 
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -100;
  object-fit: cover; /* Ini yang membuat video 'terpotong' tapi mengisi layar */
  background-size: cover;
  transition: 1s opacity;
}

/* === BAGIAN STARTUP LOGO === */
.startup-logo {
  position: absolute;
  z-index: 10;
  transition: all 3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  background: #ffffff;
}

.startup-logo img {
  width: 300px;
  height: auto;
}

/* === BAGIAN CONTAINER UTAMA (FORM & HASIL) === */
.container {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 40px 50px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  max-width: 550px;
  width: 90%;
  text-align: center;
  border-top: 5px solid var(--biru-aptrg);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
  position: relative;
  z-index: 5;
}

.logo {
  width: 150px; 
  height: auto;
  margin-bottom: 20px;
}

h1 {
  font-size: 24px;
  color: var(--biru-aptrg);
  margin-bottom: 10px;
}

p {
  font-size: 15px;
  color: #ddd;
  margin-bottom: 20px;
}

/* === BAGIAN FORM === */
.form-cek {
  margin-top: 20px;
}

.form-group {
  text-align: left;
  margin-bottom: 15px;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--abu-border);
  font-size: 15px;
}

button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: linear-gradient(to right, var(--biru-aptrg), #0056b3);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease-in-out;
}

button[type="submit"]:hover {
  background: linear-gradient(to right, #0056b3, var(--biru-aptrg));
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.footer {
  margin-top: 30px;
  font-size: 12px;
  color: #666;
}

/* GAYA & ANIMASI HALAMAN HASIL */
.hasil-box {
  margin-top: 20px;
}

.status-error, .status-lulus, .status-bersyarat, .status-gagal {
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.status-error {
  background-color: #f8d7da;
  color: #721c24;
}

.status-lulus, .status-bersyarat {
  background-color: #d4edda;
  color: #155724;
}

.status-gagal {
  background-color: #f8d7da;
  color: #721c24;
}

a.tombol-kembali {
  display: inline-block;
  margin-top: 20px;
  text-decoration: none;
  color: var(--biru-aptrg);
  font-weight: bold;
}


#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  /* Remove any margin or padding that might affect layout */
  margin: 0;
  padding: 0;
}

.flip-card {
  background-color: transparent;
  width: 100%;
  max-width: 400px;
  height: 250px;
  margin: 0 auto;
  perspective: 1000px;
  border: none; /* Remove border that might interfere */
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}
/* .flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
} */

.flip-card-inner.flipped {
  transform: rotateY(180deg);
}

.flip-card-inner.auto-flip {
  animation: autoFlip 4s ease-in-out 2s infinite;
}

@keyframes autoFlip {
  0% { transform: rotateY(0deg); }
  25% { transform: rotateY(180deg); }
  50% { transform: rotateY(180deg); }
  75% { transform: rotateY(0deg); }
  100% { transform: rotateY(0deg); }
}



.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.flip-card-front {
  background-color: #d4edda;
  color: #155724;
}

.flip-card-back {
  background-color: #28a745;
  color: white;
  transform: rotateY(180deg);
}

/* Make sure the flip card overrides status styles */
.flip-card.status-lulus {
  background: none !important;
  padding: 0 !important;
}


@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container .logo,
.container h1,
.container .hasil-box p,
.container .hasil-box hr,
.container .status-lulus,
.container .status-bersyarat,
.container .status-gagal,
.container .status-error,
.container a.tombol-kembali {
  opacity: 0;
  animation-fill-mode: forwards;
}

.container .logo {
  animation: fadeInSlideUp 1s ease-out 0.5s forwards;
}

.container h1 {
  animation: fadeInSlideUp 1s ease-out 1s forwards;
}

.container .hasil-box p:nth-of-type(1) {
  animation: fadeInSlideUp 0.8s ease-out 2s forwards;
}
.container .hasil-box p:nth-of-type(2) {
  animation: fadeInSlideUp 0.8s ease-out 2.5s forwards;
}
.container .hasil-box p:nth-of-type(3) {
  animation: fadeInSlideUp 0.8s ease-out 3s forwards;
}
.container .hasil-box p:nth-of-type(4) {
  animation: fadeInSlideUp 0.8s ease-out 3.5s forwards;
}

.container .hasil-box hr {
  animation: fadeInSlideUp 0.8s ease-out 4s forwards;
}

.container .status-lulus,
.container .status-bersyarat,
.container .status-gagal,
.container .status-error {
  animation: fadeInSlideUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) 5s forwards;
}

.container a.tombol-kembali {
  animation: fadeInSlideUp 1s ease-out 6s forwards;
}

/* ======================================================= */
/* == BAGIAN RESPONSIVE UNTUK TAMPILAN MOBILE (BARU) == */
/* ======================================================= */

@media (max-width: 600px) {

  /* Kurangi padding container agar tidak terlalu sempit di HP */
  .container {
    width: 90%;
    padding: 30px 20px;
  }

  /* Kecilkan logo pada layar startup awal */
  .startup-logo img {
    width: 200px; 
  }

  /* Kecilkan ukuran font agar lebih pas */
  h1 {
    font-size: 20px;
  }
  
  p {
    font-size: 14px;
  }

  /* Kecilkan logo di dalam container */
  .container .logo {
    width: 120px;
  }

  /* Pastikan tombol dan input tetap terlihat bagus */
  button[type="submit"], .form-group input {
    font-size: 14px;
  }
  
  .hasil-box h2 {
      font-size: 18px;
  }

  .hasil-box h1, .hasil-box h3 {
      font-size: 16px;
  }
}