* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
}
body {
  background: url('/public/bg.jpeg') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
  color: #fff;
  box-sizing: border-box;
  flex-grow: 1; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.container-header {
  background-color: #0A0A1F;
  width: 100%;
  height: auto;
}
footer {
  background-color: #0A0A1F;
  color: #fff;
  padding: 20px;
  text-align: center;
  font-weight: 700;
}
.wrapper {
  display: flex;
  justify-content: space-between;
  background-color: #0A0A1F;
  align-items: center;
  font-size: 20px;
  width: 90%; 
  margin: 0 auto;
  height: 80px;
}
.title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
}
.firstname {
  color: white;
  font-weight: 700;
}
.lastname {
  color: #00BFFF;
  font-weight: 700;
}
.navigation {
  display: none;
}
.navigation li {
  list-style-type: none;
  padding: 0;
}
.navigation li a {
  text-decoration: none; 
  color: #fff;
  margin-right: 5px;
  font-weight: 600;
  font-size: 18px;
  padding: 10px;
  border-radius: 10px;
}
.navigation li a:hover {
  background-color: #00BFFF;
  color: #0A0A1F;
}
.navigation .active-link {
  background-color: #00BFFF;
  color: #0A0A1F;
}
/* mobile default */
.navigation {
  display: none;
}
/* mastiin tombol hamburger terlihat di mobile */
#menu-button {
  display: block;
}
/* mobile active */
.navigation.active {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 88px;
  right: 8px;
  width: 50%;
  max-width: 350px;
  background-color: #0A0A1F;
  border-radius: 10px;
  gap: 10px;
  z-index: 999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  padding: 23px 15px; 
}
.navigation.active li {
  width: 100%;
  margin: 0; 
  padding: 0;
}
.navigation.active li a {
  display: block; 
  margin-right: 0;
  transition: background-color 0.3s, transform 0.2s;
  padding: 10px 15px;
  margin: 0 10px; 
  border-radius: 8px;
  text-align: center; 
  transition: background-color 0.3s;
}
/* media query tampilan desktop > 768px */
@media (min-width: 768px) {
  .navigation {
    display: flex !important; /* untuk mengoverride display: none; */
    flex-direction: row;
    position: static;
    width: auto;
    backdrop-filter: blur(10px);
    box-shadow: none;
    padding: 0;
  }
  .navigation li a {
    margin-right: 10px;
  }
  #menu-button {
    display: none;
  }
}
h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 28px;
}
.developer-cards {
  display: flex;
  gap: 70px;
  justify-content: center;
  margin-bottom: 60px;
}
.card {
  background-color: #0A0A1F;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  flex: 1;
  max-width: 270px;
  border: 2px solid #00BFFF;
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
}
.card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  margin-bottom: 10px;
}
/* buat tampilan Mobile Kartu disusun vertikal */
@media (max-width: 767px) {
  .developer-cards {
    flex-direction: column;
    align-items: center;
  }
  .developer-cards {
    gap: 30px;
  }
  .card {
    width: 90%;
    max-width: 270px;
  }
}

/* style materi pembelajaran */
.container-materi {
  border-radius: 10px;
  background-color: #0A0A1F;
  backdrop-filter: blur(50px);
  margin: 40px 50px;
  margin-top: 0;
  padding: 30px;
  border: 2px solid #00BFFF;
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
}
.title-materi {
  text-align: left;
  padding-bottom: 5px;
}
.title-materi-c {
  text-align: left;
  padding-top: 15px;
}
.text-materi {
  padding-top: 5px;
  padding-bottom: 8px;
  text-align: justify;
  font-size: 18px;
}
.desc-rumus {
  text-align: justify;
  font-size: 18px;
}
.video-wrapper {
  display: flex;
  justify-content: center;
  background-color: #0A0A1F;
  border-radius: 10px;
  padding-bottom: 20px;
}
.materi-1, .materi-2, .materi-3, .materi-4, .materi-5 {
  text-align: justify;
  margin: 5px;
  padding: 8px;
}
.img-rumus {
  padding: 10px;
  padding-left: 0;
  width: 300px;
  height: 200px;
}
.definisi {
  text-align: justify;
  margin: 5px;
  padding: 8px;
}
.text-aturan-permutasi {
  text-align: justify;
  margin: 5px;
  padding: 8px;
}
/* end style materi desktop */

/* style buat display mobile  */
@media (max-width: 767px) {
  main {
    padding: 40px 20px;
  }
  .container-materi {
    margin: 0;
  }
  .img-rumus {
    padding: 10px 0; 
    width: 100%;
    height: auto; /* Jaga rasio aspek */
    max-width: 300px;
    display: block;
    margin: 0 auto 15px auto;
  }
  .title-materi {
    padding-top: 20px;
  }
  .video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Rasio 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-top: 20px; 
  }
  .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; 
  }
  .materi-1, .materi-2, .materi-3, .materi-4, .materi-5 {
    text-align: justify;
    margin: 0;
    padding: 8px 0;
  }
  .definisi {
    text-align: justify;
    margin: 0;
    padding: 8px 0;
  }
  .text-aturan-permutasi {
    text-align: justify;
    margin: 0;
    padding: 8px 0;
  }
}
/* end style mobile materi */

/* kalkulator */
.calculator {
  background: #0A0A1F;
  color: #000;
  border-radius: 10px;
  padding: 40px;
  border: 2px solid #00BFFF;
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
}
.input-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
  align-items: start;
}
.full-width {
  grid-column: 1 / -1;
}
.input-group {
  display: flex;
  flex-direction: column;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
  font-size: 15px;
}
input[type=number] {
  border: 2px solid #00BFFF;
}
input, select {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  background-color: #fff;
  color: #000;
  border: 2px solid #00BFFF;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}
input:focus, select:focus {
  outline: none;
  border-color: #00BFFF;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.calculate-btn {
  grid-column: 1 / -1;
  padding: 15px;
  background: #00BFFF;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
}
.calculate-btn:hover {
  background-color: #00BFFF;
  color: #0A0A1F;
}
.result-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}
.result-card, .formula-card {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 15px;
  border: 2px solid #00BFFF;
  min-height: 180px;
}
.result-card h3, .formula-card h3 {
  margin-bottom: 15px;
  color: #000;
}
.result, .formula {
  font-size: 16px;
  line-height: 1.6;
}
.history-section {
  border: 2px solid #00BFFF;
  background: #f8f9fa;
  padding: 25px;
  border-radius: 15px;
}
.history-section h3 {
  margin-bottom: 15px;
  color: #333;
}
.history-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 15px;
}
.history-item {
  background: white;
  padding: 10px 15px;
  margin-bottom: 8px;
  border-radius: 8px;
  border-left: 3px solid #00BFFF;
}
.clear-btn {
  padding: 10px 20px;
  background: red;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
}
.clear-btn:hover {
  background: #c82333;
}
/* Responsive Design */
@media (max-width: 768px) {
  .input-section {
    grid-template-columns: 1fr;
  }
  .calculate-btn {
    grid-column: span 1;
  }
  .result-section {
    grid-template-columns: 1fr;
  }
  .calculator {
    padding: 30px;
  }
  .full-width, .calculate-btn {
    grid-column: auto;
  }
}
/* kalkulator style end */

/* style buat quizz */
.quiz-container {
  width: 100%;
  height: auto;
  max-width: 700px;
  margin: 0 auto;
  border: 2px solid #00BFFF;
  background: #0A0A1F;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
}
.quiz-title {
  text-align: center;
  color: #fff;
  margin-top: 0;
  margin-bottom: 30px;
}
.timer-display {
  font-size: 20px;
  text-align: center;
  margin-top: 30px;
  font-weight: bold;
  color: red;
  padding: 5px 10px;
  background-color: transparent;
  border-radius: 5px;
}
.question-area {
  padding: 30px;
  margin-bottom: 5px;
  width: 100%;
  box-sizing: border-box;
  color: #fff;
}
.question-text {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 20px;
  color: #fff;
}
.options-area {
  margin-top: 15px;
}
.quiz-option {
  display: block;
  margin-bottom: 10px;
  padding: 12px;
  background-color: #ffffff;
  color: #000;
  border: 2px solid #00BFFF;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  font-size: 1em;
}
.quiz-option:hover {
  background-color: #00BFFF;
  border: 2px solid #fff;
}
.quiz-option input[type="radio"] {
  margin-right: 10px;
}
/* Efek pas radio button terpilih */
.quiz-option input[type="radio"]:checked + span {
  font-weight: bold;
  color: #00BFFF;
}
.quiz-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-top: 15px;
}
#question-number-display {
  font-weight: 600;
  color: #fff;
}
#submit-answer-btn {
  padding: 15px 25px;
  background-color: #00BFFF;
  color: #0A0A1F;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 17px;
  transition: background-color 0.3s;
}
#submit-answer-btn:hover {
  background-color: #00BFFF;
  color: #0A0A1F;
}
#submit-answer-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
.feedback {
  margin: 15px 0 0 0;
  padding: 15px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.1em;
  text-align: center;
  min-height: 50px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}
.feedback.active {
  visibility: visible;
  opacity: 1;
}
.feedback.correct {
  background-color: #49ff95ff;
  color: #000;
}
.feedback.incorrect {
  background-color: red;
  color: #000;
}
.results-area {
  padding: 30px;
  background-color: #0A0A1F;
  border-radius: 8px;
  border: 2px solid #00BFFF;
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
  width: 100%;
  box-sizing: border-box;
}
#score-summary {
  color: #00BFFF;
  font-size: 1.3em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
}
#review-area h4 {
  margin-bottom: 15px;
  color: #fff;
}
.review-item {
  margin-bottom: 25px;
  padding: 15px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background-color: #fdfdfd;
}
.review-item h5 {
  font-size: 1.1em;
  color: #000;
  margin-bottom: 10px;
}
.review-item p {
  margin-bottom: 5px;
  line-height: 1.5;
  color: #000;
}
.review-item strong {
  color: #333;
}
.correct-text {
  color: #1feb74ff;
  font-weight: bold;
}
.incorrect-text {
  color: red;
  font-weight: bold;
}
.hidden {
  display: none !important;
}
.start-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 400px;
  max-width: 100%;
  margin: 0;
  text-align: center;
  padding: 50px 0; 
  background: url('/public/Quiz-banner.jpg') no-repeat center center;
  background-size: cover;
  border-radius: 8px;
}
.start-screen p {
  font-size: 1.2em;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 8px;
  color: #fff;
  margin-bottom: 35px;
  max-width: 80%;
}
#start-quiz-btn {
  padding: 12px 30px;
  background-color: #00BFFF;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
  display: inline-block;
  width: auto;
}
#start-quiz-btn:hover {
  background-color: #00BFFF;
  color: #0A0A1F;
}
.clear-all-btn {
  padding: 12px;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  background-color: #00BFFF;
  width: 100%;
}
.clear-all-btn:hover {
  background-color: #00BFFF;
  color: #0A0A1F;
}