:root {
  --page-bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #172033;
  --muted: #667085;
  --border: #dfe5ee;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #0f766e;
  --success: #16803b;
  --danger: #c9363e;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(23, 32, 51, 0.12);
  --font-sans: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#gameArea,
#gameArea *,
#gameArea::before,
#gameArea::after,
#gameArea *::before,
#gameArea *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--page-bg);
  font-family: var(--font-sans);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#spacer {
  width: 100%;
  height: 30px;
  float: none;
  clear: both;
}

#spacer2 {
  width: 100%;
  height: 5px;
  float: none;
  clear: both;
}

/* The activity stage keeps its original desktop dimensions. */
#gameArea {
  width: 800px;
  min-height: 400px;
  margin: 25px auto 10px;
  overflow: hidden;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.question {
  width: 700px;
  margin: auto;
  padding: 42px 24px 44px;
  clear: both;
  float: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

#opHolder {
  width: 684px;
  margin: auto;
}

.option {
  width: 212px;
  min-height: 48px;
  margin: 0 8px;
  padding: 11px 12px;
  float: left;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: 0 2px 5px rgba(23, 32, 51, 0.04);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}

.option:hover {
  background: #eff6ff;
  border-color: #93b4ee;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.option:focus-visible,
#butang1:focus-visible,
.feedback4:focus-visible,
.feedback5:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
}

.correctFeedback,
.incorrectFeedback {
  width: 150px;
  margin-top: 40px;
  margin-left: 20px;
  padding: 7px;
  float: none;
  clear: both;
  color: #ffffff;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.correctFeedback {
  background: var(--success);
}

.incorrectFeedback {
  margin-right: 12px;
  background: var(--danger);
}

#feedback3 {
  width: 100%;
  height: 0;
  position: absolute;
  bottom: 0;
  overflow: hidden;
  color: #ffffff;
  background: #1f3b59;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 30px;
  text-align: center;
  letter-spacing: 0.02em;
}

#tFeedbackSpacer {
  width: 100%;
  height: 30px;
  float: none;
  clear: both;
}

#tFeedback {
  width: 100%;
  clear: both;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

#endPage,
#endPageR {
  width: 100%;
  float: left;
  color: #ffffff;
  background: #1f3b59;
  font-family: var(--font-sans);
  font-weight: 700;
  text-align: center;
}

#endPage {
  min-height: 80px;
  padding: 20px;
  font-size: 32px;
}

#endPageR {
  min-height: 40px;
  padding: 10px;
  font-size: 26px;
}

.feedback1,
.feedback3,
.feedback4x,
.feedback6,
.feedback6a,
.feedback6b,
#intro1,
#intro2,
#intro3 {
  margin-right: auto;
  margin-left: auto;
  font-family: var(--font-sans);
  text-align: center;
}

.feedback1 {
  width: 90%;
  padding-top: 20px;
  padding-bottom: 30px;
  font-size: 20px;
}

.feedback2,
.feedback2a {
  width: 220px;
  margin: auto;
  padding: 10px 12px;
  color: #ffffff;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.feedback2 {
  background: var(--success);
}

.feedback2a {
  margin-top: 6px;
  background: var(--danger);
}

.feedback3 {
  width: 90%;
  padding-top: 22px;
  color: var(--muted);
  font-size: 17px;
}

.feedback4x {
  width: 90%;
  padding-top: 30px;
  font-size: 12px;
}

.feedback4,
.feedback5,
#butang1 {
  color: #ffffff;
  background: var(--primary);
  border-radius: 8px;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.2);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  text-align: center;
  transition: background-color 160ms ease, box-shadow 160ms ease,
    transform 160ms ease;
}

.feedback4,
.feedback5 {
  width: 240px;
  margin: 0 auto 10px;
  padding: 10px 14px;
  font-size: 16px;
}

.feedback4:hover,
.feedback5:hover,
#butang1:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
  transform: translateY(-1px);
}

#butang1 {
  width: 120px;
  min-height: 38px;
  margin: auto;
  padding: 8px 12px;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: 0.03em;
}

#butang2 {
  width: 74px;
  height: 74px;
  margin: 10px auto 2px;
  position: relative;
  background: #ffffff;
  border: 1px solid #d9e1eb;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.14);
  text-align: center;
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

#butang2 img {
  display: none;
}

#butang2::before {
  content: "";
  width: 40px;
  height: 40px;
  position: absolute;
  top: 50%;
  left: 50%;
  border: 4px solid #7eaa67;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

#butang2::after {
  content: "";
  width: 0;
  height: 0;
  position: absolute;
  top: 50%;
  left: 52%;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 13px solid #7eaa67;
  transform: translate(-42%, -50%);
}

#butang2:hover {
  box-shadow: 0 11px 24px rgba(23, 32, 51, 0.18);
  transform: translateY(-2px);
}

#butang2:focus-visible {
  outline: 3px solid rgba(126, 170, 103, 0.28);
  outline-offset: 4px;
}

.feedback6 {
  width: 90%;
  padding-top: 22px;
  font-size: 28px;
  font-weight: 700;
}

.feedback6a,
.feedback6b {
  width: 90%;
  padding-top: 12px;
  font-size: 17px;
  line-height: 1.5;
}

.feedback6a {
  color: var(--muted);
}

#intro1 {
  width: 90%;
  padding-top: 28px;
  padding-bottom: 24px;
  font-size: 25px;
}

#intro1 img {
  display: block;
  width: 90%;
  margin: auto;
}

#intro2 {
  width: 70%;
  padding-top: 4px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

#intro3 {
  width: 90%;
  padding-top: 30px;
  font-size: 12px;
}

#bar1,
#bar2 {
  width: 50%;
  height: 64px;
  float: left;
  color: var(--text);
  background: #f5f8fc;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
}

#bar1 {
  border-right: 1px solid var(--border);
}

#qText,
#scoreText {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#qText {
  margin-left: 22px;
  float: left;
}

#scoreText {
  margin-right: 22px;
  float: right;
  color: var(--accent);
}

#feedback1 {
  position: relative;
  float: right;
}

#feedback1 img {
  width: 26px;
  position: absolute;
  top: -1px;
  right: 0;
}

@media screen and (max-width: 800px) {
  #gameArea {
    width: 100%;
    margin-top: 16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .question {
    width: 90%;
  }
}

@media screen and (max-width: 685px) {
  #gameArea {
    min-height: 460px;
  }

  #opHolder {
    width: 280px;
    margin: auto;
  }

  .question {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 22px;
  }

  .option {
    width: 100%;
    margin: 0 0 10px;
    padding: 10px 12px;
    float: left;
    font-size: 18px;
  }

  #tFeedbackSpacer {
    height: 25px;
  }
}

@media screen and (max-width: 450px) {
  .question {
    padding-top: 30px;
    padding-bottom: 34px;
  }

  #intro2 {
    width: 84%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .option,
  .feedback4,
  .feedback5,
  #butang1,
  #butang2 {
    transition: none;
  }
}
