/* ==========================================================
   🎨 FLAT DESIGN (Clean Maroon Palette)
   ========================================================== */
:root {
  --header-height: 80px;
  --footer-height: 60px;

  /* Base */
  --white: #ffffff;
  --light-bg: #f9f9f9;

  /* Text */
  --text-main: #222222;
  --text-soft: #555555;

  /* Accent (Brand) */
  --maroon: #b8003c;
  --maroon-dark: #8a002f;
  --maroon-soft: #fbe6ec;

  /* Status */
  --success: #4caf50;
  --danger: #f44336;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--light-bg);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  overflow-y: auto;
}

/* ==========================================================
   🟥 HEADER
   ========================================================== */
.header {
   flex-direction: row;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--white);
  color: var(--text-main);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}


.header h1 {
  font-size: 1.5em;
  margin: 0;
  font-weight: 600;
}

.header p {
  margin: 3px 0 0;
  font-size: 0.9em;
  color: var(--text-soft);
}

/* ==========================================================
   🟥 FOOTER
   ========================================================== */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-height);
  background: var(--white);
  color: var(--text-soft);
  text-align: center;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-top: 1px solid #eee;
}

/* ==========================================================
   🟦 MAIN CONTENT
   ========================================================== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  padding-top: calc(var(--header-height) + 20px);
  padding-bottom: calc(var(--footer-height) + 40px);
  padding-left: 20px;
  padding-right: 20px;
  background: var(--light-bg);
  box-sizing: border-box;
}

.card {
  background: var(--white);
  padding: 25px;
  border-radius: 15px;
  max-width: 600px;
  /* width: 100%; */
  width: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  text-align: center;
  transition: 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.2);
}

/* ==========================================================
   🟩 HEADER BAR DALAM CARD
   ========================================================== */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.header-bar h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1;
}

.header-bar .skip {
  background: var(--maroon);
  color: white;
  font-weight: bold;
  padding: 6px 14px;
  font-size: 0.9em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
}

.header-bar .skip:hover {
  background: var(--maroon-dark);
}

/* ==========================================================
   🟧 ISI SOAL DAN INFO
   ========================================================== */
#soal {
  font-size: 1.2em;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.4;
  margin: 15px 0;
}

.info {
  background: var(--maroon-soft);
  color: var(--maroon-dark);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--maroon);
  text-align: left;
  font-size: 1em;
  line-height: 1.5;
}

.score {
  margin-top: 20px;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--maroon);
}

/* ==========================================================
   🟦 TOMBOL PILIHAN
   ========================================================== */
button {
  margin: 8px 0;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  transition: 0.25s;
  width: 100%;
}

.pilihan {
  background: #f2f2f2;
  color: var(--text-main);
  text-align: left;
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

.pilihan:hover {
  background: var(--maroon);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.pilihan:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.benar {
  background: var(--success) !important;
  color: white;
}

.salah {
  background: var(--danger) !important;
  color: white;
}

/* ==========================================================
   🟨 RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
  :root { --header-height: 70px; --footer-height: 55px; }
  .card { padding: 20px; margin: 10px 0; }
  .header-bar h3 { font-size: 1.2em; }
  .header-bar .skip { height: 34px; font-size: 0.85em; }
  #soal { font-size: 1.1em; }
}

@media (max-width: 480px) {
  :root { --header-height: 65px; --footer-height: 50px; }
  .card { padding: 15px; border-radius: 12px; }
  .header-bar .skip { font-size: 0.85em; height: 32px; }
}

/* ==========================================================
   ✨ ANIMASI SKIP
   ========================================================== */
@keyframes slowBlink {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.skip.active-blink {
  animation: slowBlink 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(184, 0, 60, 0.5);
}

/* ==========================================================
   ✳️ SCORE SPACING STYLE
   ========================================================== */
.score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: bold;
  color: var(--maroon);
  flex-wrap: wrap;
}

.icon-score {
  width: 22px;
  height: 22px;
  margin: 0 4px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
  transition: transform 0.2s ease;
}

.icon-score:hover {
  transform: scale(1.1);
}

.divider {
  display: inline-block;
  width: 30px;
}

/* ==========================================================
   ✨ FADE TRANSITION
   ========================================================== */
.fade {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.fade.show {
  opacity: 1;
}

/* ===============================
   HOME BUTTON - BLACK STYLE
================================ */

.home-wrap {
  max-width: 600px;           /* SAMA seperti .card */
  width: 100%;
  margin: 20px auto 0;        /* center + jarak atas */
  display: flex;
  justify-content: center;
}

.btn-home {
  width: auto;                /* jangan full */
  height: 36px;
  padding: 6px 16px;

  background: var(--text-main); /* #222222 */
  color: #fff;

  font-size: 0.9em;
  font-weight: bold;
  border-radius: 8px;
}


/* ===============================
   ROTATE WARNING (LANDSCAPE)
================================ */
.rotate-warning {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.rotate-box {
  color: #fff;
  font-size: 1.4rem;
  padding: 20px;
}

.rotate-box small {
  display: block;
  font-size: 1rem;
  opacity: 0.8;
  margin-top: 8px;
}

/* Aktif jika LANDSCAPE */
@media screen and (orientation: landscape) and (max-width: 900px) {
  .rotate-warning {
    display: flex;
  }

  body {
    overflow: hidden;
  }
}
