:root {
  --blue: #108df6;
  --text: #292d38;
  --muted: #92979f;
  --page: #effbff;
}

* { box-sizing: border-box; }

html { background: #dfeef2; }

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #dfeef2;
}

button,
input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(100%, 750px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--page);
  box-shadow: 0 0 42px rgba(41, 74, 89, .12);
}

.hero {
  position: relative;
  aspect-ratio: 1500 / 1078;
  overflow: hidden;
}

.hero > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-mark {
  position: absolute;
  left: 7.2%;
  top: 7.05%;
  width: 29.2%;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.intro-section {
  position: relative;
  z-index: 2;
  margin-top: -153px;
  padding: 0 30px;
}

.intro-card {
  position: relative;
  min-height: 560px;
  padding: 98px 31px 24px;
  border-radius: 37px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 5px 22px rgba(75, 135, 159, .025);
}

.intro-heading {
  position: absolute;
  left: 50%;
  top: 0;
  width: 350px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 0 0 43px 43px;
  background: #dff7ff;
  transform: translateX(-50%);
}

.intro-heading img {
  position: absolute;
  width: 322px;
  height: 12px;
  object-fit: fill;
}

.intro-heading h1 {
  position: relative;
  margin: 0;
  padding: 0 22px;
  color: #108df6;
  background: #dff7ff;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.intro-copy {
  color: #596d84;
  font-size: 24px;
  line-height: 1.76;
  letter-spacing: .2px;
  text-align: justify;
}

.intro-copy p { margin: 0; }
.intro-copy p + p { margin-top: 4px; text-indent: 2em; }

.content-section { padding: 44px 30px 35px; }

.category-tabs {
  position: relative;
  height: 78px;
  display: grid;
  grid-template-columns: 1.22fr 1.22fr 1.22fr .72fr 43px;
  align-items: start;
}

.category-tabs::after {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  height: 1px;
  background: #d3e8f3;
  content: "";
}

.tab {
  position: relative;
  height: 77px;
  padding: 0 4px 22px;
  overflow: hidden;
  border: 0;
  color: #596d84;
  background: transparent;
  font-size: 32px;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  color: var(--blue);
  font-weight: 600;
}

.tab.active::after {
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 40px;
  height: 13px;
  background: url("./assets/active-notch.png") center / 40px 13px no-repeat;
  transform: translateX(-50%);
  z-index: 1;
  content: "";
}

.faded-tab {
  text-align: left;
  color: #c5d0d7;
  mask-image: linear-gradient(to right, #000 40%, transparent 92%);
}

.sort-button {
  height: 54px;
  padding: 8px 0 0 3px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sort-button img { width: 29px; height: 26px; }

.search-form {
  height: 76px;
  margin-top: 38px;
  padding: 4px;
  display: grid;
  grid-template-columns: 56px 1fr 118px;
  align-items: center;
  border: 1.5px solid var(--blue);
  border-radius: 40px;
  background: #fff;
}

.search-form > img {
  width: 32px;
  height: 32px;
  margin-left: 18px;
  opacity: .72;
}

.search-form input {
  min-width: 0;
  height: 60px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: #394a5e;
  background: transparent;
  font-size: 26px;
}

.search-form input::placeholder { color: #cfcfcf; opacity: 1; }

.search-form button {
  height: 66px;
  border: 0;
  border-radius: 34px;
  color: #fff;
  background: var(--blue);
  font-size: 27px;
  cursor: pointer;
}

.filter-row {
  margin-top: 31px;
  display: grid;
  grid-template-columns: 104px 1.32fr 1.17fr 1.17fr;
  gap: 14px;
}

.filter {
  height: 56px;
  padding: 0 12px;
  border: 0;
  border-radius: 30px;
  color: #596d84;
  background: #fff;
  font-size: 23px;
  white-space: nowrap;
  cursor: pointer;
}

.filter.active { color: #fff; background: var(--blue); }

.video-list {
  margin-top: 35px;
  padding: 11px 30px 0;
  border-radius: 38px;
  background: #fff;
}

.video-item { padding: 27px 0 29px; }

.video-item + .video-item { border-top: 1px solid #e7eef2; }

.video-item h2 {
  margin: 0 0 25px;
  color: #272a34;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -.3px;
  white-space: nowrap;
}

.video-cover {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #dff5ff;
  cursor: pointer;
}

.video-cover > img {
  display: block;
  width: 100%;
  height: auto;
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(44, 48, 55, .62);
  transform: translate(-50%, -50%);
}

.play-icon::after {
  position: absolute;
  left: 29px;
  top: 22px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 21px solid #fff;
  content: "";
}

.duration {
  position: absolute;
  right: 22px;
  bottom: 15px;
  min-width: 82px;
  padding: 6px 12px 7px;
  border-radius: 23px;
  color: #fff;
  background: rgba(48, 50, 57, .62);
  font-size: 23px;
  line-height: 1;
}

.video-meta {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  color: #9a9da3;
  font-size: 20px;
}

.video-meta p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-meta span {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.video-meta span img { width: 24px; height: 24px; opacity: .7; }

.empty-state {
  margin: 35px 0 0;
  padding: 52px 20px;
  border-radius: 32px;
  color: #8ca0af;
  background: #fff;
  text-align: center;
  font-size: 22px;
}

@media (max-width: 600px) {
  .page-shell { box-shadow: none; }
  .intro-section, .content-section { padding-left: 4vw; padding-right: 4vw; }
  .intro-section { margin-top: -20.4vw; }
  .intro-card {
    min-height: auto;
    padding: clamp(72px, 13.1vw, 98px) 4.2vw clamp(18px, 3.2vw, 24px);
    border-radius: clamp(24px, 4.93vw, 37px);
  }
  .intro-heading {
    width: min(350px, 54vw);
    height: clamp(58px, 9.6vw, 72px);
  }
  .intro-heading img { width: min(322px, 48vw); }
  .intro-heading h1 { font-size: clamp(22px, 4vw, 30px); }
  .intro-copy { font-size: clamp(18px, 3.2vw, 24px); }
  .tab { font-size: clamp(18px, 4.27vw, 32px); }
  .filter-row { gap: 1.8vw; }
  .filter { padding: 0 1vw; font-size: clamp(15px, 3vw, 23px); }
  .video-list { padding-left: 4vw; padding-right: 4vw; }
  .video-item h2 {
    font-size: clamp(20px, 3.75vw, 28px);
    white-space: normal;
  }
}

@media (max-width: 430px) {
  .content-section { padding-top: 32px; }
  .category-tabs { grid-template-columns: 1.22fr 1.22fr 1.22fr .55fr 34px; }
  .category-tabs, .tab { height: 68px; }
  .category-tabs::after { bottom: 10px; }
  .tab { padding-bottom: 18px; }
  .search-form { grid-template-columns: 46px 1fr 91px; height: 64px; }
  .search-form input { font-size: 18px; }
  .search-form button { height: 54px; font-size: 20px; }
  .filter-row { grid-template-columns: 74px 1.25fr 1.1fr 1.1fr; }
  .filter { height: 48px; }
  .video-list { border-radius: 28px; }
  .video-meta { font-size: 15px; }
}

@media (max-width: 360px) {
  .intro-copy { font-size: 16px; line-height: 1.68; }
  .category-tabs { grid-template-columns: 1fr 1fr 1fr .42fr 30px; }
  .tab { font-size: 16px; }
  .search-form { grid-template-columns: 40px 1fr 76px; }
  .search-form > img { width: 26px; height: 26px; margin-left: 11px; }
  .search-form input { padding: 0 7px; font-size: 16px; }
  .search-form button { font-size: 18px; }
  .filter-row { grid-template-columns: 62px 1.25fr 1.1fr 1.1fr; }
  .filter { font-size: 13px; }
  .video-list { padding-left: 16px; padding-right: 16px; }
  .video-meta { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
