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

html {
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

:root {
  --color-primary: #ff8c28;
  --color-green: #65b36e;
  --color-stone: #c4a683;
  --color-light: #e0e0e0;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg-gray: #f5f5f5;
  --section-margin-top: 60px;
  --section-padding-x: 3%;
  --header-padding-left: 4%;
  --title-gap: 10px;
  --header-content-gap: 25px;
  --gap: 10px;
  --radius: 10px;
  --font-title: calc(22 / 12 * 1rem);
  --font-subtitle: 1rem;
}

[class$="__header"] {
  padding-left: var(--header-padding-left);
  margin-bottom: var(--header-content-gap);
}

[class$="__title"] {
  font-size: var(--font-title);
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.2;
}

[class$="__subtitle"] {
  font-size: var(--font-subtitle);
  color: var(--color-text-light);
  margin-top: var(--title-gap);
  line-height: 1.5;
}

.course-banner {
  position: relative;
  width: 100%;
}

.course-banner__img {
  width: 100%;
  height: auto;
}

.course-banner__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 9%;
}

.course-banner__title {
  font-size: calc(30 / 12 * 1rem);
  color: #fff;
  font-weight: 700;
}

.course-banner__desc {
  margin-top: 10px;
  font-size: calc(13 / 12 * 1rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.course-banner__search {
  margin-top: 18px;
  position: relative;
  width: 100%;
}

.course-banner__search-input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 0 56px 0 18px;
  outline: none;
}

.course-banner__search-input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.course-banner__search-input:focus {
  background: rgba(255, 255, 255, 0.18) !important;
  outline: none;
  -webkit-autofill,
  input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.18) inset !important;
    -webkit-text-fill-color: #fff !important;
  }
}

.course-banner__search-button {
  position: absolute;
  top: 0px;
  right: 0px;
  height: 100%;
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.course-banner__search-button img {
  width: 25px;
  height: 25px;
}

.course-banner__tags {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.course-banner__tag {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  padding: 6px 12px;
  font-size: calc(12 / 12 * 1rem);
  cursor: pointer;
  font-style: 300;
}

/* 手机端搜索结果下拉 */
.course-search-result {
  display: none;
  position: absolute;
  top: calc(100% - 11rem);
  left: 9%;
  right: 9%;
  max-height: 380px;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  z-index: 1000;
}

.course-search-loading,
.course-search-empty {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: calc(13 / 12 * 1rem);
}

.course-search-title {
  padding: 6px 16px;
  font-size: calc(12 / 12 * 1rem);
  color: #666;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.course-search-table {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem;
  background: #f0f0f0;
}

.course-search-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: #fff;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.course-search-thumb {
  width: 70%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.course-search-info {
  width: 100%;
  padding: 6px 8px 8px;
  text-align: center;
}

.course-search-name {
  font-size: calc(12 / 12 * 1rem);
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-search-short {
  display: none;
}

.course-browser,
.course-tutorials,
.course-preview {
  margin-top: var(--section-margin-top);
  padding: 0 var(--section-padding-x);
}

.course-preview {
  margin-bottom: 60px;
}

.course-browser__tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  width: calc(100% + (var(--section-padding-x) * 2));
  margin-left: calc(-1 * var(--section-padding-x));
  margin-right: calc(-1 * var(--section-padding-x));
  padding: 0 var(--section-padding-x) 4px calc(var(--section-padding-x) + var(--header-padding-left));
  margin-bottom: 25px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.course-browser__tabs::-webkit-scrollbar {
  display: none;
}

.course-browser__tab {
  flex: 0 0 auto;
  border: none;
  border-radius: 999px;
  background: #a2a3a9;
  color: #fff;
  font-size: calc(12 / 12 * 1rem);
  line-height: 1;
  font-weight: 500;
  padding: 10px 14px;
  white-space: nowrap;
  cursor: pointer;
}

.course-browser__tab.is-active {
  background: var(--color-green);
}

/* 一级标签颜色（按顺序） */
.course-browser__tabs .course-browser__tab:nth-of-type(1).is-active {
  background: #4c6397;
}

.course-browser__tabs .course-browser__tab:nth-of-type(2).is-active {
  background: #89ab5e;
}

.course-browser__tabs .course-browser__tab:nth-of-type(3).is-active {
  background: #ac4562;
}

.course-browser__tabs .course-browser__tab:nth-of-type(4).is-active {
  background: #7c91ac;
}

.course-browser__tabs .course-browser__tab:nth-of-type(5).is-active {
  background: #999dba;
}

.course-browser__tabs .course-browser__tab:nth-of-type(6).is-active {
  background: #e38e3d;
}

.course-browser__tabs .course-browser__tab:nth-of-type(7).is-active {
  background: #77818d;
}

.course-browser__tabs .course-browser__tab:nth-of-type(8).is-active {
  background: #a0a0a8;
}

.course-browser__tabs .course-browser__tab:nth-of-type(9).is-active {
  background: #a39d8d;
}

.course-browser__panel {
  display: none;
}

.course-browser__panel.is-active {
  display: block;
}

/* 二级标签样式 */
.course-browser__subtabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  width: calc(100% + (var(--section-padding-x) * 2));
  margin-left: calc(-1 * var(--section-padding-x));
  margin-right: calc(-1 * var(--section-padding-x));
  padding: 0 var(--section-padding-x) 15px calc(var(--section-padding-x) + var(--header-padding-left));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  /* 移除 flex-wrap: wrap，改为横向滚动 */
}

.course-browser__subtabs::-webkit-scrollbar {
  display: none;
}

.course-browser__subtab {
  flex: 0 0 auto;
  border: none;
  border-radius: 999px;
  background: #a2a3a9;
  color: #fff;
  font-size: calc(11 / 12 * 1rem);
  line-height: 1;
  font-weight: 500;
  padding: 8px 12px;
  white-space: nowrap;
  cursor: pointer;
}

.course-browser__subtab.is-active {
  background: var(--color-green);
}

/* 二级标签颜色 - 继承父级面板的颜色（按父级面板的 DOM 顺序） */
.course-browser__panels>.course-browser__panel:nth-of-type(1) .course-browser__subtab.is-active {
  background: #4c6397;
}

.course-browser__panels>.course-browser__panel:nth-of-type(2) .course-browser__subtab.is-active {
  background: #89ab5e;
}

.course-browser__panels>.course-browser__panel:nth-of-type(3) .course-browser__subtab.is-active {
  background: #ac4562;
}

.course-browser__panels>.course-browser__panel:nth-of-type(4) .course-browser__subtab.is-active {
  background: #7c91ac;
}

.course-browser__panels>.course-browser__panel:nth-of-type(5) .course-browser__subtab.is-active {
  background: #999dba;
}

.course-browser__panels>.course-browser__panel:nth-of-type(6) .course-browser__subtab.is-active {
  background: #e38e3d;
}

.course-browser__panels>.course-browser__panel:nth-of-type(7) .course-browser__subtab.is-active {
  background: #77818d;
}

.course-browser__panels>.course-browser__panel:nth-of-type(8) .course-browser__subtab.is-active {
  background: #a0a0a8;
}

.course-browser__panels>.course-browser__panel:nth-of-type(9) .course-browser__subtab.is-active {
  background: #a39d8d;
}

.course-browser__subpanel {
  display: none;
}

.course-browser__subpanel.is-active {
  display: block;
}

/* 分页按钮样式 */
.course-browser__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding: 10px 0;
}

.course-browser__pagination-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  color: #ccc;
}

.course-browser__pagination-btn:active {
  background-color: #E0E0E0;
  color: #000;
}

.course-browser__pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.course-browser__pagination-info {
  font-size: 14px;
  color: #666;
  min-width: 50px;
  text-align: center;
}

.course-browser__pagination-current {
  font-weight: 600;
  color: #333;
}

.course-browser__group+.course-browser__group {
  margin-top: 18px;
}

.course-browser__group-title {
  padding-left: 4%;
  margin-bottom: 12px;
  font-size: calc(12 / 12 * 1rem);
  color: var(--color-primary);
  font-weight: 600;
}

.course-browser__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 0;
}

.course-browser__grid::-webkit-scrollbar {
  display: none;
}

.course-browser__grid-page {
  display: none;
}

.course-browser__grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.course-browser__card {
  border-radius: var(--radius);
  background: #f5f5f5;
  overflow: hidden;
  min-height: calc(146 / 12 * 1rem);
}

.course-browser__card-media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 170 / 108;
  padding: 14px 12px 0;
}

.course-browser__card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.course-browser__card-title {
  padding: 0px 10px 14px;
  font-size: calc(13 / 12 * 1rem);
  line-height: 1.35;
  color: #3d3d45;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.course-browser__card a,
.course-browser__card a:hover,
.course-browser__card a:active,
.course-browser__card a:visited,
.course-browser__card-title a,
.course-browser__card-title a:hover,
.course-browser__card-title a:active,
.course-browser__card-title a:visited {
  text-decoration: none !important;
  color: inherit;
}

.course-browser__card a {
  text-decoration: none;
  color: inherit;
}

.course-browser__card a:hover,
.course-browser__card a:active {
  text-decoration: none;
}

.course-browser__empty {
  margin-top: 16px;
  padding-left: 4%;
  font-size: calc(12 / 12 * 1rem);
  color: #999;
}

.course-tutorials__stack {
  position: relative;
  display: flex;
  flex-direction: column;
}

.course-tutorials__item {
  position: relative;
  z-index: 5;
  border-radius: 15px 15px 0 0;
  overflow: hidden;
  transition: z-index 0.25s ease;
}

.course-tutorials__item:not(:first-child) {
  margin-top: -10px;
}

.course-tutorials__item.is-active {
  z-index: 5;
  margin-top: 10px;
  border-radius: 10px;
}

.course-tutorials__item.is-final-item {
  margin-top: -10px;
}

.course-tutorials__trigger {
  position: relative;
  width: 100%;
  height: 60px;
  padding: 0 16px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.course-tutorials__item:nth-child(1) {
  background: #c4a683;
}

.course-tutorials__item:nth-child(2) {
  background: #c2c2b8;
}

.course-tutorials__item:nth-child(2) .course-tutorials__trigger {
  color: #fff;
}

.course-tutorials__item:nth-child(3) {
  background: #a7a397;
}

.course-tutorials__item:nth-child(3) .course-tutorials__trigger {
  color: #fff;
}

.course-tutorials__item:nth-child(4) {
  background: #e2a049;
}

.course-tutorials__trigger-title {
  flex: 1;
  font-size: calc(18 / 12 * 1rem);
  font-weight: 500;
  text-align: left;
}

.course-tutorials__trigger-icon {
  flex-shrink: 0;
  width: auto;
  height: 56%;
  display: block;
  object-fit: contain;
}

.course-tutorials__content {
  position: relative;
  max-height: 0;
  overflow: hidden;
  border-radius: 0 0 10px 10px;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, transform 0.45s ease;
}

.course-tutorials__item.is-active .course-tutorials__content {
  max-height: none;
  opacity: 1;
  transform: translateY(0);
}

.course-tutorials__content-bg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 0 10px 10px;
  object-fit: cover;
}

.course-tutorials__content-overlay {
  position: absolute;
  inset: 0;
  padding: 10% 16px;
  display: flex;
  align-items: flex-start;
}

.course-tutorials__content-overlay p {
  font-size: calc(12 / 12 * 1rem);
  line-height: 1.4;
  color: #fff;
  font-weight: 300;
}

.course-preview__visual {
  border-radius: var(--radius);
  overflow: hidden;
}

.course-preview__img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}