* {
  box-sizing: border-box;
}

:root {
  --red: #e51616;
  --red-dark: #c70000;
  --orange: #f16922;
  --ink: #151515;
  --muted: #666;
  --line: #ead8d2;
  --pale: #fff5f2;
  --card: rgba(255, 255, 255, 0.78);
  --wrap: 1000px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 222, 211, 0.75), rgba(255, 255, 255, 0) 260px),
    linear-gradient(180deg, #fff5f0 0, #fff 260px);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input {
  font: inherit;
}

.home-wrap {
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
}

.home-header {
  height: 54px;
}

.mobile-header-search {
  display: none;
}

.nav-wrap {
  width: min(1200px, calc(100% - 32px));
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  width: 92px;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: #111;
  font-size: 15px;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav .active {
  color: var(--red-dark);
  font-weight: 700;
}

.top-nav a:hover {
  font-weight: 700;
}

.hero {
  padding: 42px 0 34px;
}

.hero h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.28;
  letter-spacing: 0;
}

.hero-desc {
  margin: 10px 0 18px;
  color: #333;
  font-size: 15px;
}

.search-bar {
  width: 100%;
  display: grid;
  grid-template-columns: 640px 125px 235px;
  gap: 0;
}

.search-bar input {
  position: relative;
  z-index: 1;
  height: 50px;
  padding: 0 18px;
  border: 2px solid var(--red);
  border-radius: 14px;
  outline: none;
  background: #fff;
  font-size: 15px;
}

.search-bar button,
.search-bar a {
  height: 50px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 18px;
  font-weight: 400;
}

.search-bar button {
  margin-left: -12px;
  padding: 0 24px 0 28px;
  border-radius: 0 14px 14px 0;
  cursor: pointer;
  white-space: nowrap;
}

.search-bar a {
  margin-left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 12px 12px 7px 12px;
  white-space: nowrap;
}

.hot-search {
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #333;
}

.hot-search a {
  color: #333;
  transition: color 0.2s ease;
}

.hot-search a:hover {
  color: #ad0800;
}

.stats-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stats-grid div {
  min-height: 84px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 244, 241, 0.96), rgba(255, 255, 255, 0.72));
}

.stats-grid strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.stats-grid span {
  display: block;
  margin-top: 5px;
  color: #222;
}

.home-section {
  padding: 28px 0 34px;
}

.section-title {
  margin-bottom: 16px;
  border-bottom: 1px solid #d9d9d9;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  margin: 0 0 -1px;
  padding-bottom: 8px;
  font-size: 20px;
  line-height: 1.25;
}

.section-title h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 58px;
  height: 4px;
  background: var(--red);
}

.section-title p {
  margin: 12px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.topic-tags a,
.solution-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 5px 16px;
  border: 1px solid #f1cfc7;
  border-radius: 7px;
  background: #fff2ef;
  color: #2a2a2a;
  font-size: 15px;
}

.topic-tags a:hover {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #f22121 0%, #cd1818 100%);
}

.more-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  font-size: 15px;
  color: #1d1d1d;
}

.expert-grid,
.course-grid,
.intent-grid,
.solution-grid,
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 26px;
}

.expert-card,
.course-card,
.intent-grid a,
.solution-card,
.knowledge-grid a {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 250, 248, 0.98), rgba(255, 255, 255, 0.76));
}

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

.intent-grid a {
  display: block;
  min-height: 112px;
  padding: 16px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.intent-grid strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.intent-grid span {
  display: block;
  color: #555;
  font-size: 13px;
  line-height: 1.55;
}

.intent-grid em {
  display: inline-block;
  margin-top: 10px;
  color: var(--red-dark);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.expert-card {
  min-height: 108px;
  padding: 12px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
}

.expert-card > img {
  width: 78px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.expert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.expert-head h3,
.course-card h3,
.solution-grid h3,
.knowledge-grid h3 {
  margin: 0;
  line-height: 1.35;
}

.expert-head h3 {
  font-size: 18px;
  transition: color 0.2s ease;
}

.course-card h3,
.solution-grid h3,
.knowledge-grid h3 {
  font-size: 16px;
}

.knowledge-grid h3 {
  transition: color 0.2s ease;
}

.course-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.course-card h3 a:focus-visible {
  color: #ad0800;
  outline: none;
}

@media (hover: hover) and (pointer: fine) {
  .expert-card:hover .expert-head h3 {
    color: #ad0800;
  }

  .course-card h3 a:hover {
    color: #ad0800;
  }

  .intent-grid a:hover {
    border-color: #efb9ad;
    background: linear-gradient(145deg, rgba(255, 245, 241, 1), rgba(255, 255, 255, 0.88));
    transform: translateY(-1px);
  }

  .intent-grid a:hover strong,
  .solution-card:hover h3 {
    color: #ad0800;
  }

  .knowledge-grid a:hover h3 {
    color: #ad0800;
  }

  .solution-grid span:hover {
    color: #ad0800;
  }
}

.expert-head span {
  flex: 0 0 auto;
  color: #333;
  font-size: 12px;
}

.expert-head span::before {
  content: "⌖ ";
  color: #777;
}

.expert-info strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.expert-info p,
.course-card p,
.solution-grid p {
  margin: 5px 0 0;
  color: #555;
  font-size: 14px;
  line-height: 1.55;
}

.knowledge-grid p {
  margin: 5px 0 0;
  color: #555;
  font-size: 14px;
  line-height: 1.55;
}

.course-card {
  min-height: 118px;
  padding: 16px;
}

.course-card > div {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.course-card span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: #555;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.course-card span img {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
}

.course-teacher-link {
  flex: 0 0 auto;
  color: #555;
  font-size: 15px;
  font-weight: 400;
}

.course-card span em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
}

.course-card > div > a {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 6px;
  color: #fff;
  background: var(--red);
  font-size: 14px;
  font-weight: 400;
}

.solution-card {
  display: block;
  min-height: 118px;
  padding: 18px 18px 16px;
  cursor: pointer;
}

.solution-card div {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.solution-grid span {
  min-height: 24px;
  padding: 3px 10px;
  border: 0;
  font-size: 12px;
  transition: color 0.2s ease;
}

.knowledge-grid a {
  min-height: 86px;
  padding: 18px;
}

.about-section {
  padding-bottom: 28px;
}

.about-section p {
  max-width: 760px;
  margin: 0 0 12px;
  color: #222;
  font-size: 15px;
}

.faq-list summary,
.faq-list p {
  font-size: 15px;
}

.footer {
  background: #000;
  padding: 50px 0 30px;
  margin-top: 40px;
}

.footer-content {
  max-width: 1443px;
  margin: 0 auto;
  padding: 0 121px;
}

.footer-intro {
  margin-bottom: 15px;
}

.footer-intro p {
  margin: 0;
  font-size: 14px;
  color: #7d7d7d;
  line-height: 1.8;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: #333;
  margin-bottom: 20px;
}

.footer-section-block {
  margin-bottom: 20px;
}

.footer-section-title {
  margin: 0 0 12px;
  color: #908f8f;
  font-size: 14px;
  font-weight: 700;
}

.footer-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.footer-tag {
  margin-right: 30px;
  margin-bottom: 8px;
  color: #908f8f;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-tag:hover {
  color: #fff;
}

.footer-desc {
  margin: 0 0 8px;
  color: #908f8f;
  font-size: 13px;
  line-height: 1.8;
}

.footer-bottom {
  max-width: 1443px;
  margin: 0 auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 23px;
}

.footer-bottom p {
  margin: 0;
  color: #7d7d7d;
  font-size: 14px;
}

.footer-copyright,
.footer-beian {
  text-align: left;
}

.footer-beian {
  white-space: nowrap;
}

.beian-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin: 0 4px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  position: relative;
  width: 265px;
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  background: #fff;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.5);
}

.modal-top {
  position: relative;
  height: 153px;
  padding: 21px 21px 0;
  box-sizing: border-box;
  overflow: hidden;
  background: #c62828;
  border-radius: 16px 16px 0 0;
}

.modal-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 265px;
  height: 153px;
  display: block;
}

.modal-title {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
}

.modal-tip {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.modal-qrcode-wrap {
  position: relative;
  z-index: 2;
  width: 190px;
  height: 189px;
  margin: -60px auto 0;
}

.modal-qrcode-img {
  width: 190px;
  height: 189px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.modal-bottom {
  padding: 15px 12px 20px;
  border-radius: 0 0 16px 16px;
  background: #fff;
  display: flex;
  justify-content: center;
  text-align: center;
}

.modal-note {
  margin: 0;
  color: #131313;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .home-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    height: auto;
    padding: 0;
    margin: 0;
    background: #fff;
    box-shadow: none;
  }

  .mobile-header-search {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 10px;
    background: #fff;
  }

  .mobile-search-box {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 2px;
    overflow: hidden;
    border-radius: 13px;
    background: linear-gradient(135deg, #b80d0d 0%, #ea1d1d 85%, #ed6525 100%);
  }

  .mobile-search-inner {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    overflow: hidden;
    border-radius: 11px;
    background: #fff;
  }

  .mobile-search-logo {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 4px;
    object-fit: cover;
  }

  .mobile-search-input {
    min-width: 0;
    flex: 1;
    height: 100%;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #000;
    font-size: 16px;
    border-radius: 10px;
  }

  .mobile-search-input::placeholder {
    color: #c2bfbf;
    font-size: 16px;
  }

  .mobile-search-btn {
    flex: 0 0 68px;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
  }

  .nav-wrap {
    width: 100%;
    height: auto;
    padding: 0 13px;
    align-items: center;
    justify-content: center;
    background: #fff;
  }

  .logo {
    display: none;
  }

  .top-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0;
    overflow: visible;
  }

  .top-nav a {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 10px 0;
    font-size: 15px;
    line-height: 1;
  }

  main {
    padding-top: 104px;
  }

  .hero {
    padding: 20px 0 24px;
  }

  .hero h1 {
    font-size: 16px;
  }

  .search-bar {
    display: none;
  }

  .hot-search {
    display: none;
  }

  .expert-grid,
  .course-grid,
  .intent-grid,
  .solution-grid,
  .knowledge-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .stats-grid {
    margin-top: 28px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .stats-grid::-webkit-scrollbar {
    display: none;
  }

  .stats-grid div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 158px;
    min-width: 158px;
    min-height: 86px;
    padding: 14px 20px;
    scroll-snap-align: start;
  }

  .stats-grid strong {
    font-size: 20px;
  }

  .home-section {
    padding: 20px 0 24px;
  }

  .footer {
    margin-top: 30px;
    padding: 30px 0 0;
  }

  .footer-content {
    padding-left: 13px;
    padding-right: 13px;
  }

  .footer-section-title {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .footer-tag {
    width: auto;
    margin-right: 18px;
    margin-bottom: 10px;
    font-size: 13px;
  }

  .footer-tags-hot .footer-tag {
    width: auto;
  }

  .footer-intro p,
  .footer-desc {
    font-size: 13px;
  }

  .footer-section-block {
    margin-bottom: 16px;
  }

  .footer-bottom {
    padding-top: 10px;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .footer-divider {
    margin-bottom: 12px;
  }

  .footer-bottom p {
    margin-bottom: 4px;
    text-align: center;
    font-size: 13px;
  }

  .footer-copyright,
  .footer-beian {
    text-align: center;
    white-space: normal;
  }

  .beian-icon {
    margin: 0 2px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 13px;
  }

  .hero h1 {
    font-size: 16px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .expert-card {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .expert-card > img {
    width: 66px;
    height: 66px;
  }

  .course-card > div {
    align-items: center;
    flex-direction: row;
  }

  .course-card > div > a {
    display: none;
  }

  .topic-tags {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, 34px);
    grid-auto-columns: max-content;
    gap: 10px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .topic-tags::-webkit-scrollbar {
    display: none;
  }

  .topic-tags a {
    font-size: 14px;
    min-height: 34px;
    padding: 4px 12px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .topic-tags a:hover {
    border-color: #f1cfc7;
    color: #2a2a2a;
    background: #fff2ef;
  }
}
