:root {
  --bg: #0a0c11;
  --panel: #141821;
  --panel-2: #1b2130;
  --line: #262e3e;
  --text: #e9edf5;
  --dim: #8892a6;
  --dim-2: #5f6a80;
  --brand: #fb7299;
  --brand-2: #a06cf5;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(1100px 520px at 12% -8%, rgba(251, 114, 153, 0.14), transparent 62%),
    radial-gradient(900px 480px at 88% -4%, rgba(160, 108, 245, 0.13), transparent 60%);
  background-repeat: no-repeat;
  min-height: 100vh;
}

/* ---------------------------------------------------------------- 顶栏 */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(14px, 4vw, 34px);
  background: rgba(10, 12, 17, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.brand .dot {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 16px rgba(251, 114, 153, 0.35);
}

.brand small {
  color: var(--dim-2);
  font-size: 11px;
  font-weight: 500;
  margin-left: 2px;
}

.search {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  max-width: 520px;
}

.search input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: 0.2s;
}

.search input::placeholder { color: var(--dim-2); }
.search input:focus {
  border-color: rgba(251, 114, 153, 0.6);
  background: var(--panel-2);
  box-shadow: 0 0 0 3px rgba(251, 114, 153, 0.12);
}

.search .ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim-2);
  font-size: 13px;
  pointer-events: none;
}

.acts { display: flex; gap: 8px; flex: 0 0 auto; }

.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.18s;
  font-family: inherit;
}

.btn:hover { background: var(--panel-2); border-color: #38425a; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.on { border-color: rgba(251, 114, 153, 0.55); color: var(--brand); }

/* ---------------------------------------------------------------- 分类条 */

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px clamp(14px, 4vw, 34px) 4px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--dim);
  font-size: 13.5px;
  cursor: pointer;
  transition: 0.18s;
  white-space: nowrap;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab:hover { color: var(--text); border-color: #38425a; }

.tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 18px rgba(251, 114, 153, 0.3);
}

.tab .n {
  font-size: 11px;
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- 主体 */

main { padding: 16px clamp(14px, 4vw, 34px) 60px; }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim-2);
  font-size: 12.5px;
  margin: 4px 0 16px;
  min-height: 18px;
  flex-wrap: wrap;
}
.status .sep { opacity: 0.35; }
.status .warn { color: #e8b04b; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.22s, box-shadow 0.22s;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card:hover {
  transform: translateY(-5px);
  border-color: #39435c;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel-2);
  overflow: hidden;
  flex: 0 0 auto;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
  background: var(--panel-2);
}

.card:hover .cover img { transform: scale(1.06); }

.cover .dur,
.cover .views {
  position: absolute;
  bottom: 7px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
}
.cover .dur { right: 7px; }
.cover .views { left: 7px; }

.cover .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.22s;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(251, 114, 153, 0.22));
}
.card:hover .cover .play { opacity: 1; }

.cover .play span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(251, 114, 153, 0.92);
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #fff;
  padding-left: 3px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

.info { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1 1 auto; min-width: 0; }

.info h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.44;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.info .sub {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--dim-2);
  margin-top: auto;
  min-width: 0;
}

.info .sub .up {
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 0 1 auto;
}

.info .sub .tag {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
  font-size: 10.5px;
  line-height: 16px;
}

/* ---------------------------------------------------------------- 加载态 */

.skel {
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
}
.skel .b {
  background: linear-gradient(90deg, #161b26 25%, #1e2533 37%, #161b26 63%);
  background-size: 400% 100%;
  animation: sh 1.4s ease infinite;
}
.skel .b1 { aspect-ratio: 16 / 9; }
.skel .b2 { height: 13px; margin: 12px 12px 0; border-radius: 5px; }
.skel .b3 { height: 13px; margin: 8px 12px 0; width: 62%; border-radius: 5px; }
.skel .b4 { height: 10px; margin: 12px 12px 14px; width: 45%; border-radius: 5px; }

@keyframes sh {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  color: var(--dim-2);
  font-size: 14px;
  line-height: 2;
}

.more {
  display: flex;
  justify-content: center;
  padding: 34px 0 0;
}

/* ---------------------------------------------------------------- 播放弹层 */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: clamp(10px, 3vw, 34px);
  background: rgba(5, 7, 11, 0.88);
  backdrop-filter: blur(12px);
  animation: fade 0.18s ease;
}
.modal[hidden] { display: none; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal .bar {
  width: min(1200px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.modal .bar h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.modal .bar .meta { color: var(--dim-2); font-size: 12px; font-weight: 400; }

.player {
  width: min(1200px, 100%);
  aspect-ratio: 16 / 9;
  max-height: 76vh;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.player iframe { width: 100%; height: 100%; border: 0; display: block; }

.modal .tip { color: var(--dim-2); font-size: 12px; }

@media (max-width: 720px) {
  .top { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .brand { font-size: 17px; }
  .search { order: 3; flex: 1 0 100%; max-width: none; }
  .acts { margin-left: auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
  .info { padding: 9px 10px 11px; }
  .info h3 { font-size: 13px; }
  .modal { padding: 8px; }
  .modal .bar { padding: 0 4px; }
  .modal .bar h2 { font-size: 13.5px; }
  .player { border-radius: 8px; }
}
