/* =========================
   NÚT TIẾP THEO
========================= */

.continue-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  min-height: 54px;
  margin-top: 18px;
  padding: 15px 22px;
  border: 0;
  border-radius: 15px;
  background: #18181e;
  color: white;
  font-family: inherit;
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(24,24,30,.16);
  transition: .18s ease;
}

.continue-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(24,24,30,.2);
}


/* =========================
   SAU BÀI HỌC
========================= */

.after-learning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
  text-align: left;
}

.after-learning-card {
  border-radius: 18px;
  padding: 19px;
}

.garden-teaser {
  background: #efffdc;
}

.reading-teaser {
  background: #eef7ff;
}

.after-learning-card > span {
  display: block;
  color: #6a6a74;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.after-learning-card h3 {
  margin-top: 7px;
  font-size: 19px;
}

.after-learning-card p {
  margin-top: 7px;
  color: #6d6d76;
  font-size: 13px;
  line-height: 1.55;
}

.text-action {
  margin-top: 12px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #5b43dc;
  font-family: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}


/* =========================
   LỊCH SỬ / ÔN TẬP
========================= */

.review-shell,
.garden-shell,
.library-shell,
.reader-shell {
  width: 100%;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(30,30,40,.08);
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 30px 80px rgba(35,30,70,.10);
}

.review-head,
.library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.review-head h2,
.library-head h2,
.garden-copy h2 {
  margin-top: 7px;
  font-size: 32px;
  letter-spacing: -1px;
}

.review-head p,
.library-head p,
.garden-copy p {
  margin-top: 8px;
  max-width: 700px;
  color: #71717a;
  line-height: 1.6;
}

.review-count,
.library-badge {
  background: #f1eeff;
  color: #5b43dc;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 850;
}

.review-list {
  margin-top: 26px;
  display: grid;
  gap: 10px;
}

.review-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(30,30,40,.08);
  border-radius: 16px;
  padding: 16px 18px;
  background: #fbfbfd;
}

.review-date {
  color: #7657ff;
  font-size: 12px;
  font-weight: 850;
}

.review-card h3 {
  margin-top: 4px;
}

.review-card p {
  margin-top: 4px;
  color: #777780;
  font-size: 13px;
}

.review-button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  background: #18181e;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.empty-review p {
  margin: 10px 0 20px;
  color: #74747d;
}


/* =========================
   VƯỜN KỸ NĂNG
========================= */

.garden-shell {
  overflow: hidden;
}

.garden-stage {
  position: relative;
  margin-top: 26px;
  height: 280px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 15%, rgba(255,244,171,.9), transparent 18%),
    linear-gradient(180deg, #dff3ff 0%, #f6fcff 62%, #e8f7cf 63%, #cdea9f 100%);
}

.garden-sky {
  position: absolute;
  right: 8%;
  top: 8%;
  font-size: 42px;
}

.garden-tree {
  position: absolute;
  left: 50%;
  bottom: 33px;
  transform: translateX(-50%);
  font-size: 112px;
  filter: drop-shadow(0 16px 18px rgba(38,65,28,.12));
}

.garden-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 68px;
  border-radius: 50% 50% 0 0;
  background: rgba(106,160,61,.18);
}

.garden-status {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.garden-status > div {
  background: #f8f8fb;
  border-radius: 14px;
  padding: 14px;
}

.garden-status span {
  display: block;
  color: #85858f;
  font-size: 11px;
}

.garden-status strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
}

.garden-progress {
  margin-top: 18px;
}

.garden-progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.garden-bar {
  height: 10px;
  margin-top: 8px;
  overflow: hidden;
  background: #e9eadf;
  border-radius: 999px;
}

.garden-bar > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ecb55, #b5e768);
}

.garden-rule {
  margin-top: 17px;
  padding: 15px;
  background: #f2f9e8;
  border-radius: 14px;
  color: #586747;
  line-height: 1.55;
  font-size: 13px;
}

.garden-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


/* =========================
   TỦ TÀI LIỆU
========================= */

.library-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 26px;
}

.library-card {
  border: 1px solid rgba(30,30,40,.08);
  border-radius: 18px;
  padding: 19px;
  background: #fbfbfd;
}

.library-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.library-card-top span {
  color: #7657ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .8px;
}

.library-card-top em {
  color: #8b8b94;
  font-size: 11px;
  font-style: normal;
}

.library-card h3 {
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.3;
}

.library-card > p {
  margin-top: 8px;
  color: #777780;
  font-size: 13px;
}

.library-read-button {
  margin-top: 16px;
  border: 0;
  border-radius: 11px;
  padding: 10px 13px;
  background: #f0edff;
  color: #5b43dc;
  font-weight: 850;
  cursor: pointer;
}

.library-copyright-note {
  margin-top: 18px;
  border-radius: 15px;
  padding: 16px;
  background: #fff7e8;
  color: #76613d;
  font-size: 13px;
  line-height: 1.6;
}

.reader-back {
  border: 0;
  background: transparent;
  padding: 0;
  color: #5b43dc;
  font-weight: 850;
  cursor: pointer;
}

.reader-meta {
  display: flex;
  gap: 9px;
  margin-top: 24px;
}

.reader-meta span {
  background: #f1eeff;
  color: #5b43dc;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
}

.reader-shell h1 {
  margin-top: 14px;
  max-width: 820px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -1.6px;
}

.reader-source {
  margin-top: 12px;
  color: #8a8a93;
  font-size: 13px;
}

.reader-body {
  max-width: 760px;
  margin-top: 28px;
}

.reader-body > p {
  margin-top: 16px;
  color: #45454d;
  font-size: 17px;
  line-height: 1.8;
}

.reader-takeaway {
  margin-top: 24px;
  padding: 18px;
  border-radius: 16px;
  background: #efffdc;
}

.reader-takeaway span {
  color: #617743;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.reader-takeaway p {
  margin-top: 7px;
  color: #41502f;
  line-height: 1.6;
}

.reader-actions {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 15px;
  border-radius: 12px;
  background: #18181e;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}


@media (max-width: 760px) {
  .after-learning-grid,
  .library-grid,
  .garden-status {
    grid-template-columns: 1fr;
  }

  .review-head,
  .library-head {
    flex-direction: column;
  }

  .review-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .continue-button {
    width: 100%;
  }

  .garden-tree {
    font-size: 92px;
  }
}


/* =========================
   THANH MENU NỔI BÊN PHẢI
========================= */

.header-note {
  color: #8a8a94;
  font-size: 13px;
  font-weight: 650;
}

.floating-menu {
  position: fixed;
  z-index: 999;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);

  display: flex;
  flex-direction: column;
  gap: 9px;

  padding: 9px;

  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);

  border: 1px solid rgba(25, 25, 35, .09);
  border-radius: 22px;

  box-shadow:
    0 18px 50px rgba(39, 35, 70, .13);
}

.floating-menu-item {
  position: relative;

  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  border: 0;
  border-radius: 15px;

  background: transparent;
  color: #41414a;

  font-family: inherit;
  cursor: pointer;

  transition:
    transform .16s ease,
    background .16s ease,
    color .16s ease;
}

.floating-menu-item:hover {
  transform: translateX(-3px);
  background: #f0edff;
  color: #5a42d7;
}

.floating-menu-item:active {
  transform: scale(.96);
}

.floating-icon {
  font-size: 21px;
  line-height: 1;
  font-weight: 900;
}

.floating-home {
  margin-top: 5px;
  border-top: 1px solid rgba(25,25,35,.08);
  border-radius: 0 0 15px 15px;
}

.floating-tooltip {
  position: absolute;
  right: 59px;
  top: 50%;
  transform: translateY(-50%) translateX(7px);

  pointer-events: none;

  white-space: nowrap;

  padding: 8px 11px;

  background: #18181e;
  color: white;

  border-radius: 10px;

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

  opacity: 0;

  transition:
    opacity .15s ease,
    transform .15s ease;

  box-shadow:
    0 9px 25px rgba(24,24,30,.15);
}

.floating-tooltip::after {
  content: "";

  position: absolute;
  top: 50%;
  right: -5px;

  width: 10px;
  height: 10px;

  background: #18181e;

  transform:
    translateY(-50%)
    rotate(45deg);
}

.floating-menu-item:hover .floating-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.floating-mobile-label {
  display: none;
}


/* Chừa khoảng thở bên phải cho màn hình vừa */
@media (max-width: 1180px) and (min-width: 761px) {
  .floating-menu {
    right: 12px;
  }

  .floating-menu-item {
    width: 44px;
    height: 44px;
  }
}


/* =========================
   ĐIỆN THOẠI / TABLET NHỎ
   Chuyển thành dock phía dưới
========================= */

@media (max-width: 760px) {

  body {
    padding-bottom: 88px;
  }

  .header-note {
    display: none;
  }

  .floating-menu {
    top: auto;
    right: 12px;
    left: 12px;
    bottom: 12px;

    transform: none;

    flex-direction: row;
    justify-content: space-around;
    gap: 2px;

    padding: 7px 8px;

    border-radius: 20px;

    background: rgba(255,255,255,.88);
  }

  .floating-menu-item {
    width: auto;
    min-width: 58px;
    height: 57px;

    padding: 6px 8px;

    display: flex;
    flex-direction: column;
    gap: 4px;

    border-radius: 14px;
  }

  .floating-menu-item:hover {
    transform: none;
  }

  .floating-icon {
    font-size: 19px;
  }

  .floating-tooltip {
    display: none;
  }

  .floating-mobile-label {
    display: block;

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

    color: #6f6f79;
  }

  .floating-home {
    margin-top: 0;
    border-top: 0;
  }
}

@media (max-width: 420px) {

  .floating-menu {
    right: 7px;
    left: 7px;
    bottom: 7px;
  }

  .floating-menu-item {
    min-width: 50px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .floating-mobile-label {
    font-size: 8px;
  }
}


/* =========================
   THƯ VIỆN V3
========================= */

.library-v3-shell,
.reader-v3-shell {
  width: 100%;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(30,30,40,.08);
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 30px 80px rgba(35,30,70,.10);
}

.library-v3-hero {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 24px;
  align-items: end;
}

.library-v3-hero h2 {
  margin-top: 8px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -1.6px;
  max-width: 850px;
}

.library-v3-hero p {
  margin-top: 12px;
  color: #707079;
  line-height: 1.65;
  max-width: 760px;
}

.library-v3-progress-card {
  background: #18181e;
  color: white;
  border-radius: 20px;
  padding: 20px;
}

.library-v3-progress-card span {
  color: #bdbdc5;
  font-size: 12px;
}

.library-v3-progress-card strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.library-v3-progress {
  height: 8px;
  margin-top: 14px;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  overflow: hidden;
}

.library-v3-progress > div {
  height: 100%;
  background: linear-gradient(90deg, #b8f05c, #d7ff9a);
  border-radius: 999px;
}

.library-featured {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.featured-book {
  border-radius: 20px;
  padding: 20px;
  min-height: 190px;
}

.voss-feature {
  background: #eef7ff;
}

.trump-feature {
  background: #fff1e8;
}

.harvard-feature {
  background: #efffdc;
}

.featured-book > span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.1px;
  color: #6f6f78;
}

.featured-book h3 {
  margin-top: 8px;
  font-size: 25px;
}

.featured-book p {
  margin-top: 8px;
  color: #66666f;
  font-size: 13px;
  line-height: 1.55;
}

.featured-book button {
  margin-top: 15px;
  border: 0;
  background: transparent;
  padding: 0;
  color: #5b43dc;
  font-weight: 850;
  cursor: pointer;
}

.library-v3-toolbar {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 14px;
  align-items: start;
  scroll-margin-top: 30px;
}

.library-v3-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.library-filter {
  border: 1px solid rgba(30,30,40,.08);
  background: #f8f8fb;
  color: #5e5e68;
  border-radius: 999px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.library-filter.active,
.library-filter:hover {
  background: #18181e;
  color: white;
}

.library-search {
  width: 100%;
  border: 1px solid rgba(30,30,40,.10);
  border-radius: 13px;
  padding: 12px 14px;
  font: inherit;
  font-size: 13px;
  outline: none;
  background: white;
}

.library-search:focus {
  border-color: rgba(118,87,255,.45);
  box-shadow: 0 0 0 3px rgba(118,87,255,.08);
}

.library-v3-count {
  margin-top: 18px;
  color: #8a8a94;
  font-size: 12px;
  font-weight: 800;
}

.library-v3-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.library-v3-card {
  border: 1px solid rgba(30,30,40,.08);
  border-radius: 19px;
  padding: 19px;
  background: #fbfbfd;
  display: flex;
  flex-direction: column;
}

.library-v3-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.library-v3-category {
  color: #7657ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .7px;
}

.library-v3-time {
  color: #8d8d96;
  font-size: 11px;
}

.library-v3-level {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 10px;
  background: #f0edff;
  color: #5c45d7;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 850;
}

.library-v3-card h3 {
  margin-top: 13px;
  font-size: 21px;
  line-height: 1.3;
}

.library-v3-subtitle {
  margin-top: 8px;
  color: #696973;
  font-size: 13px;
  line-height: 1.55;
}

.library-v3-source {
  margin-top: 12px;
  color: #96969f;
  font-size: 11px;
  line-height: 1.45;
}

.library-v3-card-bottom {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.library-v3-read {
  border: 0;
  border-radius: 11px;
  padding: 10px 13px;
  background: #18181e;
  color: white;
  font-weight: 850;
  cursor: pointer;
}

.read-mark {
  color: #4f7924;
  font-size: 11px;
  font-weight: 850;
}

.unread-mark {
  color: #9b9ba3;
  font-size: 11px;
}

.library-v3-rights {
  margin-top: 22px;
  padding: 16px;
  border-radius: 15px;
  background: #fff7e8;
  color: #725f3e;
  font-size: 13px;
  line-height: 1.6;
}


/* =========================
   TRÌNH ĐỌC V3
========================= */

.reader-v3-back {
  border: 0;
  background: transparent;
  padding: 0;
  color: #5b43dc;
  font-weight: 850;
  cursor: pointer;
}

.reader-v3-topline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.reader-v3-topline span {
  border-radius: 999px;
  padding: 7px 10px;
  background: #f1eeff;
  color: #5b43dc;
  font-size: 11px;
  font-weight: 800;
}

.reader-v3-shell h1 {
  margin-top: 16px;
  max-width: 880px;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.06;
  letter-spacing: -1.8px;
}

.reader-v3-subtitle {
  margin-top: 12px;
  max-width: 760px;
  color: #666670;
  font-size: 18px;
  line-height: 1.55;
}

.reader-v3-sourcebox {
  max-width: 760px;
  margin-top: 22px;
  padding: 15px 17px;
  border: 1px solid rgba(30,30,40,.08);
  border-radius: 15px;
  background: #fafafd;
}

.reader-v3-sourcebox span,
.reader-v3-sourcebox small {
  display: block;
  color: #92929b;
  font-size: 11px;
}

.reader-v3-sourcebox strong {
  display: block;
  margin: 5px 0;
  font-size: 14px;
}

.reader-v3-body {
  max-width: 760px;
  margin-top: 30px;
}

.reader-v3-body > p {
  margin-top: 17px;
  color: #414149;
  font-size: 17px;
  line-height: 1.85;
}

.reader-v3-takeaway,
.reader-v3-practice {
  margin-top: 24px;
  padding: 18px;
  border-radius: 16px;
}

.reader-v3-takeaway {
  background: #efffdc;
}

.reader-v3-practice {
  background: #eef7ff;
}

.reader-v3-takeaway span,
.reader-v3-practice span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.1px;
  color: #65705b;
}

.reader-v3-takeaway p,
.reader-v3-practice p {
  margin-top: 7px;
  line-height: 1.65;
  color: #414149;
}

.reader-v3-actions {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 840px) {
  .library-v3-hero,
  .library-featured,
  .library-v3-toolbar,
  .library-v3-grid {
    grid-template-columns: 1fr;
  }

  .library-v3-progress-card {
    max-width: 320px;
  }
}

@media (max-width: 650px) {
  .library-v3-shell,
  .reader-v3-shell {
    padding: 23px;
    border-radius: 22px;
  }
}
