* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #10244a;
  background:
    radial-gradient(circle at 20% 20%, #ffffff 0%, transparent 35%),
    linear-gradient(135deg, #eef6ff, #eaf3fb);
}

button,
input {
  font-family: inherit;
}

.app {
  width: calc(100% - 40px);
  min-height: calc(100vh - 40px);
  margin: 20px;
  display: flex;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 25px;
  overflow: clip;
  box-shadow: 0 10px 35px rgba(61, 100, 150, 0.12);
}

.main-content {
  flex: 1;
  padding: 45px 70px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.72),
    rgba(228, 241, 252, 0.8)
  );
}

.sidebar {
  width: 330px;
  background: rgba(255, 255, 255, 0.96);
  border-left: 1px solid #dbe6f3;
  padding: 40px 25px;
  display: flex;
  flex-direction: column;

  position: sticky;
  top: 20px;
  align-self: flex-start;
  height: calc(100vh - 40px);
}

/* =========================================================
   SIDEBAR MENU - DESKTOP
========================================================= */

.menu-item {
  position: relative;

  min-height: 68px;
  margin-bottom: 14px;
  padding: 14px 20px;

  display: flex;
  align-items: center;
  gap: 16px;

  background: rgba(247, 250, 254, 0.92);

  border: 1px solid transparent;
  border-radius: 18px;

  color: #173d70;

  font-size: 18px;
  font-weight: 700;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.menu-item:hover {
  background: #edf6ff;

  border-color: #d7eafb;

  transform: translateX(-3px);

  box-shadow: 0 7px 18px rgba(45, 91, 135, 0.08);
}

/* Mục đang chọn */
.menu-item.active {
  color: #1769d2;

  background: linear-gradient(135deg, #edf6ff, #deedff);

  border-color: #cfe5fb;

  box-shadow: 0 7px 18px rgba(45, 104, 170, 0.08);
}

/* Thanh đỏ nhỏ bên trái giống tiêu đề web */
.menu-item.active::before {
  content: "";

  position: absolute;

  left: 0;
  top: 16px;
  bottom: 16px;

  width: 4px;

  background: #f04b42;

  border-radius: 0 8px 8px 0;
}

.menu-icon {
  flex: 0 0 42px;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.82);

  border: 1px solid #e0ecf7;
  border-radius: 13px;

  font-size: 24px;

  box-shadow: 0 4px 10px rgba(54, 90, 126, 0.05);
}

.menu-item.active .menu-icon {
  background: #ffffff;
  border-color: #c9e2fa;
}

.quote {
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid #dbe6f3;
  text-align: center;
  color: #58719a;
  font-style: italic;
  line-height: 1.7;
}

.header {
  margin-bottom: 45px;
  text-align: center;
}

.temple {
  margin-bottom: 5px;
  font-size: 55px;
}

.website-name {
  margin-bottom: 10px;
  font-size: 40px;
  font-weight: 800;
}

.subtitle {
  color: #58719a;
  font-size: 17px;
  letter-spacing: 1px;
}

.page-title {
  margin-bottom: 10px;
  font-size: 34px;
  font-weight: 800;
}

.page-subtitle {
  margin-bottom: 30px;
  color: #6680a6;
  font-size: 17px;
  line-height: 1.6;
}

.back-button {
  display: inline-block;

  position: sticky;
  top: 20px;
  z-index: 20;

  margin-bottom: 25px;
  padding: 10px 18px;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(70, 110, 160, 0.1);
}

.back-button:hover {
  transform: translateX(-3px);
}

.main-button {
  width: 100%;
  margin-top: 18px;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: #3f7be5;
  color: white;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.main-button:hover {
  background: #306bd5;
}

.secondary-button {
  border: none;
  padding: 11px 18px;
  border-radius: 12px;
  background: #edf4ff;
  color: #2364df;
  font-weight: 700;
  cursor: pointer;
}

.danger-button {
  border: none;
  padding: 11px 18px;
  border-radius: 12px;
  background: #ffe8e8;
  color: #b23a3a;
  font-weight: 700;
  cursor: pointer;
}

.correct-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  background: #e6f7ef;
  color: #247554;
}

.wrong-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  background: #ffe8e8;
  color: #b23a3a;
}

.empty-box {
  max-width: 650px;
  margin: 20px auto;
  padding: 45px;
  background: white;
  border-radius: 24px;
  text-align: center;
  color: #6680a6;
  box-shadow: 0 8px 25px rgba(70, 110, 160, 0.1);
}

.empty-icon {
  margin-bottom: 18px;
  font-size: 55px;
}

.hsk-container,
.practice-container,
.grammar-container {
  max-width: 820px;
  margin: auto;
}

.hsk-card,
.practice-card,
.grammar-card {
  margin-bottom: 20px;
  padding: 22px 25px;
  display: flex;
  align-items: center;
  gap: 22px;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(70, 110, 160, 0.1);
  transition: 0.22s;
}

.hsk-card:hover,
.practice-card:hover,
.grammar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(70, 110, 160, 0.16);
}

.book-icon,
.practice-icon,
.grammar-card-icon {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
}

.blue {
  background: #dcecff;
}
.green {
  background: #ddf5eb;
}
.red {
  background: #ffe3e3;
}
.purple {
  background: #eee7ff;
}

.grammar-icon {
  background: #dcecff;
}
.vocabulary-icon {
  background: #ddf5eb;
}
.reflex-icon {
  background: #ffe3e3;
}

.hsk-info,
.practice-info,
.grammar-card-content {
  flex: 1;
}

.hsk-title,
.practice-title {
  margin-bottom: 7px;
  font-size: 27px;
  font-weight: 800;
}

.hsk-description {
  margin-bottom: 7px;
  color: #58719a;
  font-size: 18px;
  font-weight: 600;
}

.hsk-small,
.practice-description,
.grammar-card-description {
  color: #6680a6;
  font-size: 16px;
  line-height: 1.5;
}

.arrow,
.practice-arrow,
.grammar-arrow {
  color: #8ca0ba;
  font-size: 38px;
}

.practice-topbar {
  max-width: 700px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.practice-progress {
  color: #6680a6;
}

.direction-toggle {
  min-width: 220px;
  padding: 11px 16px;
  border: none;
  border-radius: 999px;
  background: white;
  color: #2458ae;
  box-shadow: 0 5px 18px rgba(70, 110, 160, 0.11);
  cursor: pointer;
  font-weight: 800;
}

.practice-question-card,
.grammar-practice-card {
  max-width: 700px;
  margin: auto;
  padding: 38px;
  background: white;
  border-radius: 25px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(70, 110, 160, 0.12);
}

.practice-label {
  margin-bottom: 12px;
  color: #6680a6;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
}

.practice-question-main {
  margin-bottom: 28px;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.45;
  font-family: Arial, "Helvetica Neue", sans-serif;
}

.practice-question-main.sentence {
  font-size: 32px;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  font-weight: 600 !important;
}

.practice-instruction {
  margin-bottom: 15px;
  color: #58719a;
}

.practice-answer-input,
.form-input {
  width: 100%;
  padding: 16px;
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  outline: none;
  font-size: 20px;
}

.practice-answer-input {
  text-align: center;
}

.answer-zh {
  margin-top: 10px;
  color: #10244a;
  font-size: 28px;
  font-weight: 800;
}

.answer-pinyin {
  margin-top: 6px;
  color: #3f7be5;
  font-size: 18px;
}

.answer-vi {
  margin-top: 7px;
  color: #6680a6;
  font-size: 17px;
}

.grammar-card-icon {
  background: #e8f1ff;
  font-size: 30px;
  font-weight: 800;
}

.grammar-card-title {
  font-size: 22px;
  font-weight: 800;
}

.grammar-card-pinyin {
  margin-top: 4px;
  color: #3f7be5;
}

.grammar-lesson {
  max-width: 800px;
  margin: auto;
}

.grammar-main-card {
  padding: 30px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 9px 28px rgba(70, 110, 160, 0.1);
}

.grammar-word {
  font-size: 38px;
  font-weight: 800;
}

.grammar-pinyin {
  margin-top: 5px;
  color: #3f7be5;
  font-size: 20px;
}

.grammar-meaning {
  margin-top: 5px;
  color: #6680a6;
  font-size: 18px;
}

.grammar-section-title {
  margin: 28px 0 12px;
  font-size: 19px;
  font-weight: 800;
}

.grammar-structure {
  padding: 18px;
  background: #edf4ff;
  border-radius: 15px;
  color: #235ebd;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.grammar-explain {
  margin-top: 15px;
  color: #566b89;
  line-height: 1.7;
}

.grammar-example {
  margin-top: 12px;
  padding: 18px;
  background: #f8faff;
  border-radius: 16px;
}

.grammar-example-zh {
  font-size: 24px;
  font-weight: 800;
}

.grammar-example-pinyin {
  margin-top: 5px;
  color: #3f7be5;
}

.grammar-example-vi {
  margin-top: 5px;
  color: #6680a6;
}

.grammar-confuse {
  margin-top: 25px;
  padding: 18px;
  background: #fff8e8;
  border-radius: 16px;
  color: #765917;
  line-height: 1.7;
}

.grammar-actions {
  margin-top: 25px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.grammar-action {
  flex: 1;
  min-width: 170px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.example-button {
  background: #edf4ff;
  color: #2364df;
}

.practice-grammar-button {
  background: #3f7be5;
  color: white;
}

.review-button {
  background: #e6f7ef;
  color: #247554;
}

.grammar-practice-type {
  margin-bottom: 10px;
  color: #3f7be5;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
}

.grammar-practice-question {
  margin-bottom: 25px;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.5;
}

.word-pieces {
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.word-piece {
  padding: 12px 17px;
  background: #edf4ff;
  border-radius: 12px;
  color: #2458ae;
  font-size: 20px;
  font-weight: 800;
}

.grammar-progress {
  max-width: 700px;
  margin: 0 auto 15px;
  color: #6680a6;
  display: flex;
  justify-content: space-between;
}

.flash-home-grid {
  max-width: 900px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.flash-home-card {
  min-height: 230px;
  padding: 30px 25px;
  background: white;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(70, 110, 160, 0.1);
}

.flash-home-icon {
  margin-bottom: 18px;
  font-size: 48px;
}

.flash-home-title {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 800;
}

.flash-home-description {
  color: #6680a6;
  line-height: 1.5;
}

.form-card {
  max-width: 650px;
  margin: auto;
  padding: 35px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(70, 110, 160, 0.11);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 9px;
  font-weight: 700;
}

.form-help {
  margin-top: 7px;
  color: #8a9ab2;
  font-size: 13px;
}

.folder-list,
.card-list {
  max-width: 850px;
  margin: auto;
}

.folder-top,
.folder-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.folder-top {
  margin-bottom: 22px;
}

.folder-card,
.card-list-item,
.folder-header-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(70, 110, 160, 0.09);
}

.folder-card {
  margin-bottom: 15px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.folder-open-area {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
}

.folder-icon {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: #edf4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 29px;
}

.folder-info {
  flex: 1;
}

.folder-name {
  margin-bottom: 5px;
  font-size: 20px;
  font-weight: 800;
}

.folder-count {
  color: #6680a6;
}

.folder-arrow {
  color: #8ca0ba;
  font-size: 32px;
}

.folder-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.edit-btn {
  background: #edf4ff;
}

.delete-btn {
  background: #ffe8e8;
}

.folder-header-card {
  max-width: 850px;
  margin: 0 auto 25px;
  padding: 25px;
}

.folder-header-name {
  font-size: 25px;
  font-weight: 800;
}

.folder-header-count {
  margin-top: 6px;
  color: #6680a6;
}

.folder-header-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card-list-item {
  margin-bottom: 13px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.card-number {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #edf4ff;
  color: #2364df;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.card-content {
  flex: 1;
}

.card-front {
  margin-bottom: 5px;
  font-weight: 800;
}

.card-back {
  margin-bottom: 4px;
  color: #2364df;
  font-size: 22px;
}

.card-pinyin {
  color: #6680a6;
}

.study-wrapper {
  max-width: 760px;
  margin: auto;
}

.study-progress {
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  color: #6680a6;
}

.flashcard-box {
  min-height: 360px;
  padding: 45px;
  background: white;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(70, 110, 160, 0.13);
}

.flash-main {
  font-size: 48px;
  font-weight: 800;
}

.flash-pinyin {
  margin-top: 15px;
  color: #3f7be5;
  font-size: 23px;
}

.flash-meaning {
  margin-top: 15px;
  color: #6680a6;
  font-size: 20px;
}

.flash-small,
.flash-hint {
  color: #8292aa;
}

.flash-small {
  margin-bottom: 20px;
}

.flash-hint {
  margin-top: 30px;
  font-size: 14px;
}

.study-buttons {
  margin-top: 22px;
  display: flex;
  gap: 15px;
}

.study-btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}

.previous-btn {
  background: #f1f4f9;
  color: #566b89;
}

.flip-btn {
  background: #e6f7ef;
  color: #247554;
}

.next-btn {
  background: #edf4ff;
  color: #2364df;
}

.login-wrapper {
  max-width: 520px;
  margin: 30px auto;
}

.login-card,
.user-box {
  padding: 35px;
  background: white;
  border-radius: 25px;
  box-shadow: 0 10px 35px rgba(70, 110, 160, 0.13);
}

.login-logo {
  text-align: center;
  font-size: 48px;
}

.login-title {
  margin: 10px 0;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
}

.login-description,
.switch-login {
  text-align: center;
  color: #6680a6;
}

.login-description {
  margin-bottom: 30px;
}

.switch-login {
  margin-top: 20px;
}

.switch-login span {
  color: #2364df;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 950px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-left: none;
  }

  .main-content {
    padding: 35px 25px;
  }

  .flash-home-grid {
    grid-template-columns: 1fr;
  }

  .practice-topbar,
  .folder-header-card {
    flex-direction: column;
    align-items: stretch;
  }

  .direction-toggle {
    width: 100%;
  }

  .practice-question-main,
  .practice-question-main.sentence {
    font-size: 30px;
  }
}
/* =========================================================
   NÚT NGHE TIẾNG TRUNG 🔊
========================================================= */

.tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  margin: 14px 0 16px;
  padding: 9px 18px;

  border: 1px solid #d7e6ff;
  border-radius: 999px;

  background: #f3f7ff;
  color: #2563c9;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 3px 10px rgba(37, 99, 201, 0.08);

  transition:
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

/* Khi đưa chuột vào */
.tts-btn:hover {
  background: #e7f0ff;

  box-shadow: 0 5px 14px rgba(37, 99, 201, 0.15);

  transform: translateY(-1px);
}

/* Khi bấm */
.tts-btn:active {
  transform: scale(0.96);

  background: #dceaff;
}

/* Icon loa */
.tts-btn::first-letter {
  font-size: 16px;
}
/* =========================================================
   TRANG CHỦ - GRID HSK
========================================================= */

.hsk-container {
  max-width: 1000px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.hsk-container .hsk-card {
  margin-bottom: 0;
}

/* Điện thoại */
@media (max-width: 700px) {
  .hsk-container {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 18px;
  }

  /* Ẩn Dịch / Flashcard thu nhỏ trên điện thoại */
  .tool-dock {
    display: none;
  }
}
/* =========================================================
   MOBILE MENU
========================================================= */

/* Desktop: ẩn nút menu mobile */
.mobile-menu-btn,
.mobile-close-btn,
.mobile-overlay {
  display: none;
}

/* Điện thoại */
@media (max-width: 700px) {
  /* Nút ☰ */
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1001;

    width: 46px;
    height: 46px;

    border: none;
    border-radius: 14px;

    background: white;
    color: #17305c;

    font-size: 25px;
    cursor: pointer;

    box-shadow: 0 5px 18px rgba(30, 70, 120, 0.15);
  }

  /* Sidebar mobile */
  .sidebar {
    display: block;

    position: fixed;
    top: 0;
    right: 0;

    width: min(82vw, 320px);
    height: 100vh;

    z-index: 1002;

    transform: translateX(100%);
    transition: transform 0.3s ease;

    overflow-y: auto;
  }

  /* Khi mở menu */
  .sidebar.mobile-open {
    transform: translateX(0);
  }

  /* Nút X */
  .mobile-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    margin: 4px 0 18px auto;

    border: none;
    border-radius: 12px;

    background: #f1f5fb;
    color: #17305c;

    font-size: 20px;
    cursor: pointer;
  }

  /* Lớp nền tối */
  .mobile-overlay {
    display: block;

    position: fixed;
    inset: 0;

    z-index: 1000;

    background: rgba(15, 30, 55, 0.25);

    opacity: 0;
    visibility: hidden;

    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
  }

  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}
/* =========================================================
   CỬA SỔ CÔNG CỤ NỔI
   Dùng cho Dịch / Flashcard / Cài đặt / Tài khoản
========================================================= */

.tool-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;

  background: rgba(15, 30, 55, 0.22);
  backdrop-filter: blur(3px);
}

.tool-overlay[hidden] {
  display: none;
}

.tool-window {
  width: min(80vw, 1050px);
  max-height: 88vh;

  display: flex;
  flex-direction: column;

  background: #f8fbff;
  border: 1px solid #dbe6f3;
  border-radius: 24px;

  overflow: hidden;

  box-shadow: 0 20px 60px rgba(35, 70, 120, 0.22);
}

.tool-window-header {
  min-height: 64px;
  padding: 14px 18px 14px 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: white;
  border-bottom: 1px solid #dbe6f3;
}

.tool-window-title {
  font-size: 20px;
  font-weight: 800;
  color: #17305c;
}

.tool-minimize-btn {
  width: 42px;
  height: 42px;

  border: none;
  border-radius: 12px;

  background: #edf4ff;
  color: #2364df;

  font-size: 26px;
  font-weight: 800;
  line-height: 1;

  cursor: pointer;
}

.tool-minimize-btn:hover {
  background: #dfeaff;
}

.tool-window-content {
  padding: 30px;
  overflow-y: auto;
}

/* =========================================================
   THANH CÔNG CỤ THU NHỎ
========================================================= */

.tool-dock {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 1900;

  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-dock-item {
  padding: 11px 18px;

  border: none;
  border-radius: 999px;

  background: white;
  color: #17305c;

  font-size: 15px;
  font-weight: 800;

  cursor: pointer;

  box-shadow: 0 7px 22px rgba(35, 70, 120, 0.18);
}

.tool-dock-item:hover {
  background: #edf4ff;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {
  .tool-overlay {
    padding: 10px;
    align-items: stretch;
  }

  .tool-window {
    width: 100%;
    max-height: none;
    height: calc(100vh - 20px);

    border-radius: 20px;
  }

  .tool-window-header {
    min-height: 58px;
    padding: 10px 12px 10px 18px;
  }

  .tool-window-content {
    padding: 18px;
  }

  .tool-dock {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .tool-dock-item {
    flex: 1;
    text-align: center;
  }
}
/* Ẩn thanh Dịch / Flashcard thu nhỏ trên điện thoại */
@media (max-width: 700px) {
  .tool-dock {
    display: none !important;
  }
}
/* =========================================================
   VẸT TIẾNG TRUNG - TRANG CHỦ
========================================================= */

.home-vet {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* ================= HERO ================= */

.home-hero {
  position: relative;
  min-height: 280px;
  padding: 42px 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(255, 255, 255, 0.9),
      transparent 30%
    ),
    linear-gradient(135deg, #eaf6ff 0%, #d8edff 55%, #f5fbff 100%);

  border: 1px solid #d7e9f8;
  border-radius: 26px;
  overflow: hidden;

  box-shadow: 0 12px 35px rgba(39, 93, 145, 0.1);
}

.home-hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.home-brand-small {
  color: #df493d;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
}

.home-hero-title {
  margin: 0;
  color: #0c4386;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -2px;
  font-weight: 900;
}

.home-hero-title::first-letter {
  color: #e5483d;
}

.home-hero-tagline {
  margin-top: 15px;
  color: #173f73;
  font-size: 24px;
  font-weight: 800;
}

.home-hero-description {
  margin-top: 10px;
  color: #587596;
  font-size: 16px;
}

.home-hero-features {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-hero-features span {
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(164, 202, 234, 0.65);
  border-radius: 999px;

  color: #174f8f;
  font-size: 14px;
  font-weight: 700;
}

/* Mascot tạm thời */

.home-hero-mascot {
  position: relative;
  min-width: 230px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-parrot-placeholder {
  font-size: 110px;
  line-height: 1;
  filter: drop-shadow(0 12px 10px rgba(40, 80, 120, 0.15));
}

.home-parrot-message {
  position: absolute;
  top: -20px;
  left: -35px;

  padding: 12px 16px;

  background: white;
  border: 2px solid #65a8e8;
  border-radius: 18px;

  color: #174b86;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;

  transform: rotate(-3deg);

  box-shadow: 0 7px 18px rgba(44, 93, 140, 0.1);
}

/* ================= SECTION ================= */

.home-section {
  margin-top: 32px;
}

.home-section-header {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-section-header h2 {
  position: relative;
  margin: 0;
  padding-left: 18px;

  color: #123f78;
  font-size: 27px;
  font-weight: 800;
  font-family: "Trebuchet MS", Arial, sans-serif;
}

.home-section-header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;

  width: 6px;
  border-radius: 10px;
  background: #e84c42;
}

.home-section-header span {
  color: #7189a7;
  font-size: 14px;
  font-weight: 700;
}

/* ================= HSK ================= */

.home-hsk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-hsk-card {
  position: relative;
  min-height: 185px;
  padding: 25px 22px 22px;

  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dceaf6;
  border-radius: 20px;

  cursor: pointer;
  overflow: hidden;

  box-shadow: 0 8px 24px rgba(47, 91, 134, 0.08);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.home-hsk-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(47, 91, 134, 0.14);
}

.home-hsk-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;

  width: 4px;
  border-radius: 0 10px 10px 0;
}

.home-hsk-blue::before {
  background: #399be9;
}

.home-hsk-green::before {
  background: #36b988;
}

.home-hsk-orange::before {
  background: #efa83c;
}

.home-hsk-red::before {
  background: #eb625d;
}

.home-hsk-level {
  color: #103f7a;
  font-size: 29px;
  font-weight: 900;
}

.home-hsk-name {
  margin-top: 5px;
  color: #345a86;
  font-size: 16px;
  font-weight: 800;
}

.home-hsk-info {
  margin-top: 24px;
  padding-top: 15px;

  border-top: 1px solid #e7eff6;

  color: #71849c;
  font-size: 14px;
  line-height: 1.6;
}

.home-hsk-arrow {
  position: absolute;
  right: 18px;
  bottom: 17px;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #e2f1ff;
  border-radius: 50%;

  color: #1461b5;
  font-size: 22px;
  font-weight: 900;
}

/* ================= CÁC MỤC KHÁC ================= */

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-feature-card {
  position: relative;
  min-height: 180px;

  display: flex;
  align-items: center;
  gap: 22px;

  padding: 28px 65px 28px 28px;

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98),
    rgba(235, 246, 255, 0.92)
  );

  border: 1px solid #dceaf6;
  border-radius: 22px;

  cursor: pointer;

  box-shadow: 0 8px 24px rgba(47, 91, 134, 0.08);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.home-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(47, 91, 134, 0.14);
}

.home-feature-icon {
  flex: 0 0 82px;
  width: 82px;
  height: 82px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #e0f1ff;
  border-radius: 22px;

  font-size: 40px;
}

.home-feature-content {
  min-width: 0;
}

.home-feature-title {
  color: #104483;
  font-size: 23px;
  font-weight: 900;
}

.home-feature-description {
  margin-top: 7px;

  color: #486887;
  font-size: 15px;
  line-height: 1.5;
}

.home-feature-tags {
  margin-top: 13px;

  color: #7187a0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.home-feature-arrow {
  position: absolute;
  right: 20px;

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #dceeff;
  border-radius: 50%;

  color: #1461b5;
  font-size: 22px;
  font-weight: 900;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1100px) {
  .home-hsk-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .home-hero {
    min-height: auto;
    padding: 28px 22px;
  }

  .home-hero-title {
    font-size: 42px;
  }

  .home-hero-tagline {
    font-size: 20px;
  }

  .home-hero-mascot {
    display: none;
  }

  .home-hsk-grid {
    grid-template-columns: 1fr;
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }

  .home-feature-card {
    min-height: auto;
    padding: 22px 55px 22px 20px;
  }

  .home-feature-icon {
    flex-basis: 60px;
    width: 60px;
    height: 60px;
    font-size: 30px;
  }

  .home-section-header h2 {
    font-size: 23px;
  }
}
/* =========================================================
   VẸT TIẾNG TRUNG - HOME FINAL
========================================================= */

.home-vet {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 25px;
}

/* nền tổng */
.home-vet::before {
  content: "";
  position: absolute;
  inset: -45px -70px -30px;
  z-index: -1;
  pointer-events: none;

  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(182, 224, 255, 0.42),
      transparent 25%
    ),
    radial-gradient(
      circle at 78% 30%,
      rgba(206, 235, 255, 0.5),
      transparent 27%
    ),
    linear-gradient(to bottom, #f8fcff 0%, #eef8ff 55%, #f8fcff 100%);
}

/* =========================================================
   HERO
========================================================= */

.home-hero {
  position: relative;
  min-height: 300px;
  padding: 38px 42px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  overflow: hidden;

  border: 1px solid #cfe5f5;
  border-radius: 24px;

  background:
    radial-gradient(
      ellipse at 65% 100%,
      rgba(120, 190, 230, 0.2) 0%,
      transparent 42%
    ),
    radial-gradient(
      ellipse at 90% 30%,
      rgba(255, 255, 255, 0.85),
      transparent 35%
    ),
    linear-gradient(135deg, #e5f5ff 0%, #cfeaff 48%, #edf8ff 100%);

  box-shadow: 0 12px 32px rgba(35, 89, 135, 0.1);
}

/* núi mờ phía dưới */
.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.home-hero::before {
  left: 32%;
  right: -5%;
  bottom: -55px;
  height: 190px;

  opacity: 0.32;

  background: linear-gradient(
    145deg,
    transparent 0 13%,
    #75b5d9 14% 20%,
    transparent 21% 28%,
    #9bc9e2 29% 38%,
    transparent 39% 46%,
    #65a9d0 47% 56%,
    transparent 57%
  );

  filter: blur(2px);
}

.home-hero::after {
  width: 190px;
  height: 190px;
  right: 60px;
  bottom: -75px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.4);

  filter: blur(32px);
}

.home-hero-content {
  position: relative;
  z-index: 2;

  width: 58%;
}

.home-brand-small {
  margin-bottom: 9px;

  color: #dc453b;

  font-size: 16px;
  font-weight: 900;
}

.home-hero-title {
  margin: 0;

  color: #103f80;

  font-size: clamp(44px, 5vw, 66px);
  font-weight: 900;
  line-height: 1.02;

  letter-spacing: -2px;
}

.home-hero-title span {
  color: #e44338;
}

.home-hero-tagline {
  margin-top: 15px;

  color: #123c70;

  font-size: 25px;
  font-weight: 900;
}

.home-hero-features {
  margin-top: 34px;

  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.home-hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;

  color: #24527f;

  font-size: 14px;
  font-weight: 700;
}

.home-hero-feature b {
  color: #1268bb;
  font-size: 22px;
}

/* mascot */
.home-hero-mascot {
  position: relative;
  z-index: 2;

  flex: 1;
  min-height: 220px;

  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.home-parrot-placeholder {
  font-size: 135px;
  line-height: 1;

  transform: translateY(15px);

  filter: drop-shadow(0 12px 8px rgba(40, 80, 120, 0.14));
}

.home-parrot-message {
  position: absolute;

  top: 3px;
  left: 0;

  padding: 11px 15px;

  background: rgba(255, 255, 255, 0.92);

  border: 2px solid #4f9ee6;
  border-radius: 18px;

  color: #124b86;

  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;

  transform: rotate(-4deg);

  box-shadow: 0 6px 18px rgba(40, 90, 135, 0.1);
}

.home-parrot-message strong {
  display: block;
  font-size: 20px;
}

.home-parrot-message span {
  display: block;
  margin-top: 3px;
}

.home-hero-motivation {
  position: absolute;

  right: 0;
  top: 25px;

  color: #174780;

  font-size: 22px;
  font-weight: 900;

  text-align: center;

  transform: rotate(4deg);
}

.home-hero-motivation span {
  display: block;
  margin-top: 3px;

  font-size: 12px;
  font-weight: 700;
}

/* =========================================================
   SECTION
========================================================= */

.home-section {
  margin-top: 30px;
}

.home-section-header {
  margin-bottom: 14px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.home-section-header h2 {
  position: relative;

  margin: 0;
  padding-left: 19px;

  color: #123f78;

  font-size: 27px;
  font-weight: 900;
}

.home-section-header h2::before {
  content: "";

  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;

  width: 6px;

  border-radius: 999px;

  background: #ea4b40;
}

.home-section-note {
  color: #6680a0;

  font-size: 13px;
  font-weight: 700;
}

/* =========================================================
   HSK
========================================================= */

.home-hsk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-hsk-card {
  position: relative;

  min-width: 0;
  min-height: 205px;

  padding: 20px 42px 18px 17px;

  display: flex;
  gap: 15px;

  overflow: hidden;

  background: rgba(255, 255, 255, 0.94);

  border: 1px solid #d6e7f4;
  border-radius: 17px;

  cursor: pointer;

  box-shadow: 0 7px 22px rgba(43, 91, 134, 0.08);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.home-hsk-card:hover {
  transform: translateY(-4px);

  box-shadow: 0 13px 28px rgba(43, 91, 134, 0.15);
}

.home-hsk-card::before {
  content: "";

  position: absolute;

  left: 0;
  top: 18px;
  bottom: 18px;

  width: 3px;

  border-radius: 5px;
}

.home-hsk-blue::before {
  background: #339de7;
}

.home-hsk-green::before {
  background: #3ab88b;
}

.home-hsk-orange::before {
  background: #f1a93d;
}

.home-hsk-red::before {
  background: #ea5c58;
}

/* sách HSK */

.home-hsk-book {
  width: 72px;
  height: 115px;

  flex-shrink: 0;

  padding-top: 18px;

  display: flex;
  flex-direction: column;
  align-items: center;

  border-radius: 5px 12px 12px 5px;

  color: #0e5c9f;

  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.75), transparent 35%), #bfe4fb;

  box-shadow:
    inset -5px 0 0 rgba(0, 0, 0, 0.04),
    0 7px 15px rgba(35, 85, 130, 0.12);
}

.home-hsk-green .home-hsk-book {
  color: #187654;
  background: #c8efd9;
}

.home-hsk-orange .home-hsk-book {
  color: #a96010;
  background: #ffe0a7;
}

.home-hsk-red .home-hsk-book {
  color: #a93d3b;
  background: #ffc9c7;
}

.home-hsk-book small {
  font-size: 16px;
  font-weight: 900;
}

.home-hsk-book strong {
  margin-top: 6px;

  font-size: 34px;
}

.home-hsk-body {
  min-width: 0;
  flex: 1;
}

.home-hsk-level {
  color: #113f78;

  font-size: 24px;
  font-weight: 900;

  white-space: nowrap;
}

.home-hsk-name {
  margin-top: 2px;

  color: #234e7d;

  font-size: 14px;
  font-weight: 800;
}

.home-hsk-card ul {
  margin: 15px 0 0;
  padding: 0;

  list-style: none;
}

.home-hsk-card li {
  position: relative;

  margin-top: 5px;
  padding-left: 14px;

  color: #466583;

  font-size: 12px;
  line-height: 1.25;
}

.home-hsk-card li::before {
  content: "•";

  position: absolute;
  left: 0;

  color: #1265b5;

  font-weight: 900;
}

.home-hsk-count {
  position: absolute;

  left: 18px;
  bottom: 14px;

  color: #24537f;

  font-size: 12px;
  font-weight: 800;
}

.home-hsk-arrow {
  position: absolute;

  right: 11px;
  bottom: 11px;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #deefff;

  color: #1263b4;

  font-size: 19px;
  font-weight: 900;
}

/* =========================================================
   FEATURE CARD
========================================================= */

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-feature-card {
  position: relative;

  min-height: 235px;

  display: grid;
  grid-template-columns: 42% 1fr;

  overflow: hidden;

  background: rgba(255, 255, 255, 0.95);

  border: 1px solid #d7e8f5;
  border-radius: 18px;

  cursor: pointer;

  box-shadow: 0 8px 23px rgba(43, 91, 134, 0.08);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.home-feature-card:hover {
  transform: translateY(-4px);

  box-shadow: 0 13px 29px rgba(43, 91, 134, 0.15);
}

.home-feature-visual {
  position: relative;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  overflow: hidden;

  background: linear-gradient(
    to bottom,
    rgba(225, 244, 255, 0.8),
    rgba(176, 219, 245, 0.8)
  );
}

.home-feature-visual.factory {
  background: linear-gradient(to bottom, #e7f0f5, #bfd7e5);
}

.home-mini-parrot {
  margin-bottom: 17px;

  font-size: 105px;
  line-height: 1;

  filter: drop-shadow(0 10px 8px rgba(40, 80, 120, 0.14));
}

.home-feature-bubble {
  position: absolute;

  top: 16px;
  right: 8px;

  padding: 8px 11px;

  border: 1.5px solid #4794db;
  border-radius: 15px;

  background: rgba(255, 255, 255, 0.92);

  color: #15518e;

  font-size: 13px;
  font-weight: 800;

  text-align: center;
}

.home-feature-bubble small {
  font-weight: 700;
}

.home-feature-content {
  min-width: 0;

  padding: 22px 45px 20px 20px;
}

.home-feature-title {
  color: #104584;

  font-size: 21px;
  font-weight: 900;
}

.home-feature-description {
  margin-top: 5px;

  color: #486886;

  font-size: 13px;
  line-height: 1.45;
}

.home-feature-list {
  margin: 12px 0 0;
  padding: 0;

  list-style: none;
}

.home-feature-list li {
  position: relative;

  margin-top: 5px;
  padding-left: 16px;

  color: #456786;

  font-size: 12px;
}

.home-feature-list li::before {
  content: "✓";

  position: absolute;
  left: 0;

  color: #1268b8;

  font-weight: 900;
}

.home-feature-arrow {
  position: absolute;

  right: 13px;
  bottom: 13px;

  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #dceeff;

  color: #1263b4;

  font-size: 20px;
  font-weight: 900;
}

/* =========================================================
   FOOTER
========================================================= */

.home-footer-message {
  margin-top: 20px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 35px;

  color: #2871b4;

  font-size: 16px;
  font-style: italic;
  font-weight: 700;
}

.home-footer-message span {
  color: #173f73;

  font-size: 24px;
  font-style: normal;

  letter-spacing: 4px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1150px) {
  .home-hsk-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .home-vet::before {
    inset: -35px -25px;
  }

  .home-hero {
    min-height: auto;

    padding: 27px 22px;
  }

  .home-hero-content {
    width: 100%;
  }

  .home-hero-title {
    font-size: 43px;
  }

  .home-hero-tagline {
    font-size: 21px;
  }

  .home-hero-features {
    margin-top: 25px;
  }

  .home-hero-mascot {
    display: none;
  }

  .home-hsk-grid {
    grid-template-columns: 1fr;
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }

  .home-feature-card {
    grid-template-columns: 120px 1fr;
    min-height: 190px;
  }

  .home-mini-parrot {
    font-size: 72px;
  }

  .home-feature-bubble {
    display: none;
  }

  .home-feature-content {
    padding: 20px 45px 18px 15px;
  }

  .home-section-header {
    align-items: flex-end;
  }

  .home-section-note {
    max-width: 140px;

    text-align: right;
  }

  .home-footer-message {
    flex-direction: column;
    gap: 7px;

    text-align: center;
  }
}
/* =========================================================
   FIX HSK HOME - GỌN VÀ THOÁNG HƠN
========================================================= */

.home-hsk-card {
  min-height: 190px;
  padding: 18px 38px 16px 15px;
  gap: 12px;
}

.home-hsk-book {
  width: 66px;
  height: 108px;
}

.home-hsk-book small {
  font-size: 14px;
}

.home-hsk-book strong {
  font-size: 31px;
}

.home-hsk-level {
  font-size: 22px;
}

.home-hsk-name {
  font-size: 13px;
  line-height: 1.3;
}

.home-hsk-card ul {
  margin-top: 11px;
}

.home-hsk-card li {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.2;
}

.home-hsk-count {
  font-size: 11px;
  bottom: 11px;
}

.home-hsk-arrow {
  width: 31px;
  height: 31px;
  right: 9px;
  bottom: 9px;
  font-size: 17px;
}
/* =========================================================
   FIX HOME FEATURE CARDS
========================================================= */

.home-feature-card {
  min-height: 210px;
  grid-template-columns: 46% 1fr;
}

.home-feature-visual {
  min-height: 210px;
}

.home-mini-parrot {
  font-size: 125px;
  margin-bottom: 8px;
  transform: translateX(-4px);
}

.home-feature-content {
  padding: 26px 46px 22px 22px;
}

.home-feature-title {
  font-size: 20px;
  line-height: 1.2;
}

.home-feature-description {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.home-feature-list {
  margin-top: 10px;
}

.home-feature-list li {
  margin-top: 4px;
  font-size: 12px;
}

.home-feature-bubble {
  top: 18px;
  right: 10px;
  font-size: 12px;
}

.home-feature-arrow {
  right: 14px;
  bottom: 14px;
}
/* Thu nhỏ mascot chính trong Hero */
.home-parrot-placeholder {
  width: 280px;
  height: 260px;
  transform: translateY(35px);
}

.home-parrot-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* =========================================================
   VẸT TIẾNG TRUNG - MOBILE HOME
========================================================= */

@media (max-width: 700px) {
  .home-vet {
    width: 100%;
    padding-bottom: 15px;
  }

  /* HERO */
  .home-hero {
    min-height: auto;
    padding: 24px 18px 20px;

    display: grid;
    grid-template-columns: 1fr 125px;
    gap: 10px;

    border-radius: 20px;
  }

  .home-hero-content {
    width: 100%;
  }

  .home-brand-small {
    font-size: 13px;
  }

  .home-hero-title {
    font-size: 34px;
    line-height: 1.02;
    letter-spacing: -1px;
  }

  .home-hero-tagline {
    margin-top: 10px;
    font-size: 18px;
  }

  .home-hero-features {
    margin-top: 22px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .home-hero-feature {
    gap: 5px;

    padding: 7px 8px;

    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(160, 200, 230, 0.65);
    border-radius: 12px;

    font-size: 11px;
    line-height: 1.2;
  }

  .home-hero-feature b {
    font-size: 16px;
  }

  /* VẸT MOBILE */
  .home-hero-mascot {
    display: flex;
    min-width: 0;
    min-height: 180px;

    align-items: flex-end;
    justify-content: center;
  }

  .home-parrot-placeholder {
    width: 135px;
    height: 165px;

    transform: translateY(18px);
  }

  .home-parrot-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .home-parrot-message {
    top: 8px;
    left: -18px;

    padding: 7px 9px;

    font-size: 10px;
    line-height: 1.25;

    border-radius: 12px;
  }

  .home-parrot-message strong {
    font-size: 14px;
  }

  .home-hero-motivation {
    display: none;
  }

  /* SECTION */
  .home-section {
    margin-top: 24px;
  }

  .home-section-header {
    align-items: flex-end;
    gap: 8px;
  }

  .home-section-header h2 {
    padding-left: 14px;
    font-size: 22px;
  }

  .home-section-header h2::before {
    width: 5px;
  }

  .home-section-note {
    max-width: 120px;

    font-size: 10px;
    line-height: 1.25;

    text-align: right;
  }

  /* HSK */
  .home-hsk-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .home-hsk-card {
    min-height: 145px;

    padding: 15px 42px 15px 14px;

    gap: 14px;
  }

  .home-hsk-book {
    width: 62px;
    height: 96px;

    padding-top: 14px;
  }

  .home-hsk-book small {
    font-size: 13px;
  }

  .home-hsk-book strong {
    font-size: 28px;
  }

  .home-hsk-level {
    font-size: 21px;
  }

  .home-hsk-name {
    font-size: 13px;
  }

  .home-hsk-card ul {
    margin-top: 8px;
  }

  .home-hsk-card li {
    margin-top: 3px;
    font-size: 11px;
  }

  .home-hsk-count {
    left: 15px;
    bottom: 8px;
    font-size: 10px;
  }

  /* 2 MỤC HỌC KHÁC */
  .home-feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-feature-card {
    min-height: 180px;

    grid-template-columns: 115px 1fr;

    border-radius: 16px;
  }

  .home-feature-visual {
    min-height: 180px;
  }

  .home-mini-parrot {
    font-size: 72px;
    margin-bottom: 12px;
  }

  .home-feature-bubble {
    display: none;
  }

  .home-feature-content {
    padding: 17px 38px 16px 13px;
  }

  .home-feature-title {
    font-size: 18px;
  }

  .home-feature-description {
    font-size: 11px;
  }

  .home-feature-list {
    margin-top: 7px;
  }

  .home-feature-list li {
    margin-top: 3px;
    font-size: 10px;
  }

  /* FOOTER */
  .home-footer-message {
    margin-top: 15px;

    flex-direction: column;
    gap: 5px;

    font-size: 12px;

    text-align: center;
  }

  .home-footer-message span {
    font-size: 19px;
  }
}
/* =========================================================
   MOBILE HOME - GỌN HƠN
========================================================= */

@media (max-width: 700px) {
  .home-hero {
    display: block;
    min-height: 330px;
    padding: 24px 20px;
    position: relative;
  }

  .home-hero-content {
    width: 100%;
    position: relative;
    z-index: 2;
  }

  .home-brand-small {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .home-hero-title {
    max-width: 210px;
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -1px;
  }

  .home-hero-tagline {
    max-width: 190px;
    margin-top: 8px;
    font-size: 17px;
    line-height: 1.25;
  }

  /* chỉ giữ 2 tính năng đầu */
  .home-hero-features {
    width: 185px;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .home-hero-feature {
    padding: 0;
    background: transparent;
    border: 0;
    font-size: 11px;
  }

  .home-hero-feature:nth-child(3),
  .home-hero-feature:nth-child(4) {
    display: none;
  }

  /* mascot sang bên phải */
  .home-hero-mascot {
    display: block;
    position: absolute;
    right: 10px;
    bottom: 15px;
    width: 150px;
    min-height: 0;
  }

  .home-parrot-placeholder {
    width: 145px;
    height: 165px;
    transform: none;
  }

  .home-parrot-message {
    top: -35px;
    left: -10px;
    font-size: 9px;
    padding: 6px 8px;
  }

  .home-parrot-message strong {
    font-size: 13px;
  }

  .home-hero-motivation {
    display: none;
  }

  /* HSK */
  .home-section {
    margin-top: 22px;
  }

  .home-section-header h2 {
    font-size: 21px;
    line-height: 1.1;
  }

  .home-section-note {
    font-size: 9px;
    max-width: 110px;
  }
}
/* =========================================================
   MOBILE HERO - BẢN CHỐT
========================================================= */

@media (max-width: 700px) {
  .home-hero {
    position: relative;
    display: block;

    min-height: 375px;
    padding: 26px 20px 22px;

    overflow: hidden;
  }

  .home-hero-content {
    width: 100%;
    position: relative;
    z-index: 2;
  }

  .home-brand-small {
    margin-bottom: 10px;

    font-size: 13px;
    font-weight: 900;
  }

  .home-hero-title {
    max-width: 235px;

    font-size: 39px;
    line-height: 1.03;
    letter-spacing: -1px;
  }

  .home-hero-tagline {
    max-width: 220px;

    margin-top: 10px;

    font-size: 18px;
    line-height: 1.2;
  }

  /* chỉ giữ 2 nút chính */
  .home-hero-features {
    position: absolute;

    left: 20px;
    right: 20px;
    bottom: 20px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    margin: 0;
    width: auto;
  }

  .home-hero-feature {
    min-height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 9px 10px;

    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #d5e7f4;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;
    text-align: center;
  }

  .home-hero-feature:nth-child(3),
  .home-hero-feature:nth-child(4) {
    display: none;
  }

  /* mascot ở góc phải cạnh tiêu đề */
  .home-hero-mascot {
    position: absolute;

    right: 8px;
    top: 58px;
    bottom: auto;

    width: 155px;
    height: 210px;
    min-height: 0;

    display: block;

    z-index: 1;
  }

  .home-parrot-placeholder {
    width: 155px;
    height: 185px;

    transform: none;
  }

  .home-parrot-image {
    width: 100%;
    height: 100%;

    object-fit: contain;
  }

  .home-parrot-message {
    top: -6px;
    left: -28px;

    width: 92px;

    padding: 7px 8px;

    font-size: 9px;
    line-height: 1.25;

    border-radius: 12px;
  }

  .home-parrot-message strong {
    font-size: 14px;
  }

  .home-hero-motivation {
    display: none;
  }
}
/* =========================================================
   MOBILE HERO - FIX KHÔNG BAY LUNG TUNG
========================================================= */
@media (max-width: 700px) {
  .home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 125px;
    grid-template-areas:
      "content mascot"
      "features features";

    gap: 12px;
    min-height: auto;

    padding: 24px 18px 20px;

    position: relative;
  }

  /* ===== PHẦN CHỮ ===== */
  .home-hero-content {
    grid-area: content;

    width: auto;
    min-width: 0;

    position: static;
  }

  .home-brand-small {
    margin-bottom: 7px;
    font-size: 12px;
  }

  .home-hero-title {
    max-width: none;

    margin: 0;

    font-size: 34px;
    line-height: 1.02;
    letter-spacing: -1px;
  }

  .home-hero-tagline {
    max-width: none;

    margin-top: 9px;

    font-size: 17px;
    line-height: 1.2;
  }

  /* ===== CON VẸT ===== */
  .home-hero-mascot {
    grid-area: mascot;

    position: relative;
    top: auto;
    right: auto;
    bottom: auto;

    width: 125px;
    height: 175px;
    min-height: 0;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    z-index: 2;
  }

  .home-parrot-placeholder {
    width: 125px;
    height: 145px;

    transform: none;
  }

  .home-parrot-image {
    width: 100%;
    height: 100%;

    object-fit: contain;
  }

  .home-parrot-message {
    position: absolute;

    top: 2px;
    left: -12px;

    width: 82px;

    padding: 6px 7px;

    font-size: 8px;
    line-height: 1.2;

    border-radius: 11px;
  }

  .home-parrot-message strong {
    font-size: 13px;
  }

  .home-hero-motivation {
    display: none;
  }

  /* ===== 2 NÚT PHÍA DƯỚI ===== */
  .home-hero-features {
    grid-area: features;

    position: static;

    width: 100%;
    margin: 3px 0 0;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .home-hero-feature {
    min-height: 42px;

    padding: 8px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d5e7f4;
    border-radius: 999px;

    font-size: 11px;
    line-height: 1.15;
    text-align: center;
  }

  .home-hero-feature b {
    font-size: 15px;
  }

  .home-hero-feature:nth-child(3),
  .home-hero-feature:nth-child(4) {
    display: none;
  }
}
/* =========================================================
   MOBILE HSK CARDS - BẢN GỌN GẦN MẪU
========================================================= */
@media (max-width: 700px) {
  .home-hsk-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-hsk-card {
    min-height: 132px;

    padding: 14px 46px 14px 14px;

    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 14px;

    border-radius: 16px;
  }

  .home-hsk-book {
    width: 72px;
    height: 98px;

    padding-top: 13px;

    align-self: center;
  }

  .home-hsk-book small {
    font-size: 13px;
  }

  .home-hsk-book strong {
    margin-top: 4px;
    font-size: 30px;
  }

  .home-hsk-body {
    align-self: center;
  }

  .home-hsk-level {
    font-size: 22px;
    line-height: 1;
  }

  .home-hsk-name {
    margin-top: 5px;

    font-size: 13px;
    line-height: 1.2;
  }

  .home-hsk-card ul {
    margin-top: 9px;
  }

  .home-hsk-card li {
    margin-top: 3px;
    padding-left: 12px;

    font-size: 10.5px;
    line-height: 1.2;
  }

  .home-hsk-count {
    left: 15px;
    bottom: 7px;

    font-size: 10px;
  }

  .home-hsk-arrow {
    right: 10px;
    bottom: 10px;

    width: 32px;
    height: 32px;

    font-size: 17px;
  }
}
/* =========================================================
   MOBILE - 2 CARD GIAO TIẾP / CÔNG XƯỞNG
========================================================= */
@media (max-width: 700px) {
  .home-feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-feature-card {
    min-height: 175px;

    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);

    border-radius: 16px;
  }

  .home-feature-visual {
    min-height: 175px;
    width: 105px;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .home-mini-parrot {
    font-size: 64px;
    margin: 0;
    transform: none;
  }

  .home-feature-content {
    min-width: 0;

    padding: 18px 42px 16px 14px;
  }

  .home-feature-title {
    font-size: 18px;
    line-height: 1.15;

    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
  }

  .home-feature-description {
    margin-top: 5px;

    font-size: 11px;
    line-height: 1.35;

    word-break: normal;
    overflow-wrap: normal;
  }

  .home-feature-list {
    margin-top: 8px;
  }

  .home-feature-list li {
    margin-top: 3px;

    font-size: 10px;
    line-height: 1.2;

    word-break: normal;
    overflow-wrap: normal;
  }

  .home-feature-bubble {
    display: none;
  }

  .home-feature-arrow {
    right: 10px;
    bottom: 10px;

    width: 31px;
    height: 31px;

    font-size: 17px;
  }
}
/* =========================================================
   MOBILE FEATURE CARDS - VUÔNG GỌN
========================================================= */
@media (max-width: 700px) {
  .home-feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-feature-card {
    min-height: 205px;
    height: 205px;

    display: grid;
    grid-template-columns: 42% 58%;

    border-radius: 18px;
    overflow: hidden;
  }

  .home-feature-visual {
    width: 100%;
    min-height: 205px;
    height: 205px;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .home-mini-parrot {
    font-size: 78px;
    margin: 0;
    transform: none;
  }

  .home-feature-content {
    min-width: 0;

    padding: 18px 40px 16px 16px;

    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .home-feature-title {
    font-size: 18px;
    line-height: 1.15;

    word-break: normal;
    overflow-wrap: normal;
  }

  .home-feature-description {
    margin-top: 6px;

    font-size: 11px;
    line-height: 1.35;

    word-break: normal;
    overflow-wrap: normal;
  }

  .home-feature-list {
    margin-top: 8px;
  }

  .home-feature-list li {
    margin-top: 3px;

    font-size: 10px;
    line-height: 1.2;

    word-break: normal;
    overflow-wrap: normal;
  }

  .home-feature-arrow {
    right: 10px;
    bottom: 10px;

    width: 32px;
    height: 32px;

    font-size: 17px;
  }
}
/* =========================================================
   MOBILE FEATURE CARDS - ƯU TIÊN KHÔNG GIAN CHỮ
========================================================= */
@media (max-width: 700px) {
  .home-feature-card {
    height: auto;
    min-height: 210px;

    grid-template-columns: 32% 68%;
  }

  .home-feature-visual {
    height: 100%;
    min-height: 210px;
  }

  .home-mini-parrot {
    font-size: 62px;
  }

  .home-feature-content {
    padding: 16px 38px 14px 12px;
    justify-content: center;
  }

  .home-feature-title {
    font-size: 17px;
    line-height: 1.12;
  }

  .home-feature-description {
    margin-top: 5px;

    font-size: 10.5px;
    line-height: 1.3;
  }

  .home-feature-list {
    margin-top: 6px;
  }

  .home-feature-list li {
    margin-top: 2px;

    font-size: 9.5px;
    line-height: 1.15;
  }
}
/* ===== MOBILE - TĂNG ĐỘ DỄ ĐỌC CHO CARD MỤC HỌC KHÁC ===== */
@media (max-width: 700px) {
  .home-feature-title {
    font-size: 18px;
    line-height: 1.08;
  }

  .home-feature-description {
    font-size: 11px;
    line-height: 1.35;
    margin-top: 6px;
  }

  .home-feature-list {
    margin-top: 7px;
  }

  .home-feature-list li {
    font-size: 10.5px;
    line-height: 1.25;
    margin: 2px 0;
  }
}
/* =====================================================
   DESKTOP - CÁC MỤC HỌC KHÁC
===================================================== */
@media (min-width: 701px) {
  .home-feature-card {
    height: 280px;
    min-height: 280px;

    display: grid;
    grid-template-columns: 44% 56%;

    overflow: hidden;
  }

  .home-feature-visual {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .home-feature-content {
    min-width: 0;
    padding: 34px 38px 34px 28px;
  }

  .home-feature-title {
    font-size: 24px;
    line-height: 1.08;
    white-space: normal;
  }

  .home-feature-description {
    font-size: 14px;
    line-height: 1.45;
    margin-top: 8px;
  }

  .home-feature-list {
    margin-top: 12px;
  }

  .home-feature-list li {
    font-size: 13px;
    line-height: 1.3;
    margin: 4px 0;
  }
}
/* =====================================================
   DESKTOP FEATURE CARDS - FIX CHIỀU CAO + KHÔNG CẮT CHỮ
===================================================== */
@media (min-width: 701px) {
  .home-feature-card {
    height: auto;
    min-height: 320px;

    display: grid;
    grid-template-columns: 40% 60%;

    overflow: hidden;
  }

  .home-feature-visual {
    width: 100%;
    height: 100%;
    min-height: 320px;
  }

  .home-feature-content {
    min-width: 0;

    padding: 34px 44px 30px 28px;

    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .home-feature-title {
    font-size: 24px;
    line-height: 1.08;
  }

  .home-feature-description {
    margin-top: 9px;

    font-size: 14px;
    line-height: 1.45;
  }

  .home-feature-list {
    margin-top: 13px;
  }

  .home-feature-list li {
    margin-top: 5px;

    font-size: 13px;
    line-height: 1.25;
  }

  .home-feature-arrow {
    right: 14px;
    bottom: 14px;
  }
}
/* =====================================================
   DESKTOP - ẢNH MASCOT TRONG 2 FEATURE CARD
===================================================== */

.home-feature-parrot-image {
  width: 100%;
  height: 100%;

  object-fit: contain;

  padding: 12px;

  display: block;
}

@media (min-width: 701px) {
  .home-feature-visual {
    padding: 0;
  }

  .home-feature-parrot-image {
    padding: 10px;
  }
}
/* =========================================================
   DESKTOP - 2 CARD CÁC MỤC HỌC KHÁC - BẢN CHỐT
========================================================= */
@media (min-width: 701px) {
  .home-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .home-feature-card {
    height: 300px;
    min-height: 300px;

    display: grid;
    grid-template-columns: 46% 54%;

    gap: 0;
    padding: 0;

    overflow: hidden;

    border-radius: 20px;
  }

  /* Ảnh bên trái */
  .home-feature-visual {
    position: relative;

    width: 100%;
    height: 300px;
    min-height: 300px;

    padding: 0;
    overflow: hidden;
  }

  .home-feature-parrot-image {
    position: static;

    width: 100%;
    height: 100%;

    padding: 0;

    object-fit: cover;
    object-position: center;

    transform: none;

    display: block;
  }

  /* Nội dung bên phải */
  .home-feature-content {
    min-width: 0;

    padding: 30px 46px 26px 26px;

    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .home-feature-title {
    margin: 0;

    font-size: 23px;
    line-height: 1.12;

    word-break: keep-all;
    overflow-wrap: normal;
  }

  .home-feature-description {
    margin-top: 8px;

    font-size: 13px;
    line-height: 1.4;

    word-break: normal;
  }

  .home-feature-list {
    margin-top: 12px;
  }

  .home-feature-list li {
    margin-top: 4px;

    font-size: 12.5px;
    line-height: 1.25;
  }

  .home-feature-arrow {
    right: 14px;
    bottom: 14px;

    width: 38px;
    height: 38px;
  }
}
/* =========================================================
   DESKTOP - CĂN LẠI ẢNH 2 CARD
========================================================= */
@media (min-width: 701px) {
  .home-feature-visual {
    position: relative;
    overflow: hidden;

    background: #e5f5ff;
  }

  .home-feature-parrot-image {
    position: absolute;

    width: 100%;
    height: 100%;

    left: 0;
    top: 0;

    object-fit: contain;
    object-position: center center;

    padding: 8px;

    transform: none;
  }
}
/* =========================================================
   DESKTOP - PHÓNG ẢNH FEATURE CARD NHẸ
========================================================= */
@media (min-width: 701px) {
  .home-feature-parrot-image {
    width: 112%;
    height: 112%;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    object-fit: contain;
  }
}
/* =========================================================
   DESKTOP - NỀN TRANG CHỦ
========================================================= */
@media (min-width: 701px) {
  .main-content {
    background: #eef7ff;
  }
}
/* =========================================
   DESKTOP - BANNER ẢNH MỚI
========================================= */
@media (min-width: 701px) {
  .home-hero-image-wrap {
    width: 100%;
    margin-bottom: 28px;
    border-radius: 24px;
    overflow: hidden;

    box-shadow: 0 10px 28px rgba(44, 86, 126, 0.08);
  }

  .home-hero-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}
/* =========================================================
   HOME - THU GỌN BANNER DESKTOP
========================================================= */

@media (min-width: 701px) {
  .home-hero-image-wrap {
    padding: 0;
    margin-bottom: 2px;
  }

  .home-hero-image {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    display: block;
    border-radius: 22px;
  }

  .home-hero-image-wrap + .home-section {
    margin-top: 8px;
  }
}
/* =========================================================
   HOME HSK - MÀU THEO CẤP ĐỘ
========================================================= */

/* HSK 1 - XANH DƯƠNG */
.home-hsk-card.blue .home-hsk-book {
  background: linear-gradient(180deg, #55a6ff, #2f80ed);
  color: #fff;
}

.home-hsk-card.blue .home-hsk-info h3,
.home-hsk-card.blue li::marker {
  color: #1565c0;
}

/* HSK 2 - XANH LÁ */
.home-hsk-card.green .home-hsk-book {
  background: linear-gradient(180deg, #57dc78, #20bf55);
  color: #fff;
}

.home-hsk-card.green .home-hsk-info h3,
.home-hsk-card.green li::marker {
  color: #159447;
}

/* HSK 3 - CAM */
.home-hsk-card.orange .home-hsk-book {
  background: linear-gradient(180deg, #ffb23f, #ff8a00);
  color: #fff;
}

.home-hsk-card.orange .home-hsk-info h3,
.home-hsk-card.orange li::marker {
  color: #ef7600;
}

/* HSK 4 - ĐỎ */
.home-hsk-card.red .home-hsk-book {
  background: linear-gradient(180deg, #ff6b6b, #ff3b3b);
  color: #fff;
}

.home-hsk-card.red .home-hsk-info h3,
.home-hsk-card.red li::marker {
  color: #d93645;
}
.menu-icon svg {
  width: 25px;
  height: 25px;

  fill: none;
  stroke: #1769d2;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-item.active .menu-icon svg {
  stroke: #0f5fc4;
}
/* =========================================
   VẸT BÁO KẾT QUẢ ĐÚNG / SAI
========================================= */

.parrot-result-box {
  position: relative;
  overflow: visible;
}

.result-parrot {
  position: absolute;
  width: 90px;
  height: auto;

  left: 12px;
  bottom: -5px;

  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.result-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-left: 0;
}
/* Vẹt khi trả lời đúng */
.correct-box .result-parrot {
  width: 140px;
  left: 10px;
  bottom: -5px;
}

/* Chừa chỗ cho vẹt nhưng vẫn giữ chữ ở giữa */
.correct-box .result-content {
  padding-left: 120px;
  padding-right: 120px;
}
/* =========================================================
   POPUP HOÀN THÀNH BÀI
========================================================= */

.completion-popup-overlay {
  position: fixed;
  inset: 0;

  background: rgba(25, 45, 75, 0.45);
  backdrop-filter: blur(6px);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  z-index: 9999;
}

.completion-popup {
  position: relative;

  width: min(620px, 100%);

  background: linear-gradient(180deg, #ffffff 0%, #f4faff 100%);

  border: 2px solid #b9ddff;
  border-radius: 30px;

  box-shadow: 0 24px 70px rgba(25, 75, 130, 0.28);

  padding: 120px 34px 34px;

  animation: completionPopupIn 0.28s ease;
}

@keyframes completionPopupIn {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== VẸT ===== */

.completion-parrot-wrap {
  position: absolute;

  top: -105px;
  left: 50%;

  transform: translateX(-50%);

  width: 240px;
  height: 190px;
}

.completion-parrot {
  position: absolute;

  width: 180px;
  height: auto;

  left: 50%;
  bottom: 0;

  transform: translateX(-50%);

  object-fit: contain;

  user-select: none;
  pointer-events: none;
}

/* ===== BONG BÓNG ===== */

.completion-speech {
  position: absolute;

  top: 5px;
  right: -70px;

  background: #fff9dc;

  border: 2px solid #ffd86a;
  border-radius: 22px;

  padding: 10px 18px;

  font-size: 20px;
  font-weight: 800;

  color: #173a70;

  box-shadow: 0 6px 18px rgba(70, 100, 140, 0.15);
}

.completion-speech::after {
  content: "";

  position: absolute;

  left: 18px;
  bottom: -10px;

  width: 18px;
  height: 18px;

  background: #fff9dc;

  border-right: 2px solid #ffd86a;
  border-bottom: 2px solid #ffd86a;

  transform: rotate(45deg);
}

/* ===== NỘI DUNG ===== */

.completion-popup-content {
  text-align: center;
}

.completion-icon {
  font-size: 36px;

  margin-bottom: 8px;
}

.completion-title {
  font-size: 30px;
  font-weight: 900;

  color: #163a6b;

  line-height: 1.3;
}

.completion-message {
  margin-top: 12px;

  font-size: 18px;
  line-height: 1.6;

  color: #64748b;
}

/* ===== BUTTONS ===== */

.completion-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 14px;

  margin-top: 28px;
}

.completion-actions button {
  min-height: 68px;

  border-radius: 18px;

  font-size: 17px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.completion-primary {
  border: none;

  background: linear-gradient(135deg, #4295ff, #2879e9);

  color: white;

  box-shadow: 0 8px 20px rgba(47, 125, 230, 0.25);
}

.completion-primary:hover {
  transform: translateY(-2px);

  box-shadow: 0 12px 26px rgba(47, 125, 230, 0.32);
}

.completion-secondary {
  background: white;

  color: #24558f;

  border: 2px solid #cfe6fb;
}

.completion-secondary:hover {
  transform: translateY(-2px);

  background: #f3f9ff;
}

/* ===== MOBILE ===== */

@media (max-width: 600px) {
  .completion-popup-overlay {
    padding: 18px;
  }

  .completion-popup {
    padding: 105px 20px 22px;

    border-radius: 24px;
  }

  .completion-parrot-wrap {
    top: -92px;

    width: 190px;
    height: 165px;
  }

  .completion-parrot {
    width: 150px;
  }

  .completion-speech {
    top: 8px;
    right: -55px;

    font-size: 16px;

    padding: 8px 13px;
  }

  .completion-title {
    font-size: 24px;
  }

  .completion-message {
    font-size: 16px;
  }

  .completion-actions {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   NGỮ PHÁP - BẤM TỪ ĐỂ GHÉP CÂU
========================================================= */

.grammar-word-piece {
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
}

.grammar-word-piece:hover {
  transform: translateY(-2px);
}

/* Từ đã được chọn */
.grammar-word-piece.selected {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #2563eb;
  opacity: 0.55;
  transform: none;
}
/* =========================================================
   MOBILE - BANNER TRANG CHỦ VỪA MÀN HÌNH
========================================================= */

@media (max-width: 700px) {
  .home-hero-image-wrap {
    width: 100%;
    margin: 0 0 20px;
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
  }

  .home-hero-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;

    object-fit: contain;
    object-position: center;

    border-radius: 18px;
  }
}
/* =========================================================
   MOBILE - BANNER TRANG CHỦ TO HƠN
========================================================= */

@media (max-width: 700px) {
  .home-hero-image-wrap {
    width: calc(100% + 28px);

    margin-left: -14px;
    margin-right: -14px;
    margin-bottom: 22px;

    padding: 0;

    border-radius: 18px;
    overflow: hidden;
  }

  .home-hero-image {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;
    object-position: center;

    border-radius: 18px;
  }
}
/* =========================================================
   BANNER TRANG CHỦ - DESKTOP / MOBILE
========================================================= */

.home-hero-image-wrap {
  display: block;
  width: 100%;
}

.home-hero-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* MOBILE */
@media (max-width: 700px) {
  .home-hero-image-wrap {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    margin-bottom: 24px;

    padding: 0;
    border-radius: 18px;
    overflow: hidden;
  }

  .home-hero-image-wrap picture {
    display: block;
    width: 100%;
  }

  .home-hero-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    border-radius: 18px;
  }
}
/* =========================================================
   MOBILE - BANNER SÁT MÉP
========================================================= */

/* =========================================================
   MOBILE - BANNER TO VÀ CĂN GIỮA
========================================================= */
@media (max-width: 700px) {
  .home-hero-image-wrap {
    width: calc(100vw - 32px);

    position: relative;
    left: 50%;
    transform: translateX(-50%);

    margin: 0 0 24px;
    padding: 0;

    overflow: hidden;
    border-radius: 18px;
  }

  .home-hero-image-wrap picture {
    display: block;
    width: 100%;
  }

  .home-hero-image {
    display: block;
    width: 100%;
    height: auto;

    object-fit: contain;
    border-radius: 18px;
  }
}
@media (max-width: 700px) {
  .main-content {
    padding-top: 8px;
  }

  .home-hero-image-wrap {
    margin-top: 0;
  }
}
/* =========================================================
   MOBILE - CÁC MỤC HỌC KHÁC - BẢN CHỐT
========================================================= */

@media (max-width: 700px) {
  .home-feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .home-feature-card {
    position: relative;

    display: block;

    width: 100%;
    height: auto;
    min-height: 0;

    padding: 0;

    background: #ffffff;
    border: 1px solid #dbe8f5;
    border-radius: 20px;

    overflow: hidden;

    box-shadow: 0 8px 22px rgba(47, 91, 134, 0.08);
  }

  /* Ảnh phía trên */
  .home-feature-visual {
    width: 100%;
    height: 175px;
    min-height: 175px;

    padding: 0;
    overflow: hidden;

    background: #eaf6ff;
  }

  .home-feature-parrot-image {
    position: static;
    display: block;

    width: 100%;
    height: 100%;

    padding: 0;

    object-fit: contain;
    object-position: center;

    transform: none;
  }

  /* Nội dung */
  .home-feature-content {
    position: relative;

    padding: 17px 60px 19px 18px;

    min-width: 0;
  }

  .home-feature-title {
    margin: 0;

    color: #174b86;

    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
  }

  .home-feature-description {
    display: block;

    margin-top: 6px;

    color: #6680a6;

    font-size: 13px;
    line-height: 1.4;
  }

  /* Mobile không hiện danh sách dài */
  .home-feature-list {
    display: none;
  }

  /* Mũi tên */
  .home-feature-arrow {
    right: 16px;
    bottom: 18px;

    width: 38px;
    height: 38px;
  }
}
/* =========================================================
   MOBILE - SỬA BOX KẾT QUẢ ĐÚNG
   Không ép chữ thành cột dọc
========================================================= */

@media (max-width: 700px) {
  /* Box kết quả */
  .correct-box.parrot-result-box {
    width: 100%;
    box-sizing: border-box;
    padding: 18px 16px 90px;
  }

  /* Quan trọng: bỏ khoảng trống 120px của desktop */
  .correct-box .result-content {
    width: 100%;
    max-width: none;

    padding-left: 0;
    padding-right: 0;

    box-sizing: border-box;

    text-align: center;

    /* Chỉ xuống dòng khi thực sự hết chiều ngang */
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
  }

  /* Các nội dung nằm bên trong đáp án */
  .correct-box .result-content * {
    max-width: 100%;
    word-break: normal;
    overflow-wrap: normal;
  }

  /* Vẹt chuyển xuống dưới để không chiếm chiều ngang chữ */
  .correct-box .result-parrot {
    width: 82px;

    left: 10px;
    bottom: 4px;
  }
}
/* =========================================================
   MOBILE - CÂU HỎI TRẢI RỘNG
========================================================= */

@media (max-width: 700px) {
  .practice-question-main {
    width: 100%;
    max-width: none;

    padding-left: 4px;
    padding-right: 4px;

    box-sizing: border-box;

    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
  }

  .practice-question-card {
    padding-left: 8px;
    padding-right: 8px;
  }
}
/* =========================================================
   MOBILE - VẸT BÁO SAI
========================================================= */

@media (max-width: 700px) {
  .wrong-box.parrot-result-box {
    position: relative;

    min-height: 72px;
    padding: 18px 14px;

    box-sizing: border-box;
  }

  .wrong-box .result-parrot {
    width: 70px;

    left: 8px;
    bottom: 0;
  }

  .wrong-box .result-content {
    width: 100%;

    padding-left: 72px;
    padding-right: 72px;

    box-sizing: border-box;

    text-align: center;

    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
  }
}
/* =========================================================
   ACCOUNT - CHANGE PASSWORD
   ========================================================= */

.account-password-section {
  margin-top: 26px;
}

.account-password-toggle {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border: 1px solid #cfe0f7;
  border-radius: 13px;

  background: #f4f8ff;
  color: #15345f;

  font-size: 17px;
  font-weight: 700;

  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.account-password-toggle:hover {
  background: #edf5ff;
  border-color: #9fc5f7;
}

.account-password-toggle-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.account-password-lock {
  font-size: 20px;
}

.account-password-arrow {
  color: #2876df;
  font-size: 15px;
  transition: transform 0.2s ease;
}

/* Khung form */

.account-password-form {
  margin-top: 14px;
  padding: 20px;

  background: #f5f9ff;
  border-radius: 14px;
}

.account-password-heading {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 18px;
}

.account-password-heading-icon {
  font-size: 25px;
}

.account-password-title {
  color: #17365f;
  font-size: 17px;
  font-weight: 800;
}

.account-password-description {
  margin-top: 3px;

  color: #6680a6;
  font-size: 14px;
}

/* Ô mật khẩu */

.account-password-input-wrap {
  position: relative;
  width: 100%;
  margin-top: 12px;
}

.account-password-input {
  width: 100%;
  height: 52px;

  box-sizing: border-box;

  padding: 0 50px 0 48px;

  border: 1px solid #d5e1ef;
  border-radius: 11px;

  background: #ffffff;

  color: #17345c;
  font-size: 16px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.account-password-input::placeholder {
  color: #7890af;
}

.account-password-input:focus {
  border-color: #4385e5;
  box-shadow: 0 0 0 3px rgba(67, 133, 229, 0.12);
}

.account-password-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);

  font-size: 17px;

  pointer-events: none;
}

.password-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 0;
  background: transparent;

  font-size: 17px;
  cursor: pointer;

  opacity: 0.65;
}

.password-eye:hover {
  opacity: 1;
}

/* Gợi ý mật khẩu */

.account-password-hint {
  margin: 7px 0 2px 50px;

  color: #6680a6;
  font-size: 13px;
}

/* Nút xác nhận */

.account-change-password-button {
  width: 100%;
  min-height: 52px;

  margin-top: 16px;

  border: 0;
  border-radius: 11px;

  background: #347ee5;
  color: #ffffff;

  font-size: 16px;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 5px 14px rgba(52, 126, 229, 0.18);

  transition:
    transform 0.15s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.account-change-password-button:hover {
  background: #286fd5;
  box-shadow: 0 7px 18px rgba(52, 126, 229, 0.24);
}

.account-change-password-button:active {
  transform: translateY(1px);
}

/* Thông báo đổi mật khẩu */

#changePasswordMessage .wrong-box,
#changePasswordMessage .correct-box {
  margin-top: 14px;
  border-radius: 11px;
}

/* Mobile */

@media (max-width: 700px) {
  .account-password-form {
    padding: 15px;
  }

  .account-password-toggle {
    min-height: 54px;
    padding: 0 14px;
    font-size: 16px;
  }

  .account-password-input {
    height: 50px;
    font-size: 15px;
  }

  .account-password-hint {
    margin-left: 8px;
  }
}
/* ===== QUÊN MẬT KHẨU - NHẬP OTP ===== */

.forgot-otp-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  align-items: stretch;
}

.forgot-otp-input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #fff;
  color: #16345f;
  font-size: 16px;
  box-sizing: border-box;
  outline: none;
  transition: 0.2s;
}

.forgot-otp-input:focus {
  border-color: #4285e8;
  box-shadow: 0 0 0 3px rgba(66, 133, 232, 0.12);
}

.forgot-otp-input::placeholder {
  color: #8b9bb2;
}

.forgot-otp-button {
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: #4285e8;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
}

.forgot-otp-button:hover {
  background: #3476d9;
}

@media (max-width: 700px) {
  .forgot-otp-actions {
    flex-direction: column;
  }

  .forgot-otp-button {
    width: 100%;
  }
}
/* ===== QUÊN MẬT KHẨU - TẠO MẬT KHẨU MỚI ===== */

.forgot-reset-password-form {
  margin-top: 16px;
}

.forgot-reset-password-form .password-field {
  position: relative;
  margin-top: 12px;
}

.forgot-reset-password-input {
  width: 100%;
  height: 56px;
  box-sizing: border-box;
  padding: 0 52px 0 16px;

  border: 1px solid #d6e2f1;
  border-radius: 12px;
  outline: none;

  background: #ffffff;
  color: #16345f;
  font-size: 16px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.forgot-reset-password-input:focus {
  border-color: #4285e8;
  box-shadow: 0 0 0 3px rgba(66, 133, 232, 0.12);
}

.forgot-reset-password-input::placeholder {
  color: #8a9bb3;
}

.forgot-reset-password-form .password-eye {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);

  width: 36px;
  height: 36px;
  padding: 0;

  border: none;
  background: transparent;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 17px;
}

.forgot-reset-password-button {
  width: 100%;
  height: 54px;
  margin-top: 16px;

  border: none;
  border-radius: 12px;

  background: #4285e8;
  color: #ffffff;

  font-size: 16px;
  font-weight: 700;
  cursor: pointer;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.forgot-reset-password-button:hover {
  background: #3478dc;
  box-shadow: 0 6px 16px rgba(66, 133, 232, 0.22);
}

.forgot-reset-password-button:active {
  transform: translateY(1px);
}

#forgotResetPasswordMessage .wrong-box,
#forgotResetPasswordMessage .correct-box {
  margin-top: 14px !important;
}
/* Loading trên nút đăng nhập / đăng ký */
.button-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  vertical-align: middle;
  animation: buttonSpinner 0.7s linear infinite;
}

@keyframes buttonSpinner {
  to {
    transform: rotate(360deg);
  }
}

.auth-submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}
/* =====================================================
   ACCOUNT - PREMIUM CARD
===================================================== */

.account-premium-card {
  margin-top: 22px;
  padding: 22px;
  border-radius: 18px;

  background: linear-gradient(135deg, #fffaf0 0%, #fff7e8 100%);

  border: 1px solid #f6e3bd;

  box-shadow: 0 8px 24px rgba(184, 128, 28, 0.08);
}

/* Header */
.account-premium-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-premium-crown {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  color: #f2ad27;

  background: #fff3d6;
  border-radius: 14px;
}

.account-premium-title {
  font-size: 20px;
  font-weight: 800;
  color: #17233c;
}

.account-premium-subtitle {
  margin-top: 3px;

  font-size: 14px;
  color: #71819d;
}

/* Quyền lợi */
.account-premium-benefits {
  margin-top: 18px;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-premium-benefit {
  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 15px;
  color: #334766;
}

.premium-check {
  width: 21px;
  height: 21px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  border-radius: 50%;

  background: #35b98a;
  color: white;

  font-size: 13px;
  font-weight: 800;
}

/* Nút nâng cấp */
.account-premium-button {
  width: 100%;
  margin-top: 20px;
  padding: 13px 18px;

  border: none;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  background: linear-gradient(135deg, #ffc84d, #f3a313);

  color: white;

  font-size: 15px;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 6px 16px rgba(243, 163, 19, 0.2);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.account-premium-button:hover {
  transform: translateY(-1px);

  box-shadow: 0 8px 20px rgba(243, 163, 19, 0.28);
}

.account-premium-button:active {
  transform: translateY(0);
}

.account-premium-button svg {
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 600px) {
  .account-premium-card {
    padding: 18px;
  }

  .account-premium-title {
    font-size: 18px;
  }

  .account-premium-benefit {
    font-size: 14px;
  }
}
/* =====================================================
   PREMIUM PLANS
===================================================== */

.premium-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.premium-plan-card {
  width: 100%;
  min-height: 150px;
  padding: 22px;
  border: 1px solid #dce7f5;
  border-radius: 20px;
  background: #ffffff;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;

  text-align: left;
  font-family: inherit;
  color: #102a56;

  box-shadow: 0 8px 24px rgba(42, 83, 140, 0.07);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.premium-plan-card:hover {
  transform: translateY(-3px);
  border-color: #8eb8f5;
  box-shadow: 0 12px 30px rgba(42, 83, 140, 0.13);
}

/* Gói 3 tháng nổi bật */
.premium-plan-card-featured {
  border: 2px solid #f4b42b;
  background: linear-gradient(145deg, #fffdf8 0%, #fff7e7 100%);
}

.premium-plan-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.premium-plan-name {
  font-size: 20px;
  font-weight: 800;
  color: #102a56;
}

.premium-plan-description {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #6a7f9f;
}

.premium-plan-price {
  margin-top: 20px;
  font-size: 25px;
  font-weight: 800;
  color: #1769d2;
}

.premium-plan-card-featured .premium-plan-price {
  color: #e99a00;
}

.premium-saving {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;

  border-radius: 999px;
  background: #e8f8f1;
  color: #15966c;

  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Mobile */
@media (max-width: 650px) {
  .premium-plans {
    grid-template-columns: 1fr;
  }

  .premium-plan-card {
    min-height: 135px;
  }
}
/* ===== TÀI KHOẢN PREMIUM TRÊN SIDEBAR ===== */

#loginMenu.premium-account-menu {
  background: linear-gradient(135deg, #fff8e7, #fff1c7);
  border: 1px solid #f5d98b;
}

#loginMenu.premium-account-menu:hover {
  background: linear-gradient(135deg, #fff4d6, #ffe9ad);
}

#loginMenu.premium-account-menu .icon {
  background: #fff7df;
  border-color: #f3cf70;
  color: #d99500;
}

.sidebar-premium-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-left: 7px;
  padding: 3px 8px;

  border-radius: 999px;

  background: #f5a800;
  color: #ffffff;

  font-size: 10px;
  font-weight: 800;
  line-height: 1;

  letter-spacing: 0.2px;
  text-transform: uppercase;
}
