@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --brand: #19c8a1;
  --brand-dark: #0f9f84;
  --navy: #0b1835;
  --navy-soft: #17284d;
  --ink: #16213b;
  --muted: #667085;
  --line: #dce9e6;
  --wash: #f4fbf9;
  --warning: #ffb547;
  --danger: #ef5b6b;
  --shadow: 0 24px 70px rgba(4, 14, 36, .3);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 15%, rgba(25,200,161,.18), transparent 25%),
    radial-gradient(circle at 12% 84%, rgba(255,181,71,.10), transparent 22%),
    linear-gradient(135deg, #07142f 0%, #10234a 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .12;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 44px 44px;
}
a { text-decoration: none; }

.nav-bar {
  position: relative;
  z-index: 10;
  min-height: 76px;
  display: flex;
  align-items: center;
  padding: 10px max(22px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(7,20,47,.78);
  backdrop-filter: blur(18px);
}
.nav-bar .container, .nav-bar .row { width: 100%; }
.site-branding { display: flex; align-items: center; gap: 14px; }
.site-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.045em;
}
.site-title a { color: #fff; }
.site-title a::before {
  content: "E2";
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  margin-right: 11px;
  color: #fff;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 8px 20px rgba(25,200,161,.24);
  font-size: .9rem;
  letter-spacing: 0;
  vertical-align: middle;
}
.site-title a span { color: var(--brand); }
.site-branding > h2 {
  margin: 0;
  padding-left: 14px;
  color: #a9b6cf;
  border-left: 1px solid rgba(255,255,255,.18);
  font-family: inherit;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.quiz-tagline {
  margin-left: auto;
  color: #8df0da;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}

#google_translate_element, #google_element {
  position: absolute;
  z-index: 20;
  top: 18px;
  right: max(18px, calc((100vw - 1180px) / 2));
}
.goog-te-gadget-simple {
  padding: 8px 10px !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.08) !important;
}
.goog-te-gadget-simple span { color: #fff !important; }
.goog-te-banner-frame, .skiptranslate iframe { display: none !important; }
body { top: 0 !important; }

main {
  width: min(100% - 30px, 940px);
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 48px 0 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
main > h2 {
  order: -3;
  margin: 0 0 8px;
  color: #8df0da;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}
main > h3 {
  order: -2;
  max-width: 820px;
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -.045em;
  text-align: center;
}
main > br { display: none; }
.timer-container {
  order: -1;
  margin: 0 0 24px;
  padding: 9px 15px;
  color: #c8d2e5;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}
.timer-container p { margin: 0; font-size: .88rem; font-weight: 650; }
#timer { color: var(--warning); font-weight: 900; font-variant-numeric: tabular-nums; }

.game-quiz-container {
  position: relative;
  width: min(100%, 760px);
  min-height: 510px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 25px;
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.game-quiz-container::before {
  content: "DO HARDER";
  position: absolute;
  top: 0;
  right: 24px;
  padding: 7px 12px;
  color: var(--navy);
  border-radius: 0 0 9px 9px;
  background: var(--brand);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .13em;
}
.quiz-progress {
  height: 6px;
  margin: 10px 0 24px;
  border-radius: 999px;
  background: #e7efed;
  overflow: hidden;
}
.quiz-progress span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  transition: width .35s ease;
}
.game-details-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 18px;
}
.game-details-container h1 {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.game-details-container h1 span { color: var(--navy); font-size: 1.05rem; font-weight: 900; }
.game-question-container {
  min-height: 126px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--wash);
}
.game-question-container h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  line-height: 1.55;
  text-align: center;
  white-space: pre-line;
}
.game-options-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin: 20px 0;
}
.game-options-container > span {
  position: relative;
  min-height: 58px;
  display: block;
  border: 1px solid #d7e2df;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.game-options-container > span:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 9px 22px rgba(11,24,53,.08);
}
.game-options-container > span::before {
  position: absolute;
  z-index: 1;
  left: 13px;
  top: 50%;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: var(--brand-dark);
  border-radius: 9px;
  background: var(--wash);
  font-size: .78rem;
  font-weight: 900;
  pointer-events: none;
}
.game-options-container > span:nth-of-type(1)::before { content: "A"; }
.game-options-container > span:nth-of-type(2)::before { content: "B"; }
.game-options-container > span:nth-of-type(3)::before { content: "C"; }
.game-options-container > span:nth-of-type(4)::before { content: "D"; }
.game-options-container label {
  min-height: 58px;
  width: 100%;
  margin: 0;
  padding: 12px 14px 12px 55px;
  display: flex;
  align-items: center;
  color: #34405a;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.35;
}
input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
input[type="radio"]:checked ~ .option {
  color: var(--navy);
  background: rgba(25,200,161,.13);
  box-shadow: inset 0 0 0 2px var(--brand);
}
.next-button-container { margin-top: auto; display: flex; justify-content: flex-end; }
.next-button-container button,
.modal-button-container button {
  min-width: 160px;
  min-height: 48px;
  padding: 0 20px;
  color: var(--navy);
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  box-shadow: 0 10px 25px rgba(25,200,161,.22);
  cursor: pointer;
  font: inherit;
  font-size: .9rem;
  font-weight: 850;
  transition: transform .2s ease, background .2s ease;
}
.next-button-container button:hover,
.modal-button-container button:hover { transform: translateY(-2px); background: #21d8b0; }

.modal-container {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  padding: 20px;
  align-items: center;
  justify-content: center;
  background: rgba(3,10,28,.78);
  backdrop-filter: blur(10px);
  animation: fadeIn .25s ease-out;
}
.modal-content-container {
  width: min(100%, 460px);
  min-height: 300px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}
.modal-content-container h1 {
  height: auto;
  margin: 0;
  color: var(--navy);
  font-size: 1.45rem;
  line-height: 1.35;
  text-align: center;
}
.grade-details {
  width: 100%;
  height: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.grade-details p {
  margin: 0;
  padding: 12px;
  color: #48536a;
  border-radius: 11px;
  background: var(--wash);
  text-align: center;
  font-size: .88rem;
}
.grade-details p:last-child { grid-column: 1 / -1; color: var(--brand-dark); font-weight: 800; }
.modal-button-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.modal-button-container ul { margin: 0; padding: 0; list-style: none; }
.modal-button-container li { list-style: none; }
.modal-button-container a,
.modal-content-container > li a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: var(--navy) !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--wash);
  font-size: .88rem;
  font-weight: 800;
}
.modal-content-container > li { list-style: none; text-align: center; }

@keyframes fadeIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 720px) {
  .nav-bar { min-height: 68px; padding: 9px 14px; }
  .site-branding > h2 { display: none; }
  .quiz-tagline { font-size: .62rem; letter-spacing: .1em; }
  #google_translate_element, #google_element { position: static; display: flex; justify-content: center; padding-top: 12px; }
  main { width: min(100% - 20px, 940px); min-height: calc(100vh - 68px); padding: 34px 0 44px; }
  main > h3 { font-size: 1.7rem; }
  .game-quiz-container { min-height: 590px; padding: 20px 16px; border-radius: 20px; }
  .game-details-container { padding-top: 12px; }
  .game-details-container h1 { font-size: .72rem; }
  .game-question-container { min-height: 120px; padding: 18px 14px; }
  .game-options-container { grid-template-columns: 1fr; gap: 10px; }
  .game-options-container > span, .game-options-container label { min-height: 54px; }
  .next-button-container button { width: 100%; }
  .modal-content-container { padding: 24px 18px; }
  .modal-button-container { flex-direction: column; }
  .modal-button-container button, .modal-button-container ul, .modal-button-container li, .modal-button-container a { width: 100%; }
}

@media (max-width: 390px) {
  .site-title a::before { width: 36px; height: 36px; margin-right: 8px; }
  .site-title { font-size: 1.05rem; }
  .quiz-tagline { display: none; }
  .game-details-container { align-items: flex-start; flex-direction: column; gap: 7px; }
  .grade-details { grid-template-columns: 1fr; }
  .grade-details p:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
