   /* page.css
   ใช้กับ index / course / quiz */
   
   /* INDEX */

.box {
  text-align: center;
  z-index: 1;
  padding: 30px;
  max-width: 700px;
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  margin: auto;
  position: relative;
}

.logo {
  font-size: 56px;
  margin-bottom: 10px;
}

.desc {
  font-size: 18px;
  opacity: 0.9;
  line-height: 1.7;
  margin-bottom: 25px;
}

.btn-start {
  display: inline-block;
  padding: 14px 28px;
  background: #6b7cff;
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  font-size: 18px;
  transition: 0.2s;
}

.btn-start:hover {
  transform: translateY(-3px) scale(1.03);
}

 /* COURSE */

.view {
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 24px;
  gap: 16px;

  position: relative;
}

.subtitle {
  opacity: 0.8;
  z-index: 1;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;

  width: min(900px, 95%);
  z-index: 1;
}

.menu-btn {
  min-height: 75px;
  padding: 16px;

  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.02)
  );

  color: #fff;
  text-decoration: none;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 18px;
  transition: 0.2s;
}

.menu-btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.footer {
  position: absolute;
  bottom: 16px;
  opacity: 0.5;
  font-size: 12px;
}

/* Quiz */

.quiz-view {
  min-height: 100vh;
  padding-top: 90px;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  position: relative;
}

.card {
  width: 100%;
  max-width: 620px;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);

  padding: 30px;
  border-radius: 28px;

  z-index: 1;
}

.card h1 {
  text-align: center;
  margin-top: 0;
}

.progress {
  opacity: 0.8;
  margin-bottom: 20px;
}

.question {
  font-size: 24px;
  margin-bottom: 20px;
}

.answers {
  display: grid;
  gap: 12px;
}

.answers button {
  padding: 14px;
  border: none;
  border-radius: 14px;
  cursor: pointer;

  font-size: 16px;
  color: #fff;
  background: #1d2348;

  transition: 0.2s;
}

.answers button:hover {
  transform: translateY(-2px);
}

.answers button.selected {
  background: #5e72eb;
}

.nav {
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.nav button {
  padding: 12px 18px;
  border: none;
  border-radius: 14px;
  cursor: pointer;

  background: #5e72eb;
  color: #fff;
  font-size: 16px;
}

.result {
  text-align: center;
  font-size: 24px;
  line-height: 1.8;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  /* INDEX */

  .box {
    padding: 20px;
  }

  .logo {
    font-size: 44px;
  }

  .desc {
    font-size: 16px;
  }

  .btn-start {
    width: 100%;
    max-width: 260px;
  }

  /* COURSE */

  .view {
    justify-content: flex-start;
    padding: 12px;
    gap: 12px;
  }

  .subtitle {
    font-size: 16px;
    text-align: center;
    margin-bottom: 12px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 12px;
  }

  .menu-btn {
    min-height: 72px;
    font-size: 24px;
    padding: 14px;
  }

  .footer {
    position: static;
    margin-top: 18px;
    text-align: center;
  }

  /* QUIZ */

  .quiz-view {
    min-height: auto;
    padding-top: 0;
    display: block;
  }

  .card {
    max-width: none;
    width: 100%;
    padding: 24px;
    border-radius: 26px;
  }

  .card h1 {
    font-size: 26px;
  }

  .progress {
    font-size: 16px;
    margin-bottom: 14px;
  }

  .question {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 18px;
  }

  .answers button {
    font-size: 18px;
    padding: 16px;
    border-radius: 18px;
  }

  .nav {
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
  }

  .nav button {
    width: 100%;
    font-size: 18px;
    padding: 16px;
  }

  .result {
    font-size: 22px;
  }
}
