:root {
  --bgColorBox: rgba(255, 255, 255, 0);
  --textColor: #333;
  --primaryColor: #0097a7ff;
  --secondaryColor: rgb(9, 210, 232);
  --lightColor: #b8daff;
  --whiteColor: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  background-image: url(../Quiz-Apps/Bubles.gif);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed; /* Latar belakang tetap */
  color: var(--whiteColor);
  margin-bottom: 100px; /* Hilangkan margin default */
  scroll-behavior: smooth;
  height: 100vh; /* Pastikan selalu penuh layar */
  width: 100vw; /* Pastikan penuh lebar layar */
}

/* Posisi logo di kiri atas */
.logo {
  color: var(--whiteColor);
  position: fixed; /* Tetap pada posisi saat layar berubah */
  top: 20px;
  left: 20px;
  font-family: Arial, sans-serif;
  font-size: 1em;
  display: flex;
  align-items: center;
  animation: flickerAnimation 1.5s infinite alternate;
  z-index: 100; /* Pastikan logo selalu di atas */
}

/* Gaya animasi logo */
.logo span {
  font-size: 1em;
  font-weight: bold;
  color: #4682b4;
  animation: colorChange 1.5s infinite alternate;
}

/* Pesan welcome */
#welcome-message {
  width: 80%;
  max-width: 500px;
  padding: 20px;
  color: var(--whiteColor);
  background-color: rgba(0, 0, 0, 0.5); /* Lebih terlihat dengan opacity */
  border: 2px solid #b0c4de;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: fixed; /* Tetap pada layar */
  top: 10%; /* Posisi tengah secara vertikal */
  left: 50%; /* Posisi tengah secara horizontal */
  transform: translate(-50%, -50%); /* Untuk benar-benar menengahkannya */
  font-family: "Courier New", Courier, monospace;
  z-index: 99; /* Tetap di bawah logo */
}

/* Responsif untuk layar kecil */
@media (max-width: 768px) {
  #welcome-message {
    top: 60%; /* Turunkan posisi pada layar kecil */
    width: 90%;
  }

  .logo {
    font-size: 0.8em; /* Ukuran logo lebih kecil */
  }
}

/* Animasi teks */
#welcome-message h1,
#welcome-message p {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid transparent;
  animation: typing 3s steps(30) 1s forwards,
    blink-caret 0.75s step-end infinite;
}

/* Efek ketik */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Kursor berkedip */
@keyframes blink-caret {
  50% {
    border-color: transparent;
  }
  100% {
    border-color: black;
  }
}

/* Animasi logo */
@keyframes flickerAnimation {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@keyframes colorChange {
  0% {
    color: #4682b4;
  }
  25% {
    color: #ff6347;
  }
  50% {
    color: #32cd32;
  }
  75% {
    color: #ffd700;
  }
  100% {
    color: #4682b4;
  }
}

.login_form,
.emailPass,
.info_box,
.startBtn,
.quiz_container,
.result_box,
#form {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
}

/* <!-- Sign Up Form --> */
#form button {
  margin-top: 20px;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* <!-- Login Form --> */
.swal2-styled {
  width: 100% !important;
  color: var(--textColor);
  background-color: var(--whiteColor) !important;
}

.login_form {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  transition: all 0.3s;
}

.form {
  width: 400px;
  height: auto;
  box-sizing: border-box;
  border-radius: 5mm;
  padding: 40px 30px;
  backdrop-filter: blur(5px) saturate(160%);
  -webkit-backdrop-filter: blur(5px) saturate(160%);
  background: rgba(0, 0, 0, 0.2);
  border: 0.5mm solid var(--lightColor);
  position: relative;
}

.title {
  width: 100%;
  font-size: 30px;
  text-align: center;
  margin-bottom: 20px;
  color: var(--whiteColor);
  font-weight: 600;
}

.inputs {
  width: 100%;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.inputf {
  width: 100%;
  height: fit-content;
  box-sizing: border-box;
  margin: 15px 0;
  position: relative;
}

.input {
  width: 100%;
  height: 45px;
  box-sizing: border-box;
  border: none;
  border-bottom: 0.55mm solid #fff;
  background: none;
  padding: 0 15px;
  font-size: 15px;
  color: #fff;
  outline: none;
}

.input::placeholder {
  color: var(--whiteColor);
}

.label {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--whiteColor);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  z-index: -1;
  transition: 0.25s ease-out;
}

.input:focus + .label {
  top: -20px;
  opacity: 1;
  z-index: 1;
}

.input:focus::placeholder {
  opacity: 0;
}

.input:not(:placeholder-shown) + .label {
  top: -20px;
  opacity: 1;
  z-index: 1;
}
.icon {
  color: var(--whiteColor);
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translate(0, -50%);
  font-size: 18px;
}

.links {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 50px;
  color: var(--whiteColor);
  user-select: none;
}

.links label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.links a {
  font-weight: 600;
  color: var(--whiteColor);
}

.btn {
  width: 100%;
  height: 40px;
  background: #333;
  outline: none;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--whiteColor);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
}
.btn:hover {
  color: #333;
  background: var(--whiteColor);
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.text {
  width: 100%;
  font-size: 13px;
  text-align: center;
  color: var(--whiteColor);
  user-select: none;
}

.text a {
  color: var(--whiteColor);
  font-weight: 600;
  cursor: pointer;
}

.clickHere {
  color: var(--whiteColor);
  font-weight: 600;
  text-align: center;
  margin: 10px 0;
  cursor: pointer;
  user-select: none;
}

.emailPass {
  width: 450px;
  height: 200px;
  background-color: rgba(255, 255, 255, 0);
  color: var(--whiteColor);
  padding: 30px;
  flex-direction: column;
  gap: 10px;
  border-radius: 5px;
}
.emailPass div {
  display: flex;
  gap: 10px;
  border: 1px solid var(--secondaryColor);
  padding: 10px;
  justify-content: space-between;
}

.emailPass span {
  color: #000;
}

.emailPass .btn {
  font-weight: 400;
  padding: 10px;
}
.emailIcon {
  display: none;
}
/* <!-- Info Box --> */

.info_box {
  width: 540px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  transform: translate(-50%, -50%) scale(0.9);
  transition: all 0.3s ease;
  display: none;
}

.info_box .info-title {
  color: var(--whiteColor);
  height: 60px;
  width: 100%;
  border-bottom: 1px solid var(--lightColor);
  display: flex;
  align-items: center;
  padding: 0 30px;
  border-radius: 5px 5px 0 0;
  font-size: 20px;
  font-weight: 600;
}

.info_box .info-list {
  color: var(--whiteColor);
  padding: 15px 30px;
}

.info_box .info-list .info {
  margin: 5px 0;
  font-size: 17px;
}

.info_box .info-list .info span {
  font-weight: 600;
  color: red;
}
.info {
  border-bottom: 1px solid var(--whiteColor);
  padding: 5px 0;
}
.info_box .buttons {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 30px;
  border-top: 1px solid var(--lightColor);
}

.info_box .buttons button {
  margin: 0 5px;
  height: 40px;
  width: 100px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.buttons button.restart {
  color: var(--whiteColor);
  background: #333;
}

.buttons button.restart:hover {
  background: #333;
}

.buttons button.quit {
  color: var(--whiteColor);
  background: #333;
}

.buttons button.quit:hover {
  color: var(--whiteColor);
  background: #333;
}
/* <!-- Start Quiz Button --> */

.startBtn button {
  padding: 10px;
  border: none;
  border-radius: 5px;
  font-size: 24px;
  font-weight: 600;
  transition: all 0.3s;
  color: #333;
}

.startBtn button:hover {
  color: var(--whiteColor);
  background: #333;
  border: 1px solid var(--whiteColor);
}

/* <!-- Question Displayed --> */

.quiz_container {
  user-select: none;
  width: 550px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.quiz_container > header {
  color: var(--whiteColor);
  position: relative;
  height: 70px;
  padding: 0 30px;
  background: rgba(255, 255, 255, 0);
  border-radius: 5px 5px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0px 3px 5px 1px rgba(0, 0, 0, 0.1);
}
.quiz_title {
  color: var(--whiteColor);
  font-size: 24px;
  font-weight: 500;
}
.quiz_container h2 {
  color: var(--whiteColor);
}

.quiz_container .options_list {
  color: var(--whiteColor);
}

.count_down {
  background-color: #cce5ff;
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
  border-radius: 5px;
  color: #000;
  align-items: center;
  font-weight: 500;
}
.count_down > :last-child {
  color: #333;
  margin-left: 10px;
  background-color: rgba(255, 255, 255, 0);
  padding: 5px;
  border-radius: 5px;
  text-align: center;
  width: 40px;
  font-size: 16px;
}
/* <!-- Quiz Quesitons/Answer --> */

#qustionsContainer {
  user-select: none;
  width: 90%;
  max-width: 550px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  padding: 20px 30px;
  box-shadow: 0px 3px 5px 1px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
}

#qustions {
  color: var(--whiteColor);
  display: flex;
  font-weight: 600;
  font-size: 24px;
  padding-bottom: 10px;
}
.options_list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.options {
  background: aliceblue;
  border: 1px solid var(--secondaryColor);
  border-radius: 5px;
  padding: 12px 20px;
  font-size: 16px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  justify-content: space-between;
}
.options:hover {
  color: #004085;
  background: #cce5ff;
  border: 1px solid var(--lightColor);
}
/* <!-- Quiz Footer Next Button --> */
.footer_container {
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qustion_Count {
  display: flex;
  gap: 5px;
  font-weight: 600;
  font-size: 16px;
}
.next_Btn button {
  background-color: #333;
  border: none;
  color: var(--whiteColor);
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.next_Btn button:hover {
  color: #333;
  background: var(--whiteColor);
}
/* <<<< Custom Check Box >>>> */
.options input {
  color: var(--whiteColor);
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  top: 0%;
  left: 0%;
  transform: translate(-50% -50%);
  height: 25px;
  width: 25px;
}

.options input:checked ~ .checkmark {
  background-color: rgba(255, 255, 255, 0);
  border-radius: 5px;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.options input:checked ~ .checkmark:after {
  display: block;
}

.options .checkmark:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid var(--whiteColor);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
/* <!-- Result Box --> */

.result_box {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  display: flex;
  padding: 25px 30px;
  width: 450px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.9);
  transition: all 0.3s ease;
}

.result_box .icon {
  font-size: 100px;
  color: var(--whiteColor);
  margin-bottom: 10px;
}

.result_box .complete_text {
  color: var(--whiteColor);
  font-size: 20px;
  font-weight: 500;
}

.score_text {
  color: var(--whiteColor);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 15px;
}
.result_box .score_text span {
  display: flex;
  margin: 10px 0;
  font-size: 18px;
  font-weight: 500;
}

.result_box .score_text span p {
  color: var(--whiteColor);
  padding: 0 4px;
  font-weight: 600;
}

.result_box .buttons {
  display: flex;
  margin: 20px 0;
}

.result_box .buttons button {
  margin: 0 10px;
  height: 45px;
  padding: 0 20px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}
.progressBar {
  width: 100px;
  height: 100px;
  margin-top: 20px;
  padding: 35px 0;
  text-align: center;
  border-radius: 50%;
  background: radial-gradient(closest-side, #32cd32 79%, transparent 80% 100%),
    conic-gradient(var#333 75%, #4682b4 0);
}
.progressBar p {
  font-size: larger;
  font-weight: 700;
  text-align: center;
  color: #333;
}

.circular-progress {
  position: relative;
  height: 120px;
  width: 120px;
  border-radius: 50%;
  background: conic-gradient(#333 3.6deg, #4682b4 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 25px;
}
.circular-progress::before {
  content: "";
  position: absolute;
  height: 100px;
  width: 100px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0);
}
.progress-value {
  position: relative;
  font-size: 26px;
  font-weight: 700;
  color: var(--whiteColor);
}

/* .login_form, */
.quiz_container,
.startBtn,
.emailPass,
.info_box,
.result_box {
  display: none;
}
/* Gaya Responsif */
footer {
  position: fixed;
  margin-top: 50px;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--darkColor);
  color: var(--whiteColor);
  padding: 10px;
}
.copyright {
  position: fixed;
  bottom: 0%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}

.copyright a {
  text-decoration: none;
  color: #007bff; /* Warna link */
}

.copyright a:hover {
  text-decoration: underline;
  color: #0056b3; /* Warna link saat hover */
}

/* Tablet dan lebih kecil */
@media (max-width: 992px) {
  #welcome-message {
    width: 80%;
    max-width: 500px;
    padding: 20px;
    color: var(--whiteColor);
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    border: 2px solid #b0c4de;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 16%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust position */
    font-family: "Courier New", Courier, monospace;
    z-index: 99; /* Ensure it appears above other content */
  }

  .form,
  .info_box,
  .result_box,
  .quiz_container {
    width: 95%;
    max-width: 500px;
    justify-content: center;
    align-items: center;
    margin-top: 15%;
  }

  #qustions {
    font-size: 16px;
    padding: 20px 10px;
  }

  .count_down {
    margin-left: 2rem;
    padding-left: 20px;
  }

  .options {
    font-size: 15px;
    padding: 10px 15px;
  }

  .next_Btn button {
    font-size: 15px;
    padding: 8px 10px;
  }

  copyright {
    font-size: 13px;
    padding: 10px 20px;
  }
}

/* Tablet kecil atau phablet */
@media (max-width: 768px) {
  #welcome-message {
    width: 90%; /* Adjust width for smaller devices */
    top: 18%; /* Position slightly lower */
    padding: 15px; /* Reduce padding for compact appearance */
    font-size: 0.9em; /* Scale text slightly smaller */
  }

  .form,
  .info_box,
  .result_box,
  .quiz_container {
    width: 90%;
    max-width: 450px;
    justify-content: center;
    align-items: center;
    margin-top: 15%;
  }

  #qustions {
    font-size: 14px;
    padding: 15px 8px;
  }

  .options {
    font-size: 14px;
    padding: 10px;
  }

  .count_down {
    margin-left: 1.5rem;
    padding-left: 15px;
  }

  .next_Btn button {
    font-size: 14px;
    padding: 8px;
  }
  .copyright {
    font-size: 12px;
    padding: 8px 15px;
  }
}

/* Ponsel kecil */
@media (max-width: 520px) {
  #welcome-message {
    width: 95%; /* Almost full width */
    top: 20%; /* Lower the position for better visibility */
    padding: 10px; /* Minimal padding */
    font-size: 0.8em; /* Scale down text further */
    margin-bottom: 5rem;
  }
  .form,
  .info_box,
  .result_box,
  .quiz_container {
    width: 95%;
    max-width: 400px;
    justify-content: center;
    align-items: center;
    margin-top: 20%;
  }

  #qustions {
    justify-content: center;
    font-size: 14px;
    padding: 10px 5px;
  }

  .count_down {
    margin-left: 1rem;
    padding-left: 10px;
  }

  .options {
    font-size: 13px;
    padding: 8px;
  }

  .next_Btn button {
    font-size: 13px;
    padding: 6px 8px;
  }
  .copyright {
    font-size: 11px;
    padding: 5px 10px;
  }
}

/* Ponsel sangat kecil */
@media (max-width: 480px) {
  body {
    font-size: 12px;
  }
  .form,
  .info_box,
  .result_box,
  .quiz_container {
    width: 80%;
    max-width: 280px;
    padding: 10px;
    justify-content: center;
    align-items: center;
  }

  #qustions {
    font-size: 11px;
  }

  .options {
    font-size: 11px;
    padding: 6px;
  }

  .next_Btn button {
    font-size: 11px;
    padding: 5px;
  }
  .copyright {
    margin-top: 1rem;
    font-size: 10px;
    flex-direction: column; /* Teks akan diatur vertikal */
    padding: 5px;
  }

  .copyright a {
    margin-top: 5px;
  }
}
