
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  --pink: #f5a9c8;
  --pink-dark: #dc6f9c;
  --pink-light: #fff0f6;
  --pink-pale: #fff8fb;
  --pink-border: #f4c6d9;
  --text: #59434f;
  --muted: #9b8290;
  --white: #ffffff;
  --green: #259b69;
  --red: #dc5871;
  --shadow: 0 12px 35px rgba(202, 119, 157, .13);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  background-color: var(--pink-pale);
  background-image:
    linear-gradient(45deg, rgba(245,169,200,.10) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(245,169,200,.10) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(245,169,200,.10) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(245,169,200,.10) 75%);
  background-size: 32px 32px;
  background-position: 0 0, 0 16px, 16px -16px, -16px 0;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

/* HEADER */

.topbar {
  min-height: 76px;
  padding: 12px 6%;
  background: rgba(255,255,255,.94);
  border-bottom: 2px solid var(--pink-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.brand {
  color: var(--text);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 1px;
  text-decoration: none;
}

.brand span,
.hero h1 span,
.auth-card h1 span {
  color: var(--pink-dark);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-label {
  font-weight: 800;
  color: var(--pink-dark);
}

/* MAIN */

main {
  width: min(1160px, 92%);
  min-height: calc(100vh - 145px);
  margin: 35px auto;
}

.screen {
  width: 100%;
  animation: appear .35s ease;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* BUTTONS */

.btn {
  border: 0;
  border-radius: 13px;
  padding: 12px 20px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .4px;
  transition: .2s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #f4a3c3, #df78a4);
  box-shadow: 0 6px 16px rgba(220,111,156,.22);
}

.btn-outline {
  color: var(--pink-dark);
  background: white;
  border: 1.5px solid var(--pink-border);
}

.btn-small {
  padding: 9px 14px;
  font-size: 11px;
}

.btn-large {
  padding: 15px 25px;
  font-size: 14px;
}

.full-width {
  width: 100%;
}

/* TEXT */

.eyebrow {
  color: var(--pink-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

.message {
  min-height: 22px;
  margin-top: 15px;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.tiny-note {
  color: var(--muted);
  font-size: 11px;
  margin-top: 15px;
  text-align: center;
}

/* AUTH */

.auth-screen {
  min-height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.auth-card {
  width: min(470px, 100%);
  padding: 35px;
  background: white;
  border: 2px solid var(--pink-border);
  border-radius: 27px;
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-card h1 {
  font-size: clamp(24px, 4vw, 31px);
  line-height: 1.3;
  margin-bottom: 10px;
}

.auth-card > .muted {
  font-size: 13px;
  margin-bottom: 24px;
}

.kitty-art {
  width: 160px;
  max-width: 100%;
  margin: 0 auto 12px;
}

.kitty-art svg {
  width: 100%;
  display: block;
}

.auth-form {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 9px;
  margin-top: 20px;
}

.auth-form label,
.admin-card label {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.auth-form input,
.admin-card input {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--pink-border);
  border-radius: 12px;
  background: var(--pink-pale);
  color: var(--text);
  outline: none;
  margin-bottom: 7px;
  transition: .2s;
}

.auth-form input:focus,
.admin-card input:focus {
  border-color: var(--pink-dark);
  box-shadow: 0 0 0 3px rgba(245,169,200,.18);
}

.auth-form .btn {
  margin-top: 9px;
}

/* HERO */

.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 35px;
  padding: 55px 6%;
  background: white;
  border: 2px solid var(--pink-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-copy h1 {
  font-size: clamp(32px, 5vw, 49px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 17px;
}

.hero-description {
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 25px;
}

.hero-art {
  min-height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: radial-gradient(circle, #fff0f6 0%, #fff9fc 70%);
  border-radius: 25px;
  border: 1px dashed var(--pink-border);
}

.kitty-card {
  width: min(290px, 90%);
  padding: 25px;
  text-align: center;
  background: white;
  border: 2px solid var(--pink-border);
  border-radius: 30px;
  box-shadow: 0 12px 30px rgba(220,111,156,.15);
  transform: rotate(-3deg);
}

.kitty-card .kitty-art {
  width: 190px;
}

.kitty-caption {
  color: var(--pink-dark);
  font-weight: 900;
  font-size: 19px;
  margin-top: 5px;
}

.home-note {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 22px 25px;
  margin-top: 25px;
  background: #fff;
  border: 1.5px solid var(--pink-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.home-note > span {
  color: var(--pink-dark);
  font-size: 36px;
}

.home-note strong {
  font-size: 15px;
}

.home-note p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

/* TOPIC */

.back-link {
  border: 0;
  background: transparent;
  color: var(--pink-dark);
  font-size: 12px;
  font-weight: 900;
  padding: 10px 0;
  margin-bottom: 18px;
}

.back-link:hover {
  text-decoration: underline;
}

.section-heading {
  text-align: center;
  margin: 25px 0 35px;
}

.section-heading h1 {
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 900;
}

.section-heading .muted {
  margin-top: 7px;
  font-weight: 800;
  letter-spacing: 2px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.topic-card {
  position: relative;
  min-height: 225px;
  padding: 28px 23px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  color: var(--text);
  background: white;
  border: 2px solid var(--pink-border);
  border-radius: 23px;
  box-shadow: var(--shadow);
  transition: .25s;
}

.topic-card:hover {
  transform: translateY(-7px);
  border-color: var(--pink-dark);
  box-shadow: 0 16px 35px rgba(220,111,156,.2);
}

.topic-icon {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  background: var(--pink-light);
  border-radius: 17px;
  font-size: 28px;
}

.topic-card strong {
  font-size: 16px;
  font-weight: 900;
}

.topic-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.topic-arrow {
  position: absolute;
  right: 22px;
  bottom: 20px;
  color: var(--pink-dark);
  font-size: 22px;
  font-weight: 900;
}

/* QUIZ */

.quiz-shell {
  padding: 28px;
  background: white;
  border: 2px solid var(--pink-border);
  border-radius: 25px;
  box-shadow: var(--shadow);
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.quiz-top h1 {
  font-size: 28px;
  font-weight: 900;
}

.progress-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  color: var(--pink-dark);
}

.progress-info strong {
  font-size: 14px;
}

.progress-info span {
  color: var(--muted);
  font-size: 11px;
}

.progress-track {
  height: 11px;
  background: var(--pink-light);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 25px;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #f6bad2, #dc6f9c);
  border-radius: inherit;
  transition: width .3s;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 255px;
  gap: 22px;
  align-items: start;
}

.question-card,
.question-side {
  padding: 24px;
  border: 1.5px solid var(--pink-border);
  border-radius: 20px;
  background: #fffafd;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 23px;
}

.question-meta > span:first-child {
  color: var(--pink-dark);
  font-size: 13px;
  font-weight: 900;
}

.question-tag {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.question-card h2 {
  font-size: 21px;
  line-height: 1.55;
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}

.answer-list {
  display: grid;
  gap: 12px;
}

.answer-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  text-align: left;
  color: var(--text);
  background: white;
  border: 1.5px solid var(--pink-border);
  border-radius: 13px;
  transition: .2s;
}

.answer-option:hover:not(:disabled) {
  border-color: var(--pink-dark);
  background: var(--pink-light);
  transform: translateX(3px);
}

.answer-letter {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--pink-dark);
  background: var(--pink-light);
  border-radius: 10px;
  font-weight: 900;
}

.answer-option.correct {
  border-color: #5dbb91;
  background: #edfff5;
  color: #207c53;
}

.answer-option.correct .answer-letter {
  color: white;
  background: #45ad7b;
}

.answer-option.wrong {
  border-color: #e88b9c;
  background: #fff0f2;
  color: #c74760;
}

.answer-option.wrong .answer-letter {
  color: white;
  background: #dc5871;
}

.answer-option:disabled {
  cursor: default;
}

.feedback {
  min-height: 10px;
  margin-top: 17px;
  padding: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.feedback.good,
.feedback.bad {
  padding: 13px 15px;
}

.feedback.good {
  color: #207c53;
  background: #edfff5;
  border: 1px solid #bcebd2;
}

.feedback.bad {
  color: #c74760;
  background: #fff0f2;
  border: 1px solid #f4c4ce;
}

.quiz-navigation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 25px;
}

/* SIDEBAR */

.question-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-stat {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: white;
  border: 1px solid var(--pink-border);
  border-radius: 12px;
  font-size: 12px;
}

.side-stat strong {
  font-weight: 900;
}

.green-text {
  color: var(--green) !important;
}

.red-text {
  color: var(--red) !important;
}

.side-hint {
  padding: 12px;
  color: var(--muted);
  background: var(--pink-light);
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.7;
}

.question-dots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.question-dot {
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid var(--pink-border);
  border-radius: 9px;
  color: var(--muted);
  background: white;
  font-size: 11px;
  font-weight: 900;
}

.question-dot.current {
  color: white;
  background: var(--pink-dark);
  border-color: var(--pink-dark);
}

.question-dot.done {
  color: #207c53;
  background: #edfff5;
  border-color: #7dcba5;
}

.question-dot.missed {
  color: #c74760;
  background: #fff0f2;
  border-color: #e88b9c;
}

/* RESULT */

.result-card {
  width: min(650px, 100%);
  margin: 20px auto;
  padding: 38px;
  text-align: center;
  background: white;
  border: 2px solid var(--pink-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.result-ribbon {
  display: inline-block;
  padding: 9px 18px;
  color: white;
  background: var(--pink-dark);
  border-radius: 30px;
  font-size: 12px;
  font-weight: 900;
}

.result-icon {
  color: var(--pink);
  font-size: 60px;
  margin: 10px 0;
}

.result-card h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
}

.score-circle {
  width: 155px;
  height: 155px;
  margin: 25px auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 9px solid #f7c2d8;
  border-radius: 50%;
  background: var(--pink-light);
}

.score-circle strong {
  color: var(--pink-dark);
  font-size: 48px;
  font-weight: 900;
}

.score-circle span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 25px 0;
}

.result-stats > div {
  padding: 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--pink-pale);
  border: 1px solid var(--pink-border);
  border-radius: 15px;
}

.result-stats strong {
  font-size: 27px;
  font-weight: 900;
}

.result-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ADMIN */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.admin-card {
  min-width: 0;
  padding: 24px;
  background: white;
  border: 2px solid var(--pink-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.admin-card h2 {
  color: var(--pink-dark);
  font-size: 20px;
  margin-bottom: 18px;
}

.admin-card form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 15px;
}

.admin-card > .btn {
  margin-bottom: 12px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.admin-item {
  padding: 13px;
  background: var(--pink-pale);
  border: 1px solid var(--pink-border);
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.admin-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.admin-item small {
  display: block;
  color: var(--muted);
  line-height: 1.6;
}

.admin-item button {
  margin-top: 9px;
  margin-right: 6px;
}

/* FOOTER */

footer {
  padding: 23px 15px;
  text-align: center;
  color: var(--muted);
  background: white;
  border-top: 1px solid var(--pink-border);
  font-size: 12px;
}

footer span {
  color: var(--pink-dark);
  font-weight: 900;
}

/* RESPONSIVE */

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 35px;
  }

  .hero-art {
    min-height: 270px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-card {
    min-height: 170px;
  }

  .quiz-layout {
    grid-template-columns: 1fr;
  }

  .question-side {
    order: -1;
  }

  .question-dots {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  main {
    width: 94%;
    margin: 20px auto;
  }

  .topbar {
    padding: 12px 4%;
  }

  .brand {
    font-size: 20px;
  }

  .user-label {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }

  .auth-card {
    padding: 25px 19px;
  }

  .hero {
    padding: 27px 20px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .quiz-shell {
    padding: 15px;
  }

  .quiz-top {
    align-items: flex-start;
  }

  .quiz-top h1 {
    font-size: 22px;
  }

  .progress-info {
    font-size: 11px;
  }

  .question-card,
  .question-side {
    padding: 16px;
  }

  .question-card h2 {
    font-size: 18px;
  }

  .question-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .quiz-navigation .btn {
    padding: 11px 10px;
    font-size: 10px;
  }

  .question-dots {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .result-card {
    padding: 25px 15px;
  }

  .result-stats {
    gap: 7px;
  }

  .result-stats > div {
    padding: 13px 5px;
  }

  .result-stats span {
    font-size: 10px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-card {
    padding: 18px;
  }
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0 10px;
}

.auth-tabs button {
  flex: 1;
}

/* =====================================
   TOÁN CUTE - HELLO KITTY QUIZ THEME
===================================== */

#quiz-screen {
  background:
    linear-gradient(45deg, #ffeaf2 25%, transparent 25%),
    linear-gradient(-45deg, #ffeaf2 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ffeaf2 75%),
    linear-gradient(-45deg, transparent 75%, #ffeaf2 75%);
  background-size: 28px 28px;
  background-color: #fff7fa;
  padding: 25px 16px;
}

.quiz-shell {
  max-width: 1100px;
  margin: auto;
}

/* Tiêu đề và tiến độ */
.quiz-top {
  background: #fff;
  border: 2px solid #ffd1e2;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 5px 18px #ed9fbe25;
  margin-bottom: 22px;
}

#quiz-topic-title {
  color: #d85b91;
  font-weight: 900;
}

.progress-track {
  height: 12px;
  background: #ffe5ef;
  border-radius: 20px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #ffb5d0, #ed6f9f);
  border-radius: 20px;
  transition: width .3s ease;
}

/* Bố cục */
.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: start;
}

/* Khung câu hỏi */
.question-card {
  position: relative;
  background: #fff;
  border: 2px solid #ffd3e3;
  border-radius: 25px;
  padding: 28px;
  box-shadow: 0 8px 25px #e99bbd25;
  overflow: hidden;
}

.question-card::after {
  content: none !important;
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

#question-number {
  background: #ffe5ef;
  color: #d85b91;
  padding: 8px 15px;
  border-radius: 30px;
  font-weight: 800;
}

.question-tag {
  color: #b66c8b;
  background: #fff4f8;
  padding: 8px 13px;
  border-radius: 30px;
}

#question-text {
  color: #70445a;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.6;
  margin: 15px 0 25px;
}

/* Các đáp án */
.answer-list {
  display: grid;
  gap: 13px;
}

.answer-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 15px 18px;
  border: 2px solid #f8d7e4;
  border-radius: 17px;
  background: #fff9fc;
  color: #70445a;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.answer-option:hover {
  background: #fff0f6;
  border-color: #f39cbd;
  transform: translateY(-2px);
}

.answer-letter {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: grid;
  place-items: center;
  background: #ffe1ed;
  color: #d65c91;
  border-radius: 11px;
  font-weight: 900;
}

/* Đáp án đúng */
.answer-option.correct {
  background: #eafff1;
  border-color: #83d6a1;
  color: #27834c;
}

.answer-option.correct .answer-letter {
  background: #b9f0cc;
  color: #27834c;
}

/* Đáp án sai */
.answer-option.wrong {
  background: #fff0f1;
  border-color: #f29aa4;
  color: #cf5264;
}

.answer-option.wrong .answer-letter {
  background: #ffd2d8;
  color: #cf5264;
}

/* Thông báo đúng sai */
.feedback {
  margin-top: 18px;
  padding: 14px 17px;
  border-radius: 15px;
  font-weight: 800;
}

.feedback.good {
  background: #eafff1;
  color: #27834c;
  border: 1px solid #a9e9bd;
}

.feedback.bad {
  background: #fff0f2;
  color: #cf5264;
  border: 1px solid #ffc3cc;
}

/* Nút chuyển câu */
.quiz-navigation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 25px;
}

#prev-question,
#next-question {
  border-radius: 14px;
  padding: 12px 22px;
  font-weight: 800;
  transition: .2s ease;
}

#next-question {
  background: #ed83ad;
  color: white;
  border: none;
  box-shadow: 0 4px 10px #ed83ad40;
}

#next-question:hover {
  background: #dc6697;
  transform: translateY(-2px);
}

#prev-question {
  background: white;
  color: #d76b99;
  border: 2px solid #f3b5ce;
}

/* Bảng thống kê bên phải */
.question-side {
  background: #fff;
  border: 2px solid #ffd3e3;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 5px 18px #ed9fbe20;
}

.question-side h3 {
  color: #d85b91;
}

#answered-count,
#correct-count,
#wrong-count {
  font-weight: 900;
}

/* Các chấm câu hỏi */
.question-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.question-dot {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff0f6;
  color: #c16b8e;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #f7d0df;
}

.question-dot.current {
  background: #ed83ad;
  color: white;
  border-color: #ed83ad;
}

.question-dot.done {
  background: #d9f7e3;
  color: #27834c;
}

.question-dot.missed {
  background: #ffe0e4;
  color: #cf5264;
}

/* Điện thoại */
@media (max-width: 750px) {
  .quiz-layout {
    grid-template-columns: 1fr;
  }

  .question-card {
    padding: 20px;
  }

  #question-text {
    font-size: 18px;
  }

  .question-side {
    order: 2;
  }

  .quiz-navigation button {
    padding: 11px 15px;
  }
}

/* FIX: KHONG DE NO DE LEN CHU */

#quiz-screen .question-card::after {
  content: none !important;
}

#quiz-screen .question-card {
  overflow: hidden;
  padding: 30px;
}

#quiz-screen .question-meta {
  padding-right: 0;
  margin-bottom: 28px;
}

#quiz-screen #question-text {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin-top: 15px;
  margin-bottom: 28px;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

/* CANH LAI KHOANG CACH */
#quiz-screen .answer-list {
  margin-top: 15px;
}

#quiz-screen .quiz-top {
  position: relative;
  overflow: hidden;
}

#quiz-screen .quiz-top h1 {
  line-height: 1.3;
}

#quiz-screen .progress-info {
  flex-shrink: 0;
}

/* KHONG DE TRANG TRI CHE NOI DUNG */
#quiz-screen::before,
#quiz-screen::after {
  pointer-events: none;
}

/* ==========================================
   TOAN CUTE - HELLO KITTY QUIZ REDESIGN
   Giao dien theo mau da duyet
========================================== */

/* Nen caro hong */
#quiz-screen {
  width: 100%;
  max-width: none;
  padding: 30px 16px 55px;
  background-color: #fff5f9;
  background-image:
    linear-gradient(45deg, #ffe6f0 25%, transparent 25%),
    linear-gradient(-45deg, #ffe6f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ffe6f0 75%),
    linear-gradient(-45deg, transparent 75%, #ffe6f0 75%);
  background-size: 34px 34px;
}

/* Logo */


/* Khung bai thi */
#quiz-screen .quiz-shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px;
  background: rgba(255,255,255,.97);
  border: 2px solid #ffc4dc;
  border-radius: 30px;
  box-shadow: 0 12px 35px rgba(222, 105, 157, .16);
}

/* Hello Kitty trang tri */

/* Dau trang bai thi */
#quiz-screen .quiz-top {
  position: relative;
  z-index: 1;
  padding: 25px 28px;
  margin-bottom: 18px;
  background: #fff;
  border: 2px solid #ffd0e2;
  border-radius: 25px;
  box-shadow: 0 5px 18px rgba(230, 130, 170, .10);
}

#quiz-screen .quiz-top .eyebrow {
  color: #e45d98;
  font-size: 12px;
  letter-spacing: 2px;
}

#quiz-screen .quiz-top h1 {
  color: #df6199;
  font-size: 32px;
  font-weight: 900;
}

#quiz-screen .progress-info strong {
  color: #e45d98;
  font-size: 17px;
}

#quiz-screen .progress-track {
  height: 13px;
  background: #ffe5ef;
  border-radius: 30px;
}

#quiz-screen .progress-bar {
  background: linear-gradient(90deg, #ffb4d1, #e95b99);
  border-radius: 30px;
}

/* Bo cuc */
#quiz-screen .quiz-layout {
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 20px;
}

/* The cau hoi */
#quiz-screen .question-card {
  position: relative;
  padding: 28px;
  background: #fff;
  border: 2px solid #ffd2e3;
  border-radius: 28px;
  box-shadow: 0 6px 20px rgba(230, 130, 170, .08);
  overflow: hidden;
}

#quiz-screen .question-card::after {
  content: none !important;
}

#quiz-screen .question-meta {
  margin-bottom: 25px;
}

#quiz-screen #question-number {
  padding: 10px 18px;
  color: #e65e99;
  background: #ffe5ef;
  border-radius: 30px;
  font-size: 14px;
}

#quiz-screen .question-tag {
  padding: 10px 17px;
  color: #c66b91;
  background: #fff1f6;
  border-radius: 30px;
  font-size: 11px;
}

#quiz-screen #question-text {
  color: #70445e;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.6;
  margin: 15px 0 27px;
  overflow-wrap: anywhere;
}

/* Cac dap an */
#quiz-screen .answer-list {
  display: grid;
  gap: 11px;
}

#quiz-screen .answer-option {
  min-height: 70px;
  padding: 12px 18px;
  gap: 15px;
  background: #fff9fc;
  border: 2px solid #ffd0e2;
  border-radius: 20px;
  color: #70445e;
  font-size: 17px;
  font-weight: 800;
  transition: .2s ease;
}

#quiz-screen .answer-option:hover:not(:disabled) {
  background: #fff0f6;
  border-color: #ed82ad;
  transform: translateY(-2px);
}

#quiz-screen .answer-letter {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffe0ed;
  color: #df6199;
  font-size: 17px;
}

/* Dap an dung va sai */
#quiz-screen .answer-option.correct {
  background: #edfff5;
  border-color: #65c69a;
}

#quiz-screen .answer-option.wrong {
  background: #fff0f2;
  border-color: #e88b9c;
}

/* Bang thong ke */
#quiz-screen .question-side {
  padding: 22px;
  background: #fff;
  border: 2px solid #ffd2e3;
  border-radius: 25px;
  box-shadow: 0 6px 20px rgba(230, 130, 170, .08);
}

#quiz-screen .side-stat {
  padding: 14px;
  background: #fff;
  border: 1.5px solid #ffd0e2;
  border-radius: 16px;
  font-size: 13px;
}

#quiz-screen .side-hint {
  padding: 15px;
  background: #fff0f6;
  border-radius: 16px;
  color: #a66e88;
  font-size: 12px;
}

/* Nut chuyen cau */
#quiz-screen .quiz-navigation .btn {
  border-radius: 15px;
}

/* Danh sach cau hoi */
#quiz-screen .question-dot {
  border-radius: 12px;
  background: #fff1f6;
  border-color: #ffd0e2;
  color: #d66b97;
  transition: .2s;
}

#quiz-screen .question-dot.current {
  background: #e96b9f;
  border-color: #e96b9f;
  color: white;
}

#quiz-screen .question-dot.done {
  background: #e9fff3;
  border-color: #79cba4;
}

/* Responsive */
@media (max-width: 850px) {
  #quiz-screen .quiz-shell {
    padding: 18px;
  }

  #quiz-screen .quiz-layout {
    grid-template-columns: 1fr;
  }

  #quiz-screen .question-side {
    order: 1;
  }

  #quiz-screen .quiz-shell::before {
    font-size: 42px;
    top: -42px;
  }

  #quiz-screen #question-text {
    font-size: 20px;
  }
}

@media (max-width: 600px) {
  #quiz-screen {
    padding: 18px 10px 35px;
  }

  #quiz-screen .quiz-shell {
    padding: 12px;
    border-radius: 20px;
  }

  #quiz-screen .quiz-top {
    padding: 18px;
  }

  #quiz-screen .quiz-top h1 {
    font-size: 23px;
  }

  #quiz-screen .question-card {
    padding: 16px;
  }

  #quiz-screen .answer-option {
    min-height: 58px;
    font-size: 14px;
  }
}

/* =====================================================
   TOAN CUTE - QUIZ REDESIGN THEO ANH MAU
   Dan nguyen khoi nay vao CUOI style.css
   Anh minh hoa nam trong thu muc assets/
===================================================== */

:root {
  --tc-pink: #f36fa5;
  --tc-pink-soft: #fff0f6;
  --tc-border: #ffd0e2;
  --tc-text: #75465f;
  --tc-muted: #a77b91;
}

/* Mo rong khu vuc bai thi */
main:has(#quiz-screen:not(.hidden)) {
  width: 94%;
  max-width: 1500px;
  margin: 16px auto 36px;
}

/* Thanh dau trang */
.topbar {
  min-height: 88px;
  padding: 10px 3.5%;
  background: rgba(255,255,255,.96);
  border-bottom: 2px solid #ffd7e6;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 36px;
  letter-spacing: .5px;
  color: #70435d;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 118px;
  height: 72px;
  background: url("assets/brand-kitty.png") center / contain no-repeat;
}

.brand span {
  color: #f16b9f;
}

.user-label {
  color: #70435d;
  font-size: 16px;
}

/* Nen caro va cac hinh trang tri lay truc tiep tu anh mau */
#quiz-screen {
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: 22px 0 40px;
  background-color: #fff4f8;
  background-image:
    url("assets/bow-left.png"),
    url("assets/bow-right.png"),
    linear-gradient(45deg, rgba(255,255,255,.62) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.62) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.62) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.62) 75%);
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat, repeat;
  background-size:
    145px auto,
    175px auto,
    36px 36px, 36px 36px, 36px 36px, 36px 36px;
  background-position:
    left 12px top 24px,
    right 0 bottom 8px,
    0 0, 0 18px, 18px -18px, -18px 0;
}

#quiz-screen > .back-link {
  margin-left: 10px;
  color: #ee6198;
  font-size: 18px;
}

/* Khung tong */
#quiz-screen .quiz-shell {
  position: relative;
  isolation: isolate;
  max-width: 1300px;
  margin: 0 auto;
  padding: 28px 32px 24px;
  background: rgba(255,255,255,.97);
  border: 2px solid #ffc5dc;
  border-radius: 34px;
  box-shadow: 0 12px 32px rgba(221, 105, 153, .16);
  overflow: visible;
}

/* Hai hinh Hello Kitty dung tu anh mau */
#quiz-screen .quiz-shell::before {
  content: "";
  position: absolute;
  z-index: 4;
  width: 290px;
  height: 175px;
  top: -116px;
  right: -12px;
  background: url("assets/kitty-top.png") center / contain no-repeat;
  pointer-events: none;
}

#quiz-screen .quiz-shell::after {
  content: "";
  position: absolute;
  z-index: 4;
  width: 190px;
  height: 260px;
  left: -175px;
  bottom: 10px;
  background: url("assets/kitty-bottom.png") center / contain no-repeat;
  pointer-events: none;
}

/* Dau bai thi */
#quiz-screen .quiz-top {
  position: relative;
  z-index: 1;
  min-height: 136px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 30px;
  margin: 0 0 0;
  background: #fff;
  border: 2px solid #ffd0e2;
  border-radius: 26px;
  box-shadow: 0 5px 14px rgba(225, 123, 164, .10);
}

#quiz-screen .quiz-top .eyebrow {
  margin-bottom: 3px;
  color: #f05e98;
  font-size: 18px;
  letter-spacing: 0;
}

#quiz-screen #quiz-topic-title {
  color: #ed6099;
  font-size: 42px;
  line-height: 1.15;
  font-weight: 1000;
}

#quiz-screen .progress-info {
  gap: 3px;
  align-items: flex-end;
}

#quiz-screen .progress-info strong {
  color: #ee6098;
  font-size: 27px;
  font-weight: 1000;
}

#quiz-screen .progress-info span {
  color: #9b7188;
  font-size: 19px;
  font-weight: 800;
}

#quiz-screen .progress-track {
  height: 22px;
  margin: 0 0 22px;
  background: #ffe8f1;
  border-radius: 20px;
}

#quiz-screen .progress-bar {
  background: linear-gradient(90deg, #ff9fc4, #ed6099);
}

/* Cot cau hoi va cot thong ke */
#quiz-screen .quiz-layout {
  grid-template-columns: minmax(0, 1fr) 325px;
  gap: 20px;
  align-items: stretch;
}

#quiz-screen .question-card,
#quiz-screen .question-side {
  background: #fff;
  border: 2px solid #ffdaea;
  border-radius: 29px;
  box-shadow: 0 4px 15px rgba(220, 111, 156, .07);
}

#quiz-screen .question-card {
  min-height: 480px;
  padding: 24px 30px 22px;
  overflow: hidden;
}

#quiz-screen .question-card::after {
  content: none !important;
}

#quiz-screen .question-meta {
  margin-bottom: 12px;
}

#quiz-screen #question-number {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 21px;
  color: #ed6099;
  background: #ffe5ef;
  border-radius: 28px;
  font-size: 21px;
  font-weight: 1000;
}

#quiz-screen .question-tag {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 20px;
  color: #e85c95;
  background: #fff0f6;
  border-radius: 28px;
  font-size: 15px;
  font-weight: 1000;
  letter-spacing: 0;
}

#quiz-screen #question-text {
  margin: 0 0 25px;
  color: #75465f;
  font-size: 29px;
  line-height: 1.45;
  font-weight: 900;
  overflow-wrap: anywhere;
}

/* Dap an */
#quiz-screen .answer-list {
  display: grid;
  gap: 9px;
}

#quiz-screen .answer-option {
  min-height: 74px;
  padding: 9px 26px;
  gap: 25px;
  color: #75465f;
  background: linear-gradient(100deg, #fff5f9, #fffafd);
  border: 2px solid #ffd0e2;
  border-radius: 34px;
  font-size: 23px;
  font-weight: 900;
  transition: background .18s ease, border-color .18s ease;
}

#quiz-screen .answer-option:hover:not(:disabled) {
  background: #ffedf4;
  border-color: #f58ab4;
  transform: none;
}

#quiz-screen .answer-letter {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #e85e98;
  background: #ffe1ed;
  border: 2px solid #ffc9df;
  font-size: 24px;
  font-weight: 1000;
}

#quiz-screen .answer-option.correct {
  background: #edfff5;
  border-color: #7acba5;
}

#quiz-screen .answer-option.wrong {
  background: #fff0f2;
  border-color: #e88b9c;
}

/* Bang thong ke */
#quiz-screen .question-side {
  padding: 23px 20px;
  gap: 8px;
}

#quiz-screen .side-stat {
  min-height: 62px;
  align-items: center;
  padding: 10px 18px;
  background: #fff;
  border: 2px solid #ffdaea;
  border-radius: 21px;
  color: #75465f;
  font-size: 19px;
}

#quiz-screen .side-stat strong {
  font-size: 20px;
  font-weight: 1000;
}

#quiz-screen .side-hint {
  position: relative;
  min-height: 90px;
  padding: 17px 13px 13px 60px;
  color: #9b7188;
  background: #fff0f6;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.65;
}

#quiz-screen .side-hint::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 42px;
  height: 32px;
  background: url("assets/bow-left.png") center / contain no-repeat;
}

/* Luoi so cau */
#quiz-screen .question-dots {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 5px;
}

#quiz-screen .question-dot {
  min-height: 48px;
  aspect-ratio: auto;
  border: 2px solid #ffd0e2;
  border-radius: 15px;
  color: #ec6098;
  background: #fff0f6;
  font-size: 17px;
  font-weight: 1000;
}

#quiz-screen .question-dot.current {
  color: #fff;
  background: #ed6099;
  border-color: #ed6099;
}

#quiz-screen .question-dot.done {
  color: #229b6a;
  background: #edfff5;
  border-color: #a9e4c7;
}

/* HIEN LAI NUT DIEU HUONG */
#quiz-screen .quiz-navigation {
  display: flex !important;
  justify-content: space-between;
  gap: 12px;
  margin-top: 25px;
}

/* Responsive */
@media (max-width: 1050px) {
  #quiz-screen .quiz-shell {
    margin: 0 8px;
  }
  #quiz-screen .quiz-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  #quiz-screen .quiz-shell::after {
    left: -75px;
    width: 120px;
    opacity: .9;
  }
}

@media (max-width: 760px) {
  main:has(#quiz-screen:not(.hidden)) {
    width: 96%;
  }
  #quiz-screen .quiz-shell {
    padding: 18px 14px;
    margin: 0;
    border-radius: 24px;
  }
  #quiz-screen .quiz-shell::before {
    width: 135px;
    height: 90px;
    top: -68px;
    right: 0;
  }
  #quiz-screen .quiz-shell::after {
    display: none;
  }
  #quiz-screen .quiz-layout {
    grid-template-columns: 1fr;
  }
  #quiz-screen .question-side {
    order: 2;
  }
  #quiz-screen #quiz-topic-title {
    font-size: 30px;
  }
  #quiz-screen .progress-info strong {
    font-size: 19px;
  }
  #quiz-screen .progress-info span {
    font-size: 13px;
  }
  #quiz-screen #question-text {
    font-size: 21px;
  }
  #quiz-screen .answer-option {
    min-height: 60px;
    font-size: 17px;
    gap: 14px;
  }
  #quiz-screen .answer-letter {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
  #quiz-screen .question-dots {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .brand {
    font-size: 23px;
  }
  .brand::before {
    width: 68px;
    height: 48px;
  }
}

@media (max-width: 430px) {
  #quiz-screen .quiz-top {
    padding: 17px 14px;
  }
  #quiz-screen #quiz-topic-title {
    font-size: 24px;
  }
  #quiz-screen #question-number,
  #quiz-screen .question-tag {
    min-height: 40px;
    font-size: 13px;
  }
  #quiz-screen .question-card {
    padding: 17px 14px;
  }
}

/* ==========================================
   TOAN CUTE - MOBILE QUIZ
   CHI THAY DOI GIAO DIEN DIEN THOAI
========================================== */

@media screen and (max-width: 768px) {

  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  * {
    box-sizing: border-box;
  }

  .topbar {
    width: 100%;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .brand {
    font-size: 18px;
    max-width: 65%;
  }

  .brand::before {
    width: 48px;
    height: 38px;
    background-size: contain;
  }

  .topbar-right {
    min-width: 0;
    gap: 6px;
  }

  .user-label {
    font-size: 12px;
  }

  main:has(#quiz-screen:not(.hidden)) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 8px auto;
    padding: 0 8px;
  }

  #quiz-screen {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 0 20px;
    overflow-x: hidden;
  }

  #quiz-screen .quiz-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 12px;
    border-radius: 18px;
    overflow: hidden;
  }

  #quiz-screen .quiz-shell::before,
  #quiz-screen .quiz-shell::after {
    display: none !important;
  }

  #quiz-screen .quiz-top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-height: 0;
    margin: 0 0 12px;
    padding: 12px;
  }

  #quiz-screen .progress-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 12px;
  }

  #quiz-screen .progress-track {
    height: 8px;
    margin-top: 8px;
  }

  #quiz-screen .quiz-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    gap: 0;
  }

  #quiz-screen .question-card {
    order: 1;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 15px 12px;
    border-radius: 17px;
  }

  #quiz-screen .question-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 10px;
  }

  #quiz-screen #question-text {
    font-size: 18px;
    line-height: 1.55;
    margin: 8px 0 16px;
    overflow-wrap: anywhere;
  }

  #quiz-screen .answer-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    width: 100%;
    min-width: 0;
  }

  #quiz-screen .answer-option {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.45;
    border-radius: 14px;
    overflow-wrap: anywhere;
    transform: none;
  }

  #quiz-screen .answer-letter {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-right: 10px;
  }

  #quiz-screen .feedback {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 10px;
  }

  #quiz-screen .quiz-navigation {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
  }

  #quiz-screen .quiz-navigation .btn {
    flex: 1;
    min-width: 0;
    padding: 11px 6px;
    font-size: 12px;
  }

  /* An phan thong ke va danh sach cau hoi ben canh */
  #quiz-screen .question-side,
  #quiz-screen .side-stat,
  #quiz-screen .side-hint,
  #quiz-screen .question-dots {
    display: none !important;
  }
}

/* Dien thoai man hinh nho */
@media screen and (max-width: 380px) {
  #quiz-screen .quiz-shell {
    padding: 9px;
  }

  #quiz-screen .question-card {
    padding: 12px 10px;
  }

  #quiz-screen #question-text {
    font-size: 16px;
  }

  #quiz-screen .answer-option {
    font-size: 14px;
    min-height: 48px;
  }

  #quiz-screen .quiz-navigation .btn {
    font-size: 11px;
  }
}
.answer-option.selected {
  background: #ffd6e8 !important;
  border-color: #df6399 !important;
}

.answer-option.selected .answer-letter {
  background: #df6399 !important;
  color: #ffffff !important;
  border-color: #df6399 !important;
}

/* Bảng xem lại đáp án sau khi hoàn thành */
.review-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.review-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff9fc;
  border: 1.5px solid #f7cde0;
}

.review-item.is-correct {
  border-color: #6bc497;
  background: #f2fbf6;
}

.review-item.is-wrong {
  border-color: #ef8398;
  background: #fff4f6;
}

.review-question {
  font-weight: 700;
  color: #4a3540;
  margin-bottom: 6px;
}

.review-detail {
  font-size: 14px;
  line-height: 1.5;
  color: #6b525e;
}
/* =====================================================
   TOÁN CUTE - SỔ TAY TOÁN HỌC PASTEL HỒNG
===================================================== */

body {
  background-color: #fff6fa;
  background-image:
    linear-gradient(90deg, rgba(247, 194, 217, 0.24) 50%, transparent 50%),
    linear-gradient(rgba(247, 194, 217, 0.24) 50%, transparent 50%);
  background-size: 36px 36px;
}

#quiz-screen {
  background-color: #fff6fa;
  background-image:
    url("assets/bow-left.png"),
    url("assets/bow-right.png"),
    linear-gradient(90deg, rgba(247, 194, 217, 0.28) 50%, transparent 50%),
    linear-gradient(rgba(247, 194, 217, 0.28) 50%, transparent 50%);
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-size: 135px auto, 165px auto, 36px 36px, 36px 36px;
  background-position: left 10px top 20px, right 0 bottom 8px, 0 0, 0 0;
}

/* Khung thẻ sổ tay có chấm li nhẹ và lớp giấy xếp chồng */
#quiz-screen .quiz-shell {
  background: #fffafc;
  border: 2px solid #f4c4d8;
  border-radius: 30px;
  box-shadow:
    7px 7px 0px #f8e8d8,
    0 14px 30px rgba(214, 118, 159, 0.14);
}

#quiz-screen .quiz-top,
#quiz-screen .question-card,
#quiz-screen .question-side {
  background-color: #ffffff;
  background-image: radial-gradient(rgba(235, 168, 197, 0.28) 1.1px, transparent 1.1px);
  background-size: 16px 16px;
  border: 2px solid #f5c8dc;
  border-radius: 24px;
  box-shadow: 4px 4px 0px rgba(246, 224, 206, 0.75);
}

/* Nhãn câu hỏi kiểu băng dính / sticker sổ tay */
#quiz-screen #question-number {
  background: #ffe0ee;
  color: #b84274;
  border: 1.5px solid #f3b3cf;
  border-radius: 12px;
  padding: 6px 16px;
  min-height: auto;
  font-size: 15px;
  font-weight: 900;
}

#quiz-screen .question-tag {
  background: #fdf2e6;
  color: #7c495e;
  border: 1.5px dashed #e3c2a4;
  border-radius: 12px;
  padding: 6px 14px;
  min-height: auto;
  font-size: 12px;
  font-weight: 800;
}

/* Các đáp án: màu thường nhẹ nhàng, đang chọn đậm hơn 1 chút */
#quiz-screen .answer-option {
  min-height: 58px;
  padding: 12px 18px;
  background: #fff9fc;
  border: 1.5px solid #f3c6da;
  border-radius: 18px;
  color: #5c3749;
  font-size: 16px;
  font-weight: 700;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

#quiz-screen .answer-option:hover:not(.selected) {
  background: #ffeff6;
  border-color: #e68cb4;
  transform: translateY(-1px);
}

#quiz-screen .answer-option .answer-letter {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #ffe6f1;
  color: #c75386;
  font-size: 15px;
  font-weight: 900;
}

/* Đáp án đang được chọn: đậm hơn màu thường vừa đủ rõ, đổi câu khác tự trở lại bình thường */
#quiz-screen .answer-option.selected {
  background: #ffd3e7 !important;
  border-color: #d65b92 !important;
  color: #4d2336 !important;
  box-shadow: 0 4px 12px rgba(214, 91, 146, 0.18) !important;
}

#quiz-screen .answer-option.selected .answer-letter {
  background: #d65b92 !important;
  color: #ffffff !important;
}

#quiz-screen .answer-option.selected span:last-child {
  font-weight: 800;
  color: #4d2336;
}

/* Chấm số câu ở bảng bên phải khi đang thi */
#quiz-screen .question-dot {
  background: #fff8fb;
  border: 1.5px solid #f3c7da;
  color: #9e6780;
  border-radius: 10px;
  font-weight: 800;
}

#quiz-screen .question-dot.done {
  background: #ffe3f0;
  border-color: #dc6d9e;
  color: #b84274;
}

#quiz-screen .question-dot.current {
  background: #d65b92;
  border-color: #d65b92;
  color: #ffffff;
}

/* Danh sách xem lại kết quả sau khi hoàn thành (không icon) */
.review-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.review-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff9fc;
  border: 1.5px solid #f4c6d9;
}

.review-item.is-correct {
  border-color: #77c79d;
  background: #f2fbf6;
}

.review-item.is-wrong {
  border-color: #eb8c9e;
  background: #fff3f5;
}

.review-question {
  font-weight: 800;
  color: #59434f;
  margin-bottom: 6px;
}

.review-detail {
  font-size: 14px;
  line-height: 1.55;
  color: #6f5664;
}
/* Đáp án đúng */
.answer-option.correct-answer {
  background: #d8f5df !important;
  border: 2px solid #36b765 !important;
  color: #187a3d !important;
}

/* Đáp án sai */
.answer-option.wrong-answer {
  background: #ffe0e0 !important;
  border: 2px solid #ed6262 !important;
  color: #c62828 !important;
}

/* Không cho hiệu ứng hover ghi đè màu */
.answer-option.correct-answer:hover {
  background: #d8f5df !important;
}

.answer-option.wrong-answer:hover {
  background: #ffe0e0 !important;
}

/* ===== XEM LẠI BÀI LÀM ===== */

#answer-review-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.review-item {
  background: #fff8fb;
  border: 1px solid #f4c6d9;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 3px 10px rgba(220, 111, 156, 0.06);
}

.review-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.review-question {
  color: #573d4b;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.6;
  flex: 1;
}

.review-answer {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  margin-top: 7px;
  overflow-wrap: anywhere;
}

.chosen-answer {
  color: #d65b92;
}

.correct-answer {
  color: #168653;
}

.review-status {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}

.status-correct {
  background: #e4f8ec;
  color: #168653;
}

.status-wrong {
  background: #ffe8ee;
  color: #d94b70;
}

.status-unanswered {
  background: #fff1d9;
  color: #b77b22;
}

.review-divider {
  height: 1px;
  background: #f3d5e1;
  margin: 14px 0;
}

.review-toggle {
  border: none;
  background: transparent;
  color: #d65b92;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 5px 0;
  text-align: left;
}

.review-toggle:hover {
  color: #b83e78;
}

.review-explanation {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  background: #fff0f6;
  border: 1px solid #f4c6d9;
  color: #634657;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.review-explanation.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .review-item {
    padding: 14px;
    border-radius: 15px;
  }

  .review-question {
    font-size: 14px;
  }

  .review-answer,
  .review-toggle,
  .review-explanation {
    font-size: 13px;
  }
}
/* ===== 4 ẢNH MINH HỌA ===== */

.auth-screen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.auth-card {
  position: relative;
  z-index: 3;
}

.auth-illustration {
  position: absolute;
  bottom: 0;
  width: min(29vw, 430px);
  height: auto;
  z-index: 2;
  pointer-events: none;
}

.auth-left {
  left: 1%;
}

.auth-right {
  right: 1%;
}

.auth-center-image {
  transform: translateX(-10px);
  display: block;
  width: 150px;
  height: 125px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.auth-doodles {
  position: absolute;
  top: 15px;
  left: 2%;
  width: 35%;
  height: 300px;
  object-fit: contain;
  opacity: .65;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 850px) {
  .auth-illustration,
  .auth-doodles {
    display: none;
  }
}
.social-login {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.social-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #eee;
  background: white;
  cursor: pointer;
  font-size: 25px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s;
}

.social-btn:hover {
  transform: translateY(-4px);
}

.google-btn {
  color: #4285F4;
}

.facebook-btn {
  color: white;
  background: #1877F2;
}

.discord-btn {
  color: white;
  background: #5865F2;
}
.social-login {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 22px 0 5px;
}

.social-btn {
  width: 48px;
  height: 48px;
  border: 1px solid #f3d5e2;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.25s;
}

.social-btn img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.social-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 14px #f3c5d8;
}