/* ========================================
   主题 Token：浅色 / 深色
   通过 <html data-theme="light|dark"> 切换
   ======================================== */

:root,
[data-theme="dark"] {
  /* 品牌色 */
  --primary: #0D7377;
  --primary-dark: #14505A;
  --primary-light: #32A59A;
  --accent: #00CEC9;
  --accent-warm: #FDCB6E;

  /* 背景：深色模式统一纯黑系（与积分中心等新页一致） */
  --bg-page: #000000;
  --bg-dark: #000000; /* 兼容旧变量名 */
  --bg-card: #1c1c1e;
  --bg-card-hover: #2c2c2e;
  --bg-elevated: #2a2a2a;
  --bg-muted: #141414;
  --bg-input: #1c1c1e;
  --bg-overlay: rgba(0, 0, 0, 0.55);

  /* 文字 */
  --text-primary: #FFFFFF;
  --text-secondary: #aeaeb2;
  --text-muted: #8e8e93;
  --text-inverse: #000000;

  /* 边框 / 分割 */
  --border-color: rgba(255, 255, 255, 0.12);
  --divider: rgba(255, 255, 255, 0.08);

  /* 阴影 */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 20px rgba(0, 206, 201, 0.25);
  --shadow-tabbar: 0 -4px 24px rgba(0, 0, 0, 0.45);

  --gradient-ocean: linear-gradient(135deg, #1c1c1e 0%, #0a0a0a 50%, #000000 100%);
  --tabbar-bg: rgba(0, 0, 0, 0.94);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="light"] {
  --primary: #0D7377;
  --primary-dark: #0A5C5F;
  --primary-light: #1A9B95;
  --accent: #0D9B96;
  --accent-warm: #E6A23C;

  --bg-page: #F3F6F6;
  --bg-dark: #F3F6F6;
  --bg-card: #FFFFFF;
  --bg-card-hover: #EEF4F4;
  --bg-elevated: #FFFFFF;
  --bg-muted: #E8EEEE;
  --bg-input: #FFFFFF;
  --bg-overlay: rgba(10, 22, 22, 0.45);

  --text-primary: #142424;
  --text-secondary: #3D5C5C;
  --text-muted: #7A9999;
  --text-inverse: #FFFFFF;

  --border-color: rgba(20, 36, 36, 0.1);
  --divider: rgba(20, 36, 36, 0.06);

  --shadow-card: 0 8px 28px rgba(13, 115, 119, 0.1);
  --shadow-glow: 0 0 16px rgba(13, 115, 119, 0.18);
  --shadow-tabbar: 0 -4px 20px rgba(20, 36, 36, 0.08);

  --gradient-ocean: linear-gradient(135deg, #0D7377 0%, #32A59A 55%, #E8F4F3 100%);
  --tabbar-bg: rgba(255, 255, 255, 0.94);
}

/* 字号 Token */
:root {
  --font-xs: 12px;
  --font-sm: 13px;
  --font-md: 14px;
  --font-lg: 16px;
  --font-xl: 18px;
  --font-2xl: 22px;
  --font-3xl: 28px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  --header-height: 70px;
  --tabbar-height: 56px;
  --container-max: 1400px;
  --sidebar-width: 300px;
}

/* 主题过渡（避免闪烁过猛，仅颜色） */
html {
  color-scheme: dark;
}
html[data-theme="light"] {
  color-scheme: light;
}

body {
  background: var(--bg-page);
  color: var(--text-primary);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ========== 底部三栏（写死：首页 / 排行榜 / 我的） ========== */
.app-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  height: calc(var(--tabbar-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--tabbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  box-shadow: var(--shadow-tabbar);
}

.app-tabbar__inner {
  display: flex;
  height: var(--tabbar-height);
  max-width: 560px;
  margin: 0 auto;
}

.app-tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: var(--font-xs);
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}

.app-tabbar__item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.app-tabbar__item.active {
  color: var(--accent);
}

.app-tabbar__item:active {
  opacity: 0.75;
}

@media (max-width: 768px) {
  .app-tabbar {
    display: block;
  }

  body.has-tabbar {
    padding-bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 8px);
  }

  /* 移动端弱化传统页脚，避免与底栏重复 */
  body.has-tabbar .footer {
    display: none;
  }
}

/* ========== 设置页 ========== */
.settings-page {
  min-height: 60vh;
  padding: calc(var(--header-height) + var(--space-lg)) 0 var(--space-2xl);
}

.settings-page__title {
  font-size: var(--font-2xl);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.settings-group {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.settings-group__label {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-xs);
  color: var(--text-muted);
  background: var(--bg-muted);
  border-bottom: 1px solid var(--divider);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--divider);
  color: var(--text-primary);
  font-size: var(--font-md);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row--link {
  cursor: pointer;
}

.settings-row--link:active {
  background: var(--bg-card-hover);
}

.settings-row__hint {
  color: var(--text-muted);
  font-size: var(--font-sm);
}

.theme-options {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.theme-option {
  min-width: 72px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: var(--font-sm);
  text-align: center;
  transition: all var(--transition-fast);
}

.theme-option.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 206, 201, 0.08);
}

/* ========== 我的页骨架 ========== */
.mine-page {
  min-height: 60vh;
  padding: calc(var(--header-height) + var(--space-lg)) 0 var(--space-2xl);
}

.mine-hero {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: var(--space-md);
}

.mine-hero__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.mine-hero__avatar svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.mine-hero__name {
  font-size: var(--font-xl);
  font-weight: 600;
}

.mine-hero__sub {
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin-top: 4px;
}

.mine-actions {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.mine-action {
  flex: 1;
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

.mine-action svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  margin: 0 auto 6px;
  display: block;
}

.mine-list .settings-row__arrow {
  color: var(--text-muted);
  font-size: var(--font-lg);
}

/* ========== 排行榜页骨架（C 阶段再丰富） ========== */
.rank-shell {
  min-height: 60vh;
  padding: calc(var(--header-height) + var(--space-lg)) 0 var(--space-2xl);
}

.rank-shell__title {
  font-size: var(--font-2xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.rank-shell__desc {
  color: var(--text-muted);
  font-size: var(--font-md);
  margin-bottom: var(--space-lg);
}

.rank-shell__placeholder {
  padding: var(--space-xl);
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  font-size: var(--font-md);
}

/* ========== 全站顶栏（搜索 / 下载 / 历史） ========== */
.header.header--app {
  background: var(--tabbar-bg);
  border-bottom-color: var(--border-color);
}

.header__icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.header__icon-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.header__icon-btn:active {
  opacity: 0.7;
}

.header__actions {
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

.header__search--app {
  flex: 1;
  min-width: 0;
  max-width: 420px;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  padding: 0 4px 0 12px;
  border: 1px solid var(--border-color);
}
.header__search--app .header__search-ico {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  flex-shrink: 0;
  display: none;
}
.header__search--app .header__search-input {
  width: 100%;
  min-width: 0;
  flex: 1;
  padding: 10px 8px;
  border-bottom: none;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--font-md);
}
.header__search--app .header__search-btn {
  width: 36px;
  height: 36px;
  background: transparent;
}

.app-home {
  padding-top: var(--header-height);
  min-height: 70vh;
  max-width: 960px;
  margin: 0 auto;
}

.app-home__tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 6px;
  scrollbar-width: none;
  position: sticky;
  top: var(--header-height);
  z-index: 50;
  background: var(--bg-page);
}
.app-home__tabs::-webkit-scrollbar { display: none; }

.app-home__tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-md);
  color: var(--text-secondary);
  white-space: nowrap;
  border: 1px solid transparent;
}
.app-home__tab.active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(0, 206, 201, 0.1);
  border-color: rgba(0, 206, 201, 0.25);
}

.app-banner {
  position: relative;
  margin: 8px 12px 12px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
}
.app-banner__track {
  width: 100%;
  height: 100%;
  position: relative;
}
.app-banner__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
  display: block;
  overflow: hidden;
}
.app-banner__slide.active { opacity: 1; }
.app-banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.app-banner__mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%);
}
.app-banner__title {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  color: #fff;
  font-size: var(--font-lg);
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
  z-index: 1;
}
.app-banner__dots {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.app-banner__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
}
.app-banner__dot.active {
  background: #fff;
  width: 14px;
  border-radius: 4px;
}

.app-official {
  margin: 0 12px 12px;
}
.app-official__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: var(--font-md);
}
.app-official__link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.app-home__main {
  padding: 0 0 24px;
}
.app-home__loading,
.app-home__empty,
.app-home__empty-inline {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-md);
}

.app-block {
  margin-bottom: 8px;
}
.app-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
}
.app-block__title {
  font-size: var(--font-xl);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-block__badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-inverse);
  background: var(--accent);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.app-block__more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: var(--font-sm);
}
.app-block__more svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.poster-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(110px, 28%);
  gap: 10px;
  overflow-x: auto;
  padding: 0 12px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.poster-row::-webkit-scrollbar { display: none; }

.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 12px 12px;
}

.poster-card {
  display: block;
  color: inherit;
  min-width: 0;
}
.poster-card__cover {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--bg-muted);
}
.poster-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster-card__img.is-broken,
.poster-card__img--empty {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.poster-card__badge {
  position: absolute;
  left: 6px;
  top: 6px;
  max-width: calc(100% - 12px);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poster-card__score {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,.6);
  color: var(--accent-warm);
  font-size: 11px;
  font-weight: 600;
}
.poster-card__title {
  margin-top: 6px;
  font-size: var(--font-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poster-card__sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1024px) {
  /* 覆盖 style.css：全站统一 App 顶栏，不用汉堡菜单 */
  .header--app .header__nav,
  .header--app .header__nav--desktop,
  .header--app .header__menu-btn {
    display: none !important;
  }
  .header--app .header__actions {
    display: flex;
    flex: 1;
    gap: 6px;
  }
  .header--app .header__search--app {
    display: flex;
    max-width: none;
  }
  .header--app .js-download-btn,
  .header--app .header__history-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }
  .header--app {
    height: 56px;
  }
  .header--app .header__logo span {
    display: none !important;
  }
  .header--app .header__logo-icon {
    width: 32px;
    height: 32px;
  }
  .header--app .header__logo-icon svg {
    width: 18px;
    height: 18px;
  }
  .header--app .header__inner {
    gap: 8px;
  }
  .header--app .header__search--app .header__search-ico {
    display: block;
  }
  .header--app .header__search--app .header__search-btn {
    display: none;
  }
}

@media (min-width: 769px) {
  .header__search--app .header__search-ico { display: none; }
  .app-home { padding-top: calc(var(--header-height) + 8px); }
  .poster-row {
    grid-auto-flow: unset;
    grid-template-columns: repeat(6, 1fr);
    overflow: visible;
  }
  .poster-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .app-banner {
    aspect-ratio: 21 / 9;
  }
}

/* ========== 阶段 C：排行榜 ========== */
.page-rank .rank-page {
  padding-top: var(--header-height);
  min-height: 70vh;
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 24px;
}
.rank-page__head {
  padding: 16px 16px 4px;
}
.rank-page__title {
  font-size: var(--font-2xl);
  font-weight: 600;
}
.rank-page__tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px 12px;
  scrollbar-width: none;
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  background: var(--bg-page);
}
.rank-page__tabs::-webkit-scrollbar { display: none; }
.rank-page__tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-md);
  color: var(--text-secondary);
  border: 1px solid transparent;
  white-space: nowrap;
}
.rank-page__tab.active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(0, 206, 201, 0.1);
  border-color: rgba(0, 206, 201, 0.25);
}
.rank-page__loading,
.rank-page__empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
}
.rank-card {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
  color: inherit;
}
.rank-card__no {
  width: 28px;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.2;
  padding-top: 4px;
}
.rank-card__no--top { color: var(--accent-warm); }
.rank-card__cover {
  width: 72px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-muted);
}
.rank-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rank-card__cover-empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.rank-card__body { min-width: 0; flex: 1; }
.rank-card__name {
  font-size: var(--font-lg);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-card__meta {
  margin-top: 4px;
  font-size: var(--font-sm);
  color: var(--text-muted);
}
.rank-card__des {
  margin-top: 6px;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}
.rank-card__actors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.rank-card__tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  color: var(--text-secondary);
}

/* ========== 阶段 D：我的 ========== */
.page-mine .mine-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px 32px;
}
.mine-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}
.mine-hero__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.mine-hero__avatar svg { width: 28px; height: 28px; fill: currentColor; }
.mine-hero__info { flex: 1; min-width: 0; }
.mine-hero__name { font-size: var(--font-xl); font-weight: 600; }
.mine-hero__sub { font-size: var(--font-sm); color: var(--text-muted); margin-top: 4px; }
.mine-hero__level {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.mine-hero__level:empty { display: none; }
.mine-hero__vip { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: var(--font-sm); color: var(--accent-warm); }
.mine-vip-badge {
  background: linear-gradient(135deg, #F7C873, #E6A23C);
  color: #3a2a00;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}
.mine-hero__tools { display: flex; gap: 4px; }
.mine-tool {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
}
.mine-tool svg { width: 20px; height: 20px; fill: currentColor; }

.mine-points {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}
.mine-points__link { color: inherit; text-decoration: none; min-width: 0; }
.mine-points__label { font-size: var(--font-sm); color: var(--text-muted); }
.mine-points__val { font-size: 22px; font-weight: 700; margin-top: 2px; }
.mine-points__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.mine-points__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: var(--font-sm);
  border: 0;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.mine-points__btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.mine-points__btn:disabled {
  opacity: .45;
  cursor: default;
}

.mine-card {
  background: var(--bg-card);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}
.mine-card__title {
  padding: 14px 16px 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.mine-section { padding: 12px 12px 14px; }
.mine-section__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 2px 10px;
  color: var(--text-primary);
}
.mine-section__head:hover { color: var(--text-primary); }
.mine-section__head h2 { font-size: 16px; font-weight: 600; }
.mine-section__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
  color: var(--text-primary) !important;
  opacity: 0.9;
}

.mine-history {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 96px;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.mine-history::-webkit-scrollbar { display: none; }
.mine-history__empty {
  grid-column: 1 / -1;
  padding: 18px 8px;
  text-align: center;
  color: var(--text-muted);
}
.mine-history__item { color: inherit; }
.mine-history__cover {
  width: 96px;
  height: 128px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-muted);
}
.mine-history__cover img { width: 100%; height: 100%; object-fit: cover; }
.mine-history__name {
  margin-top: 6px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mine-history__ep { font-size: 11px; color: var(--text-muted); }

.mine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 16px 6px 18px;
}
.mine-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font-size: 12px;
  text-align: center;
}
.mine-grid__item svg {
  width: 26px;
  height: 26px;
  fill: var(--accent-warm);
}

.mine-more-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 8px 6px 18px;
}
.mine-more__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  min-width: 0;
  color: var(--text-primary);
  font-size: 12px;
  text-align: center;
}
.mine-more__ico {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mine-more__item svg,
.mine-more__ico svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px;
  max-height: 24px;
  fill: #e53935;
}
.mine-more__logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  background: #e53935;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.mine-more__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== 阶段 E：详情/播放移动端 ========== */
.page-detail .detail-page,
.page-play .play-page {
  padding-top: var(--header-height);
}
.page-detail .breadcrumb { display: none; }

@media (max-width: 768px) {
  .page-detail .detail-hero__content {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
  .page-detail .detail-hero__poster {
    width: 110px;
    flex-shrink: 0;
  }
  .page-detail .detail-sidebar { display: none; }
  .page-play .play-sidebar { display: none; }
  .page-play .play-container { display: block; }
  .page-play .player {
    border-radius: 0;
    aspect-ratio: 16 / 9;
  }
  .page-play .container { padding: 0; }
  .page-play .player-section { margin: 0; }
  .page-play .player__title,
  .page-play .detail-section {
    padding-left: 12px;
    padding-right: 12px;
  }
  .page-detail .episode-list ul,
  .page-play .episode-list ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .page-detail .episode-list li a,
  .page-play .episode-list li a {
    display: block;
    text-align: center;
    padding: 10px 4px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: var(--font-sm);
  }
}

.actor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.actor-tags span {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

/* ========== 分类筛选墙 ========== */
.app-filter {
  padding: 4px 0 8px;
}
.app-filter__row {
  padding: 4px 0;
}
.app-filter__chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.app-filter__chips::-webkit-scrollbar { display: none; }
.app-filter__chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  color: var(--text-secondary);
  background: var(--bg-muted);
  border: 1px solid transparent;
  white-space: nowrap;
}
.app-filter__chip.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.poster-grid--3 {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px 8px;
}
.poster-card--grid .poster-card__sub { display: none; }

.app-home__more {
  display: block;
  width: calc(100% - 24px);
  margin: 8px 12px 20px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: var(--font-md);
  text-align: center;
}

.app-home__tab.active {
  color: var(--accent);
  position: relative;
}
.app-home__tab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  border-radius: 2px;
  background: var(--accent);
}

/* ========== 反馈意见页 ========== */
.page-feedback .header,
.page-feedback .footer,
.page-feedback .app-tabbar,
.page-feedback .mobile-menu {
  display: none !important;
}
.page-feedback {
  --header-height: 0px;
  background: #111111;
  min-height: 100vh;
  padding-bottom: 0 !important;
}
.page-feedback[data-theme],
html[data-theme="light"] .page-feedback {
  background: #111111;
  color: #f2f2f2;
}
.fb-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 8px;
  background: #111111;
}
.fb-bar__back,
.fb-bar__holder {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.fb-bar__back svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}
.fb-bar__title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}
.fb-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 18px 40px;
}
.fb-tips h2 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}
.fb-tips ol {
  list-style: decimal;
  padding-left: 1.2em;
  color: #cfcfcf;
  font-size: 13px;
  line-height: 1.7;
}
.fb-tips li + li { margin-top: 6px; }
.fb-form { margin-top: 22px; }
.fb-textarea,
.fb-input {
  width: 100%;
  border: none;
  outline: none;
  background: #2a2a2a;
  color: #fff;
  border-radius: 18px;
  font-size: 14px;
}
.fb-textarea {
  min-height: 128px;
  padding: 16px;
  resize: none;
  line-height: 1.55;
}
.fb-textarea::placeholder,
.fb-input::placeholder {
  color: #8a8a8a;
}
.fb-input {
  margin-top: 16px;
  height: 48px;
  padding: 0 16px;
  border-radius: 24px;
}
.fb-captcha {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.fb-captcha__input {
  flex: 1;
  margin-top: 0;
}
.fb-captcha__img {
  flex-shrink: 0;
  height: 44px;
  width: 140px;
  border-radius: 12px;
  cursor: pointer;
  background: #2a2a2a;
  object-fit: cover;
}
.fb-submit {
  display: block;
  width: 100%;
  margin-top: 22px;
  height: 50px;
  border: none;
  border-radius: 25px;
  background: #f5a623;
  color: #1a1204;
  font-size: 16px;
  font-weight: 700;
}
.fb-submit:active { opacity: 0.88; }

/* ========== 历史记录页 ========== */
.page-history .header,
.page-history .footer,
.page-history .app-tabbar,
.page-history .mobile-menu {
  display: none !important;
}
.page-history {
  --header-height: 0px;
  background: var(--bg-page);
  min-height: 100vh;
  padding-bottom: 0 !important;
}
.hist-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 6px;
  background: var(--bg-page);
}
.hist-bar__back {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}
.hist-bar__back svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.hist-bar__title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 44px 0 0;
}
.hist-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px 32px;
}
.hist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hist-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: inherit;
}
.hist-item__cover {
  width: 72px;
  height: 96px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-muted);
  flex-shrink: 0;
}
.hist-item__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hist-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hist-item__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.hist-item__ep {
  margin-top: 6px;
  font-size: 13px;
  color: var(--accent-warm);
}
.hist-item__time {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.hist-empty {
  padding: 64px 16px;
  text-align: center;
  color: var(--text-muted);
}
.hist-empty svg {
  width: 48px;
  height: 48px;
  fill: currentColor;
  opacity: 0.5;
  margin-bottom: 12px;
}
.hist-clear {
  display: block;
  width: 100%;
  margin-top: 20px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 14px;
}
