* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 0rem;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
  -webkit-touch-callout: none;
  -o-user-select: none;
  user-select: none;
}

html {
  font-size: calc(100vw / 3.75);
  font-size: min(calc(100vw / 3.75), 128px);
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: #0a0a0f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

@media screen and (min-width: 481px) {
  body {
    background: #050508;
  }
  #app {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.55);
  }
}

#app {
  width: 100%;
  height: 100%;
  background: #0a0a0f;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

.wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  width: 100%;
  background: #0a0a0f;
}

.wrap #mse {
  height: 2.1rem;
}

.wrap .ds-title {
  font-size: 0.14rem;
  padding: 0.1rem 0;
  background: var(--text-bgc);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.wrap .ds-title span {
  color: var(--text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  padding: 0 0.1rem;
  font-weight: 600;
  text-align: center;
}

.wrap header {
  overflow: hidden;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 0.1rem 0.12rem;
  font-size: 0.12rem;
  /* 分类栏与视频内容连体自然滚动，不做吸顶、不自动隐藏 */
  position: relative;
  background: var(--background);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.wrap header .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.15rem;
  gap: 0.08rem;
}

.wrap header .top .top-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
  background: transparent;
}

.wrap header .top .top-logo img {
  height: 0.46rem;
  width: auto;
  max-width: 1.2rem;
  object-fit: contain;
  display: block;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* 未生成透明 PNG 时，深色顶栏下去白底 */
.wrap header .top .top-logo img.logo-blend-dark {
  mix-blend-mode: darken;
}

.wrap header .top .input-text {
  background: rgba(8, 8, 14, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.42);
  height: 0.34rem;
  border-radius: 0.2rem;
  padding: 0 0.14rem;
  flex: 1;
  font-size: 0.13rem;
  color: #f5f0e6;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.25);
}

.wrap header .top .input-text::placeholder {
  color: rgba(212, 175, 55, 0.55);
}

.wrap header .top .color-ff {
  color: #f5f0e6 !important;
}

.wrap header .top .btn-search {
  padding: 0.06rem 0.14rem;
  color: #1a1a1a;
  background: linear-gradient(135deg, #e8c547 0%, #d4af37 50%, #aa8c2c 100%);
  border: 1px solid rgba(212, 175, 55, 0.75);
  border-radius: 0.2rem;
  font-weight: 700;
  font-size: 0.13rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

.wrap header .menu {
  font-size: 0;
  margin-top: 0.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.06rem;
}

.wrap header .menu .item {
  font-weight: 600;
  display: inline-block;
  font-size: 0.13rem;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.05rem 0.1rem;
  text-align: center;
  border-radius: 0.16rem;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.wrap header .menu .active {
  background: linear-gradient(135deg, #e8c547, #d4af37);
  color: #1a1a1a;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.35);
}

.wrap header .menu .item-today {
  background: linear-gradient(135deg, rgba(232, 197, 71, 0.28), rgba(212, 175, 55, 0.22));
  border: 1px solid rgba(212, 175, 55, 0.55);
  color: #f5d78c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.wrap header .menu .item-today.active {
  background: linear-gradient(135deg, #e8c547, #d4af37);
  color: #1a1a1a;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.35);
}

.wrap header .menu .bgc {
  background: linear-gradient(135deg, #e8c547, #c9a227);
  color: #1a1a1a;
  border-radius: 0.16rem;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

.wrap section {
  flex: 1;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: #0a0a0f;
  padding: 0;
  width: 100%;
}

.wrap section .van-clearfix {
  box-sizing: border-box;
}

/* 一排两个 */
.wrap section .video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.08rem;
  padding: 0.06rem;
  width: 100%;
  box-sizing: border-box;
}

.wrap .van-pull-refresh__track {
  background: #0a0a0f;
}

.wrap .van-list__finished-text,
.wrap .van-list__loading {
  color: rgba(212, 175, 55, 0.65);
  background: transparent;
}

.wrap section .list-item {
  float: none;
  width: 100%;
  margin-bottom: 0;
  border-radius: 0.1rem;
  overflow: hidden;
  background: #14141c;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
}

.wrap section .list-item:active {
  transform: scale(0.98);
}

.wrap section .list-item .img-wrap {
  height: 1.4rem;
  position: relative;
  overflow: hidden;
  border-radius: 0.1rem 0.1rem 0 0;
  flex-shrink: 0;
  width: 100%;
  z-index: 1;
}

.wrap section .list-item .img-wrap .thumb {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.wrap section .list-item .img-wrap .thumb .times {
  position: absolute;
  left: 0.08rem;
  top: 0.08rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 0.02rem 0.08rem;
  border-radius: 0.1rem;
  font-size: 0.1rem;
  z-index: 1;
  backdrop-filter: blur(4px);
}

.wrap section .list-item .img-wrap .thumb img {
  height: 100%;
  object-fit: cover;
}

.wrap section .list-item .img-wrap .img-tips-left {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0.2rem 0.08rem 0.06rem;
  display: flex;
  justify-content: space-between;
}

.wrap section .list-item .img-wrap .img-tips-left span {
  font-size: 0.11rem;
  color: #fff;
}

.wrap section .list-item .video-title {
  background: #14141c;
  color: #e8e4dc;
  font-size: 0.12rem;
  line-height: 1.4;
  font-weight: 600;
  overflow: hidden;
  padding: 0.08rem 0.1rem;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  word-break: break-all;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 0 0 0.1rem 0.1rem;
  /* 严格两行高度，第三行不显示 */
  height: calc(0.12rem * 1.4 * 2 + 0.16rem);
  max-height: calc(0.12rem * 1.4 * 2 + 0.16rem);
}

.wrap section .mt20 {
  margin-bottom: 0;
}

.wrap section::-webkit-scrollbar {
  width: 0 !important;
}

.wrap .foot {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 0.5rem;
  font-size: 0.14rem;
  color: rgba(255, 255, 255, 0.9);
  background: var(--background);
  font-weight: 600;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.wrap .foot .btn {
  color: #fff;
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  border-radius: 0.2rem;
  padding: 0.06rem 0.2rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  white-space: nowrap;
  flex-shrink: 0;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.dialog {
  z-index: 1002;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-height: 92vh;
  min-height: auto;
  overflow: hidden;
  font-size: 0.14rem;
  display: flex;
  flex-direction: column;
  transform: translate3d(-50%, -50%, 0);
  backface-visibility: hidden;
  transition: 0.3s;
  transition-property: transform, opacity;
  border-radius: 0.14rem;
  background: #fff;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.dialog .video-img {
  display: flex;
  width: 100%;
  height: 1.15rem;
  flex-shrink: 0;
  background-color: #0f172a;
}

.dialog .video {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.dialog .video .video-title {
  padding: 0.08rem 0;
  flex-shrink: 0;
  background: var(--background);
}

.dialog .video .video-title span {
  font-size: 0.13rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  padding: 0 0.12rem;
  font-weight: 600;
  line-height: 1.35;
}

.dialog .video .video-list {
  text-align: center;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  padding: 0.08rem 0.1rem;
  gap: 0.06rem;
}

.dialog .video .video-list .video-item {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  width: 90%;
  border-radius: 0.18rem;
  padding: 0.07rem 0.08rem;
  margin: 0;
  color: #fff;
  font-weight: 600;
  font-size: 0.13rem;
  line-height: 1.4;
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.3);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.dialog .video .video-list .video-item:active {
  transform: scale(0.97);
}

.dialog .video .tip {
  padding: 0.1rem 0.14rem;
}

.dialog .video .tip .tip-wrap {
  padding: 0.12rem 0.16rem;
  font-size: 0.13rem;
  border-radius: 0.12rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid #e2e8f0;
}

.dialog .video .tip .tip-wrap .tip-title {
  font-size: 0.13rem;
  color: #ef4444;
  font-weight: 600;
}

.dialog .video .tip .tip-wrap .tip-item {
  margin-top: 0.1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.08rem;
  overflow: hidden;
}

.dialog .video .tip .tip-wrap .tip-item .tip-item-title {
  user-select: text;
  padding: 0.06rem 0.2rem;
  border: 1px solid #e2e8f0;
  border-right: none;
  height: 0.34rem;
  line-height: 0.22rem;
  background: #fff;
  font-size: 0.12rem;
  color: #475569;
}

.dialog .video .tip .tip-wrap .tip-item .copy {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  padding: 0.06rem 0.14rem;
  height: 0.34rem;
  line-height: 0.22rem;
  font-size: 0.12rem;
  font-weight: 600;
}

.dialog .dialog-footer {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
}

.dialog .dialog-footer .qrcode,
.dialog .dialog-footer .login,
.dialog .dialog-footer .tgm {
  padding: 0.1rem 0.05rem;
  color: #fff;
  flex: 1;
  font-weight: 600;
  font-size: 0.13rem;
}

.dialog .dialog-footer .qrcode {
  background: #3b82f6;
}

.dialog .dialog-footer .login {
  background: #6366f1;
}

.dialog .dialog-footer .tgm {
  background: #10b981;
}

.dialog .dialog-footer .close {
  padding: 0.1rem 0.05rem;
  background: #f1f5f9;
  color: #64748b;
  flex: 1;
  font-weight: 600;
  font-size: 0.13rem;
}

.qrcode-dialog {
  z-index: 1002;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 2.8rem;
  overflow: hidden;
  font-size: 0.16rem;
  transform: translate3d(-50%, -50%, 0);
  backface-visibility: hidden;
  transition: 0.3s;
  border-radius: 0.16rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.qrcode-dialog .item {
  background: var(--background);
  border-radius: 0.16rem;
}

.qrcode-dialog .item .title {
  text-align: center;
  font-size: 0.16rem;
  font-weight: 700;
  color: #fff;
  height: 0.5rem;
  line-height: 0.5rem;
}

.qrcode-dialog .item .line {
  width: 80%;
  margin: 0 auto;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
}

.qrcode-dialog .item .qrcode-img {
  width: 100%;
  padding: 0.2rem 0.3rem;
}

.qrcode-dialog .close {
  margin-top: 0.12rem;
  font-size: 0.35rem;
  color: #fff;
  text-align: center;
}

.login-dialog {
  z-index: 1002;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 2.8rem;
  overflow: hidden;
  font-size: 0.16rem;
  transform: translate3d(-50%, -50%, 0);
  backface-visibility: hidden;
  transition: 0.3s;
  border-radius: 0.16rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.login-dialog .item {
  background: #fff;
  border-radius: 0.16rem;
  overflow: hidden;
}

.login-dialog .item .title {
  text-align: center;
  font-size: 0.16rem;
  color: #fff;
  height: 0.48rem;
  line-height: 0.48rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  font-weight: 700;
}

.login-dialog .item .form-item {
  height: auto;
  min-height: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 0.2rem 0.16rem;
  gap: 0.08rem;
}

.login-dialog .item .form-item .form-label {
  height: 0.36rem;
  line-height: 0.36rem;
  color: #6366f1;
  font-weight: 700;
  font-size: 0.14rem;
}

.login-dialog .item .form-item input {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  height: 0.36rem;
  padding: 0 0.12rem;
  flex: 1;
  line-height: 0.36rem;
  border-radius: 0.1rem;
  font-size: 0.14rem;
  color: #1e293b;
}

.login-dialog .item .form-item input:focus {
  border-color: #6366f1;
  outline: none;
}

.login-dialog .item .login-dialog-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.12rem 0.16rem 0.2rem;
  background: #fff;
  gap: 0.12rem;
}

.login-dialog .item .login-dialog-footer .login-close {
  padding: 0.1rem;
  background: #f1f5f9;
  color: #64748b;
  flex: 1;
  text-align: center;
  border-radius: 0.1rem;
  font-weight: 600;
}

.login-dialog .item .login-dialog-footer .login-sum {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  padding: 0.1rem;
  color: #fff;
  flex: 1;
  text-align: center;
  border-radius: 0.1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
