
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700;800&display=swap');

:root {
  --cream: #f5eedc;
  --paper: #fffaf0;
  --brown: #493522;
  --brown-light: #795b3c;
  --green: #405b42;
  --green-dark: #2d4430;
  --gold: #c49a45;
  --border: #d9c7a5;
  --red: #a74435;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, #fff8e8 0, transparent 35%),
    var(--cream);
  color: var(--brown);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  flex-direction: column;
}

.top-header {
  min-height: 85px;
  background: var(--brown);
  color: var(--paper);
  padding: 15px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 5px solid var(--gold);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 38px;
}

.brand h1 {
  font-family: 'Playfair Display', serif;
  font-size: 25px;
  letter-spacing: 2px;
}

.brand p {
  font-size: 10px;
  letter-spacing: 3px;
  color: #e2c98f;
}

.header-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #e9d9b8;
}

.container {
  width: min(1100px, 92%);
  margin: 35px auto;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  display: none;
  width: 100%;
}

.screen.active {
  display: block;
}

.welcome-card,
.result-card {
  max-width: 760px;
  margin: auto;
  padding: 55px 45px;
  text-align: center;
  background: var(--paper);
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(73, 53, 34, 0.10);
  position: relative;
}

.welcome-decoration {
  font-size: 65px;
  margin-bottom: 12px;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.welcome-card h2,
.result-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 6vw, 58px);
  color: var(--brown);
  margin-bottom: 12px;
}

.welcome-card h3 {
  font-size: 19px;
  margin-bottom: 15px;
}

.welcome-description {
  max-width: 530px;
  margin: 0 auto;
  line-height: 1.7;
  color: var(--brown-light);
}

.quiz-info,
.result-details {
  display: flex;
  justify-content: center;
  gap: 35px;
  margin: 35px 0;
}

.quiz-info div,
.result-details div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.quiz-info strong,
.result-details strong {
  font-family: 'Playfair Display', serif;
  font-size: 25px;
  color: var(--green);
}

.quiz-info span,
.result-details span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

.primary-btn {
  border: none;
  border-radius: 7px;
  background: var(--green);
  color: white;
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.2s;
}

.primary-btn:hover:not(:disabled) {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.question-counter {
  font-family: 'Playfair Display', serif;
  font-size: 23px;
  font-weight: 800;
}

.timer-box {
  background: var(--brown);
  color: white;
  border: 3px solid var(--gold);
  border-radius: 8px;
  padding: 10px 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-box span {
  font-size: 10px;
  letter-spacing: 2px;
}

.timer-box strong {
  font-size: 32px;
  font-family: 'Playfair Display', serif;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 9px;
  background: #e1d5bd;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 22px;
}

#progress-bar {
  width: 0%;
  height: 100%;
  background: var(--green);
  transition: width 0.3s;
}

.question-card {
  background: var(--paper);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 35px;
  box-shadow: 0 8px 22px rgba(73, 53, 34, 0.08);
}

.question-category {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 5px;
  background: #e8dfc9;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

#question-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.4;
  margin-bottom: 28px;
}

.options-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 25px;
}

.option-btn {
  width: 100%;
  min-height: 75px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: #f8f0df;
  color: var(--brown);
  border: 2px solid var(--border);
  border-radius: 8px;
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--green);
  background: #edf0e5;
}

.option-btn.selected {
  border-color: var(--green);
  background: #e1eadc;
  box-shadow: inset 0 0 0 1px var(--green);
}

.option-btn:disabled {
  cursor: default;
}

.option-letter {
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brown);
  color: white;
  font-weight: 800;
}

#submit-btn {
  min-width: 230px;
}

.feedback-box {
  margin-top: 25px;
  padding: 25px;
  border-radius: 8px;
  background: #f3eddf;
  border: 2px solid var(--border);
  text-align: left;
}

.feedback-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 25px;
  margin-bottom: 10px;
}

.feedback-box.correct {
  border-color: var(--green);
  background: #edf3e9;
}

.feedback-box.incorrect {
  border-color: var(--red);
  background: #f8eae5;
}

#correct-answer {
  margin-bottom: 18px;
  font-weight: 700;
}

.explanation {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.explanation strong {
  color: var(--green-dark);
  font-size: 12px;
  letter-spacing: 1px;
}

.explanation p {
  margin-top: 7px;
}

.hidden {
  display: none !important;
}

.final-score {
  margin: 25px auto;
  width: 175px;
  height: 175px;
  border: 5px solid var(--gold);
  border-radius: 50%;
  background: #f3eddf;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.final-score strong {
  font-family: 'Playfair Display', serif;
  font-size: 55px;
  color: var(--green);
}

.final-score span {
  font-weight: 800;
  letter-spacing: 2px;
}

footer {
  padding: 18px;
  background: var(--brown);
  color: #e9d9b8;
  text-align: center;
  font-size: 11px;
  letter-spacing: 2px;
}

@media (max-width: 650px) {
  .top-header {
    padding: 13px 4%;
  }

  .header-label {
    display: none;
  }

  .container {
    margin: 20px auto;
  }

  .welcome-card,
  .result-card {
    padding: 35px 20px;
  }

  .quiz-info {
    gap: 18px;
  }

  .quiz-info strong {
    font-size: 20px;
  }

  .quiz-info span {
    font-size: 8px;
  }

  .quiz-top {
    gap: 10px;
  }

  .question-counter {
    font-size: 18px;
  }

  .timer-box {
    padding: 8px 15px;
  }

  .timer-box strong {
    font-size: 25px;
  }

  .question-card {
    padding: 22px 16px;
  }

  .options-container {
    grid-template-columns: 1fr;
  }

  .option-btn {
    min-height: 60px;
    font-size: 15px;
  }
}
.option-btn.correct-option {
  background: #dcebd8;
  border-color: #405b42;
}

.option-btn.wrong-option {
  background: #f4dcd5;
  border-color: #a74435;
}
/* TEMA BARU: WARNA BOLA VOLI */

:root {
  --cream: #EAF3FA;
  --paper: #FFFFFF;
  --brown: #183B5B;
  --brown-light: #416783;
  --green: #145A96;
  --green-dark: #104675;
  --gold: #F5C842;
  --border: #B9D4EA;
  --red: #C7473B;
}

/* Latar belakang */
body {
  background: #EAF3FA;
  color: #183B5B;
}

/* Header */
.top-header {
  background: #145A96;
  color: white;
  border-bottom: 6px solid #F5C842;
}

.brand p,
.header-label {
  color: #FFF2BD;
}

/* Kartu utama */
.welcome-card,
.result-card,
.question-card {
  background: #FFFFFF;
  border-color: #B9D4EA;
}

/* Judul */
.welcome-card h2,
.result-card h2,
#question-text {
  color: #183B5B;
}

/* Tombol */
.primary-btn {
  background: #145A96;
  color: white;
  border: 2px solid #F5C842;
}

.primary-btn:hover:not(:disabled) {
  background: #104675;
}

/* Informasi kuis */
.quiz-info strong,
.result-details strong,
.final-score strong {
  color: #145A96;
}

.final-score {
  background: #FFF8DF;
  border-color: #F5C842;
}

/* Timer */
.timer-box {
  background: #183B5B;
  border-color: #F5C842;
  color: white;
}

/* Progress */
.progress-track {
  background: #D5E5F2;
}

#progress-bar {
  background: #F5C842;
}

/* Kategori */
.question-category {
  background: #E2EFF9;
  color: #145A96;
}

/* Pilihan jawaban */
.option-btn {
  background: #F4F9FD;
  color: #183B5B;
  border-color: #B9D4EA;
}

.option-btn:hover:not(:disabled) {
  background: #E4F1FA;
  border-color: #145A96;
}

.option-btn.selected {
  background: #FFF5CF;
  border-color: #D5A817;
}

.option-letter {
  background: #145A96;
  color: white;
}

/* Jawaban benar dan salah */
.option-btn.correct-option {
  background: #E0F2E5;
  border-color: #398653;
}

.option-btn.wrong-option {
  background: #FCE8E5;
  border-color: #C7473B;
}

/* Pembahasan */
.feedback-box {
  background: #F4F9FD;
  border-color: #B9D4EA;
}

.feedback-box.correct {
  background: #E8F5EA;
  border-color: #398653;
}

.feedback-box.incorrect {
  background: #FCEDE9;
  border-color: #C7473B;
}

.explanation strong {
  color: #145A96;
}

/* Footer */
footer {
  background: #183B5B;
  color: #FFF2BD;
}

/* DAFTAR PESERTA */

.participants-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 25px 0;
}

.participant-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F4F9FD;
  border: 1px solid #B9D4EA;
  border-radius: 7px;
  padding: 10px;
}

.participant-input span {
  min-width: 25px;
  font-weight: 800;
  color: #145A96;
}

.participant-input input {
  width: 100%;
  padding: 10px;
  border: 1px solid #B9D4EA;
  border-radius: 5px;
  font-size: 14px;
  color: #183B5B;
}

#save-participants-btn {
  width: 100%;
}

@media (max-width: 650px) {
  .participants-list {
    grid-template-columns: 1fr;
  }
}

/* PANEL PENILAIAN HOST */

.host-panel,
.leaderboard-panel {
  margin-top: 25px;
  padding: 22px;
  border: 2px solid #B9D4EA;
  border-radius: 10px;
  background: #F4F9FD;
}

.host-panel h3,
.leaderboard-panel h3 {
  color: #145A96;
  font-size: 18px;
  margin-bottom: 10px;
}

#participant-select {
  width: 100%;
  padding: 13px;
  margin: 15px 0;
  border: 2px solid #B9D4EA;
  border-radius: 7px;
  font-size: 16px;
}

.host-buttons {
  display: flex;
  gap: 12px;
}

.host-buttons button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 7px;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.correct-btn {
  background: #25804A;
}

.wrong-btn {
  background: #C7473B;
}

#host-message {
  margin-top: 12px;
  font-weight: 700;
}

.leaderboard-row {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #B9D4EA;
  gap: 10px;
}

.leaderboard-row strong {
  color: #145A96;
}

@media (max-width: 650px) {
  .host-buttons {
    flex-direction: column;
  }
}

/* PODIUM JUARA VOLLEY QUIZ */
.podium-section {
  margin: 30px 0;
  padding: 25px 15px;
  background: #f3f8fc;
  border: 2px solid #b7d7f2;
  border-radius: 16px;
  text-align: center;
}

.podium-section h3 {
  color: #155b96;
  margin-bottom: 25px;
}

.podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  max-width: 650px;
  margin: auto;
}

.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 8px;
}

.podium-item strong {
  color: #123d62;
  overflow-wrap: anywhere;
}

.podium-item span {
  color: #31536f;
  font-weight: bold;
}

.medal {
  font-size: 38px;
}

.podium-block {
  width: 100%;
  padding: 20px 0;
  font-size: 30px;
  font-weight: bold;
  color: white;
  border-radius: 10px 10px 0 0;
}

.podium-item.first .podium-block {
  height: 110px;
  background: #e6b422;
}

.podium-item.second .podium-block {
  height: 75px;
  background: #8799a8;
}

.podium-item.third .podium-block {
  height: 55px;
  background: #b97845;
}

@media (max-width: 500px) {
  .podium-container {
    gap: 6px;
  }

  .medal {
    font-size: 28px;
  }

  .podium-item strong {
    font-size: 13px;
  }

  .podium-item span {
    font-size: 12px;
  }
}

/* ANIMASI PODIUM PEMENANG */

.podium-section h3 {
  animation: titleReveal 0.8s ease both;
}

.podium-item {
  opacity: 0;
  animation: podiumRise 0.9s ease forwards;
}

.podium-item.second {
  animation-delay: 0.3s;
}

.podium-item.first {
  animation-delay: 0.7s;
}

.podium-item.third {
  animation-delay: 1.1s;
}

.medal {
  animation: medalPop 0.8s ease 1.3s both;
}

.podium-item.first .podium-block {
  animation: goldGlow 2s ease-in-out 2s infinite alternate;
}

@keyframes podiumRise {
  from {
    opacity: 0;
    transform: translateY(65px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes medalPop {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  70% {
    opacity: 1;
    transform: scale(1.25);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes goldGlow {
  from {
    box-shadow: 0 0 5px #e6b422;
  }
  to {
    box-shadow: 0 0 22px #e6b422;
  }
}

@media (prefers-reduced-motion: reduce) {
  .podium-section *,
  .podium-section h3 {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

.winner-congratulations {
  color: #155b96;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 18px;
  animation: titleReveal 1s ease both;
  text-align: center;
}

@media (max-width: 500px) {
  .winner-congratulations {
    font-size: 17px;
  }
}
