:root {
  color-scheme: light;
  --page-bg: #f6f8fb;
  --ink: #172033;
  --muted: #8a94a6;
  --line: #e7edf4;
  --primary: #0c8ce9;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #edf2f8;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #edf2f8;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.mobile-page {
  width: min(100vw, 480px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--ink);
}

.safe-area {
  padding-bottom: env(safe-area-inset-bottom);
}

.app-header {
  padding: 17px 12px 11px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0;
}

.total-badge {
  flex: 0 0 auto;
  min-width: 43px;
  height: 24px;
  line-height: 24px;
  border-radius: 12px;
  background: #112235;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  margin-top: 13px;
  padding: 0 10px;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: #f7f9fc;
}

.search-icon {
  position: relative;
  width: 11px;
  height: 11px;
  border: 2px solid #8793a4;
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: #8793a4;
  transform: rotate(45deg);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.clear-search {
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 9px 0 8px;
  background: rgba(246, 248, 251, .96);
  border-bottom: 1px solid #e8eef5;
}

.tabs {
  display: flex;
  gap: 9px;
  width: 100%;
  overflow-x: auto;
  padding: 0 9px;
  white-space: nowrap;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 29px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #5d697a;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 3px 10px rgba(23, 32, 51, .05);
}

.tab.active {
  background: var(--primary);
  color: #ffffff;
}

.content {
  padding: 9px 10px 23px;
}

.featured-card {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  height: 191px;
  border: 0;
  border-radius: 8px;
  background: #101828;
  box-shadow: 0 9px 21px rgba(23, 32, 51, .14);
  cursor: pointer;
}

.featured-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 34, 53, .06), rgba(17, 34, 53, .82));
}

.featured-play {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
}

.featured-info {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
}

.featured-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  background: rgba(12, 140, 233, .92);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.featured-title {
  margin-top: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
}

.featured-code {
  margin-top: 4px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 800;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 1px 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.section-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.video-card {
  width: calc((100% - 9px) / 2);
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(23, 32, 51, .07);
  cursor: pointer;
}

.poster {
  position: relative;
  height: 97px;
  overflow: hidden;
  background: #101828;
}

.thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-dot {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
}

.play-triangle {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--primary);
}

.play-triangle.big {
  margin-left: 3px;
  border-top-width: 7px;
  border-bottom-width: 7px;
  border-left-width: 11px;
}

.card-title {
  margin: 7px 7px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.card-meta {
  margin: 4px 7px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.player-shell {
  padding: 11px 10px 0;
}

.player {
  display: block;
  width: 100%;
  height: 204px;
  overflow: hidden;
  border-radius: 8px;
  background: #000000;
  box-shadow: 0 8px 19px rgba(23, 32, 51, .14);
}

.detail-card {
  margin: 11px 10px 22px;
  padding: 13px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 7px 17px rgba(23, 32, 51, .07);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.category {
  display: inline-flex;
  align-items: center;
  max-width: 190px;
  height: 23px;
  padding: 0 8px;
  border-radius: 12px;
  overflow: hidden;
  background: #eaf5ff;
  color: #0c7dcc;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.title {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0;
}

.divider {
  height: 1px;
  margin: 12px 0;
  background: #edf1f5;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 9px;
  border: 0;
  border-radius: 8px;
  background: #f7f9fc;
  color: inherit;
  text-align: left;
}

.copy-icon {
  position: relative;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
}

.copy-back,
.copy-front {
  position: absolute;
  width: 14px;
  height: 16px;
  border: 2px solid var(--primary);
  border-radius: 3px;
  background: #f7f9fc;
}

.copy-back {
  left: 3px;
  top: 2px;
  opacity: .45;
}

.copy-front {
  right: 3px;
  bottom: 2px;
}

.action-copy {
  flex: 1;
  min-width: 0;
}

.action-title {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.action-arrow {
  flex: 0 0 auto;
  color: #a3adba;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
}

.state {
  margin: 23px 10px;
  padding: 60px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 20;
  transform: translateX(-50%);
  min-width: 88px;
  max-width: min(320px, calc(100vw - 48px));
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(17, 32, 51, .92);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

@media (min-width: 481px) {
  .mobile-page {
    box-shadow: 0 18px 60px rgba(23, 32, 51, .14);
  }
}

@media (max-width: 360px) {
  .brand {
    font-size: 19px;
  }

  .featured-card {
    height: 180px;
  }

  .poster {
    height: 90px;
  }
}
