/* ======== Font dan dasar ======== */
body {
  margin: 0;
  font-family: "Segoe UI", Calibri, Arial, sans-serif;
  background: linear-gradient(135deg, #fff, #f7d962);
  color: #333;
  overflow-x: hidden;
}

/* ======== Navbar ======== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: linear-gradient(90deg, #ffcc00, #ffd84d);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .logo-text {
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 3px #f39c12;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links li a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  transition: 0.3s;
}

.nav-links li a:hover {
  color: #333;
  background-color: #fff;
  padding: 6px 12px;
  border-radius: 10px;
}

/* ======== Tombol menu HP ======== */
.menu-toggle {
  display: none;
  font-size: 26px;
  color: #fff;
  cursor: pointer;
}

/* ======== Halaman utama ======== */
.home-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 100px);
  text-align: center;
  padding: 20px;
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-logo {
  width: 35%;
  max-width: 250px;
  height: auto;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

h1 {
  font-size: 32px;
  color: #ff9900;
  text-shadow: 1px 1px 2px #fff;
}

h1 span {
  color: #0088ff;
}

p {
  max-width: 400px;
  font-size: 16px;
  margin: 10px 0 30px 0;
}

/* ======== Tombol mulai ======== */
.start-btn-home {
  background-color: #ff9900;
  border: none;
  color: white;
  padding: 14px 30px;
  font-size: 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.start-btn-home:hover {
  background-color: #ffb84d;
  transform: scale(1.05);
}

/* ======== Footer ======== */
footer {
  background: #ffcc00;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  color: #fff;
  text-shadow: 1px 1px 2px #f39c12;
}

/* ======== Responsif ======== */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: #ffcc00;
    width: 200px;
    flex-direction: column;
    align-items: center;
    display: none;
    border-radius: 0 0 15px 15px;
    padding: 10px 0;
  }

  .nav-links.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .home-logo {
    width: 60%;
    max-width: 200px;
  }

  h1 {
    font-size: 24px;
  }

  p {
    font-size: 14px;
  }

  .start-btn {
    padding: 10px 22px;
    font-size: 16px;
  }
}

/* ======== Halaman About ======== */
.about-section {
  min-height: calc(100vh - 100px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px 20px;
  background: linear-gradient(180deg, #fffbe6, #fff);
  animation: fadeIn 1s ease-in;
}

.about-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  max-width: 1000px;
  width: 100%;
  flex-wrap: wrap;
}

.text-content {
  flex: 1;
  min-width: 300px;
}

.text-content h1 {
  font-size: 36px;
  color: #ff9900;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(255, 204, 0, 0.3);
}

.text-content p {
  font-size: 18px;
  line-height: 1.6;
  color: #444;
}

.text-content .highlight {
  color: #0088ff;
  font-weight: bold;
}

.learn-more-btn {
  background-color: #ffcc00;
  border: none;
  color: #333;
  padding: 12px 26px;
  font-size: 16px;
  border-radius: 25px;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.learn-more-btn:hover {
  background-color: #ffd84d;
  transform: scale(1.08);
}

.image-content {
  flex: 1;
  display: flex;
  justify-content: center;
}

.about-image {
  width: 80%;
  max-width: 350px;
  animation: float 3s ease-in-out infinite;
  border-radius: 20px;
}

/* ======== Responsif untuk About ======== */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .text-content h1 {
    font-size: 28px;
  }

  .text-content p {
    font-size: 16px;
  }

  .about-image {
    width: 60%;
    max-width: 250px;
    margin-bottom: 20px;
  }
}

/* ======== Halaman Courses ======== */
.courses-section {
  min-height: calc(100vh - 100px);
  background: linear-gradient(180deg, #fff9d9, #fff);
  text-align: center;
  padding: 60px 20px;
  animation: fadeIn 1s ease-in;
}

.courses-section h1 {
  color: #ff9900;
  font-size: 36px;
  text-shadow: 2px 2px 4px rgba(255, 204, 0, 0.3);
}

.courses-section .subtitle {
  color: #333;
  font-size: 18px;
  margin-bottom: 40px;
}

.mode-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 30px;
  padding: 0 20px;
}

.mode-card {
  flex: 1 1 250px;
  max-width: 300px;
  background: #fff;
  border-radius: 25px;
  padding: 25px;
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.mode-card:hover {
  transform: translateY(-8px) scale(1.03);
}

.mode-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 15px;
  animation: float 3s ease-in-out infinite;
}

/* Warna unik untuk tiap mode */
.mode-card.easy {
  background: linear-gradient(135deg, #b9ffb0, #e2ffc6);
  border: 3px solid #7aff70;
}

.mode-card.medium {
  background: linear-gradient(135deg, #b0e1ff, #d4f0ff);
  border: 3px solid #5ecbff;
}

.mode-card.hard {
  background: linear-gradient(135deg, #ffb3b3, #ffd6d6);
  border: 3px solid #ff7373;
}

.mode-card h2 {
  color: #333;
  margin-bottom: 10px;
  font-size: 22px;
}

.mode-card p {
  color: #444;
  font-size: 15px;
  margin-bottom: 20px;
}

.play-btn {
  background-color: #ffcc00;
  border: none;
  color: #333;
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.play-btn:hover {
  background-color: #ffd84d;
  transform: scale(1.08);
}

/* ======== Responsif ======== */
@media (max-width: 768px) {
  .mode-container {
    flex-direction: column;
    align-items: center;
  }

  .mode-card {
    width: 80%;
    max-width: 350px;
  }

  .courses-section h1 {
    font-size: 28px;
  }

  .subtitle {
    font-size: 16px;
  }
}

/* ======== Modal Input Nama ======== */
.modal-overlay {
  display: none; /* disembunyikan dulu */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
  animation: fadeIn 0.3s ease-in;
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 30px 25px;
  text-align: center;
  width: 90%;
  max-width: 350px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  animation: popUp 0.4s ease;
}

.modal-box h2 {
  color: #ff9900;
  font-size: 24px;
  margin-bottom: 10px;
}

.modal-box p {
  font-size: 16px;
  color: #444;
  margin-bottom: 15px;
}

.modal-box input {
  width: 90%;
  padding: 10px;
  border-radius: 15px;
  border: 2px solid #ffd84d;
  font-size: 16px;
  text-align: center;
  margin-bottom: 20px;
  outline: none;
  transition: all 0.3s;
}

.modal-box input:focus {
  border-color: #ff9900;
  box-shadow: 0 0 5px #ffcc00;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.start-btn, .cancel-btn {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  border-radius: 15px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.start-btn {
  background: #ffcc00;
  color: #333;
  font-weight: bold;
}

.start-btn:hover {
  background: #ffd84d;
  transform: scale(1.05);
}

.cancel-btn {
  background: #f66;
  color: white;
}

.cancel-btn:hover {
  background: #ff7b7b;
  transform: scale(1.05);
}

/* Animasi muncul */
@keyframes popUp {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


/* ======== Halaman Daftar Quiz ======== */
.quiz-list-section {
  min-height: calc(100vh - 100px);
  background: linear-gradient(180deg, #fff7d1, #fff);
  text-align: center;
  padding: 60px 20px;
  animation: fadeIn 1s ease-in;
}

.quiz-list-section h1 {
  color: #ff9900;
  font-size: 34px;
  text-shadow: 2px 2px 4px rgba(255, 204, 0, 0.3);
}

.mode-name {
  color: #00aaff;
}

.subtitle {
  font-size: 18px;
  color: #555;
  margin-bottom: 40px;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 25px;
  justify-items: center;
  padding: 0 20px;
  max-width: 900px;
  margin: 0 auto;
}

.quiz-box {
  background: linear-gradient(135deg, #ffedb3, #fff5d1);
  border: 3px solid #ffd84d;
  border-radius: 20px;
  width: 160px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: #ff9900;
  box-shadow: 0 6px 10px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: all 0.3s ease;
}

.quiz-box:hover {
  transform: translateY(-5px) scale(1.05);
  background: linear-gradient(135deg, #fff0a8, #fff8c6);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* ======== Responsif ======== */
@media (max-width: 768px) {
  .quiz-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
  }

  .quiz-box {
    width: 140px;
    height: 90px;
    font-size: 18px;
  }

  .quiz-list-section h1 {
    font-size: 26px;
  }

  .subtitle {
    font-size: 15px;
  }
}

/* ======== Halaman Soal Quiz ======== */
.quiz-info {
  background: linear-gradient(90deg, #fff8cc, #fff3a8);
  padding: 15px 25px;
  border-bottom: 3px solid #ffd84d;
  color: #333;
  position: sticky;
  top: 70px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.quiz-info h2 {
  font-size: 22px;
  margin: 0;
  color: #ff9900;
}

.quiz-info .mode {
  color: #00aaff;
  font-weight: bold;
}

.quiz-info p {
  font-size: 16px;
  margin-top: 5px;
}

.quiz-question-section {
  text-align: center;
  padding: 50px 20px;
  background: linear-gradient(180deg, #fffbe3, #fff);
  min-height: calc(100vh - 150px);
}

.question-box {
  background-color: #fffdf5;
  border: 3px solid #ffcc00;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 6px 10px rgba(0,0,0,0.1);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.question-box h3 {
  color: #ff9900;
  margin-bottom: 10px;
}

#question-text {
  font-size: 18px;
  color: #333;
}

.options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 40px;
}

.option-btn {
  background-color: #ffcc00;
  border: none;
  border-radius: 20px;
  padding: 12px 25px;
  font-size: 18px;
  cursor: pointer;
  color: #333;
  width: 80%;
  max-width: 400px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.option-btn:hover {
  background-color: #ffd84d;
  transform: scale(1.05);
}

.quiz-nav {
  margin-top: 20px;
}

.next-btn {
  background-color: #00aaff;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 12px 25px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: 0.3s;
}

.next-btn:hover {
  background-color: #33bbff;
  transform: scale(1.05);
}
/* ======== Info Quiz ======== */
.quiz-info {
  position: fixed;
  top: 70px; /* tepat di bawah navbar */
  left: 50%;
  transform: translateX(-50%);
  background: #fff8b5;
  padding: 12px 25px;
  border-radius: 25px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  text-align: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1000;
}

.quiz-info.hide {
  transform: translate(-50%, -120%);
  opacity: 0;
}

.quiz-info h2 {
  margin: 0;
  font-size: 20px;
  color: #ff9800;
}

.quiz-info p {
  margin: 5px 0 0 0;
  font-size: 15px;
  color: #333;
}

/* ======== Responsif ======== */
@media (max-width: 768px) {

  .question-box {
    padding: 20px;
  }

  #question-text {
    font-size: 16px;
  }

  .option-btn {
    width: 90%;
    font-size: 16px;
  }

  .next-btn {
    font-size: 14px;
    padding: 10px 20px;
  }
}

/* ======= CONTACT PAGE ======= */
.contact-container {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(180deg, #fffde7, #fff9c4);
  min-height: calc(100vh - 150px);
  animation: fadeIn 0.8s ease-in;
}

.contact-title {
  font-size: 36px;
  color: #ff9800;
  margin-bottom: 10px;
}

.contact-subtitle {
  font-size: 18px;
  color: #555;
  margin-bottom: 50px;
  text-align: center;       /* biar teks di tengah */
  max-width: 600px;         /* biar teks tidak terlalu panjang */
  margin-left: auto;        /* biar center secara horizontal */
  margin-right: auto;       /* biar center secara horizontal */
  line-height: 1.6;         /* jarak antar baris lebih nyaman dibaca */
}


.contact-card {
  background: #ffffff;
  display: inline-block;
  padding: 40px 60px;
  border-radius: 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  max-width: 400px;
  text-align: left;
  transition: transform 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item .icon {
  font-size: 28px;
}

.contact-item h3 {
  margin: 0;
  color: #333;
  font-size: 18px;
}

.contact-item p {
  margin: 3px 0 0;
  color: #777;
  font-size: 16px;
}

.contact-img {
  margin-top: 60px;
  width: 240px;
  animation: float 3s ease-in-out infinite;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
  .contact-card {
    width: 90%;
    padding: 30px 20px;
  }
  .contact-img {
    width: 180px;
    margin-top: 40px;
  }
  .contact-title {
    font-size: 28px;
  }
}

