:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --line: #e7e9ee;
  --text: #14161a;
  --muted: #7d8492;
  --accent: #16181d;
  --topbar: #c2175b;
  --topbar-line: #a91250;
  --header-h: 56px;
  --radius: 14px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* 固定顶栏 */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: var(--topbar);
  color: #ffffff;
  border-bottom: 1px solid var(--topbar-line);
}

.topbar-inner {
  height: var(--header-h);
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
}

.count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

/* 内容区 */
.feed {
  max-width: 880px;
  margin: 0 auto;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 14px) 0 32px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(17, 20, 28, 0.03);
}

/* 手机端：视频贴满屏宽，去掉左右描边 */
@media (max-width: 719px) {
  .card {
    border-left: 0;
    border-right: 0;
  }
}

.card-title {
  margin: 0;
  padding: 13px 14px 9px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.player {
  position: relative;
  background: #0b0c0f;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.player video {
  display: block;
  width: 100%;
  height: 100%;
  background: #0b0c0f;
  object-fit: contain;
  -webkit-tap-highlight-color: transparent;
}

.play-cover {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.play-cover .ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(10, 12, 16, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.play-cover .ring svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.play-cover:active .ring {
  transform: scale(0.94);
  background: rgba(10, 12, 16, 0.72);
}

.play-cover.is-hidden {
  display: none;
}

/* 占位 / 空态 */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 64px 24px;
}

.empty-icon {
  font-size: 26px;
  color: #c8ccd4;
  margin-bottom: 8px;
}

.empty p { margin: 4px 0; font-size: 15px; color: var(--text); }
.empty-hint { font-size: 13px !important; color: var(--muted) !important; }

.load-more {
  display: block;
  width: 100%;
  padding: 13px;
  margin: 4px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  -webkit-appearance: none;
}

.load-more:active { background: #f2f3f6; }

.loading {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #dfe2e8;
  border-top-color: #8a91a0;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* 骨架 */
.skeleton {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  margin-bottom: 16px;
  overflow: hidden;
}

.skeleton .s-title {
  height: 18px;
  width: 45%;
  margin: 15px 14px 12px;
  border-radius: 4px;
  background: #f0f2f5;
}

.skeleton .s-video {
  aspect-ratio: 16 / 9;
  background: #eff1f5;
}

.foot {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 16px calc(28px + env(safe-area-inset-bottom));
}

@media (min-width: 720px) {
  .feed { padding-left: 24px; padding-right: 24px; }
  .card-title { font-size: 17px; padding: 15px 18px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
