* {
  box-sizing: border-box;
  font-family: "Montserrat", Arial, sans-serif;
}
body {
  margin: 0;
  font-family: "Montserrat", Arial;
  background: #f1f2f4;
  color: #111;
}
header {
  background: #111;
  color: #fff;
  border-bottom: 5px solid #ffc400;
  padding: 12px 5%;
  display: flex;
  align-items: center;
  gap: 14px;
}
header img {
  width: 58px;
  border-radius: 12px;
}
.wrap {
  max-width: 1100px;
  margin: 25px auto;
  padding: 0 18px;
}
.card {
  background: #fff;
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 15px 45px #0002;
}
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  padding: 0;
  overflow: hidden;
}
.hero > div {
  padding: 40px;
}
.yellow {
  background: #ffc400;
}
.rule {
  background: #111;
  color: #fff;
  padding: 17px;
  border-radius: 14px;
  margin: 12px 0;
}
.rule b {
  color: #ffc400;
}
h1 {
  font-size: 52px;
  line-height: 1;
  margin: 12px 0;
}
.btn {
  border: 0;
  border-radius: 13px;
  padding: 13px 18px;
  font-weight: 800;
  background: #ffc400;
  color: #111;
  cursor: pointer;
  margin: 5px;
  box-shadow: 0 4px 0 #b88b00;
}
.btn.dark {
  background: #111;
  color: #ffc400;
  box-shadow: 0 4px 0 #000;
}
.btn.white {
  background: #fff;
  border: 2px solid #111;
  box-shadow: none;
}
.btn:disabled {
  opacity: 0.35;
}
.hidden {
  display: none;
}
.bar {
  height: 13px;
  background: #ddd;
  border-radius: 20px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: #ffc400;
}
.meta {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  font-weight: bold;
}
.qtop {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tag {
  background: #111;
  color: #ffc400;
  padding: 8px 12px;
  border-radius: 99px;
}
.speak {
  border: 0;
  background: #ffc400;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
}
.ref {
  display: block;
  max-width: 430px;
  max-height: 260px;
  margin: 15px auto;
  object-fit: contain;
}
.opts {
  display: grid;
  gap: 11px;
}
button,
input,
select,
textarea {
  font-family: "Montserrat", Arial, sans-serif;
}
.opt {
  border: 2px solid #ddd;
  background: white;
  border-radius: 15px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.opt:hover,
.opt.sel {
  border-color: #111;
  background: #fff4b8;
}
.fb {
  padding: 16px;
  margin-top: 16px;
  border-radius: 14px;
}
.ok {
  background: #e7f7ec;
  border-left: 6px solid #16833b;
}
.bad {
  background: #fff0ed;
  border-left: 6px solid #b42318;
}
.nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 20px;
}
.result {
  text-align: center;
}
@media (max-width: 820px) {
  .quizcontent {
    width: 100%;
  }
}
.score {
  font-size: 70px;
  font-weight: 900;
  color: #d6a500;
}
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 40px;
  }
  .hero > div,
  .card {
    padding: 23px;
  }
}
.langswitch {
  margin-left: auto;
  display: flex;
  gap: 6px;
  background: #2a2a2a;
  padding: 5px;
  border-radius: 12px;
}
.langbtn {
  border: 0;
  border-radius: 9px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
  background: #444;
  color: #fff;
}
.langbtn.active {
  background: #ffc400;
  color: #111;
}
@media (max-width: 600px) {
  header {
    flex-wrap: wrap;
  }
  .langswitch {
    width: 100%;
    margin-left: 72px;
  }
}
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}
.category-badge:before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}
@media (max-width: 820px) {
} /* Mobile header refinement */
@media (max-width: 600px) {
  header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 16px 12px !important;
    text-align: center !important;
  }
  header img {
    width: 58px !important;
    height: 58px !important;
    margin: 0 auto 4px !important;
    flex: none !important;
  }
  header > div:nth-of-type(1) {
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
  }
  header > div:nth-of-type(1) b {
    display: block !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
    margin: 0 0 3px !important;
  }
  header > div:nth-of-type(1) small {
    display: block !important;
    max-width: 430px !important;
    margin: 0 auto !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    overflow-wrap: normal !important;
  }
  .langswitch {
    width: auto !important;
    min-width: 210px !important;
    max-width: 100% !important;
    margin: 6px auto 0 !important;
    padding: 5px !important;
    flex-basis: auto !important;
    justify-content: center !important;
    align-self: center !important;
  }
  .langbtn {
    min-width: 44px !important;
    padding: 8px 12px !important;
  }
}
@media (min-width: 601px) and (max-width: 820px) {
  header {
    padding: 14px 18px !important;
  }
  .langswitch {
    margin-left: auto !important;
    width: auto !important;
    flex-basis: auto !important;
  }
}
.content-notice {
  margin-top: 18px;
  padding: 14px 16px;
  background: #fff8d6;
  border: 1px solid #e5c552;
  border-left: 5px solid #111;
  border-radius: 12px;
  color: #2d2d2d;
  font-size: 13px;
  line-height: 1.55;
}
.content-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #111;
}
.hit {
  color: #198754;
}
.miss {
  color: #c62828;
}
.corr {
  color: #9a6b00;
}
@media (max-width: 650px) {
}
.quizcontent {
  position: relative;
}
.meta {
  padding-right: 0;
}
.meta .btn.white {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 4;
}
@media (max-width: 650px) {
  .meta .btn.white {
    top: 12px;
    right: 12px;
  }
  .quizcontent {
    padding-top: 8px;
  }
}
/* Responsive Home button placement */
.quizcontent {
  position: relative;
  padding-top: 0 !important;
}
#phase {
  padding-right: 100px;
  min-height: 46px;
  display: flex;
  align-items: center;
  margin-top: 0;
}
.meta .btn.white {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  z-index: 5;
  min-width: 78px;
  height: 46px;
  padding: 10px 16px;
}
@media (min-width: 768px) and (max-width: 1100px) {
  #phase {
    padding-right: 94px;
    min-height: 44px;
  }
  .meta .btn.white {
    top: 0 !important;
    right: 0 !important;
    min-width: 74px;
    height: 44px;
    padding: 9px 14px;
  }
}
@media (max-width: 767px) {
  #phase {
    padding-right: 84px;
    min-height: 42px;
    font-size: 18px;
    line-height: 1.2;
  }
  .meta .btn.white {
    top: 0 !important;
    right: 0 !important;
    min-width: 70px;
    height: 42px;
    padding: 8px 12px;
    font-size: 12px;
  }
  .meta {
    margin-top: 8px;
  }
}
@media (max-width: 380px) {
  #phase {
    padding-right: 76px;
    font-size: 16px;
  }
  .meta .btn.white {
    min-width: 64px;
    padding: 7px 9px;
  }
}
