/* ============================================
   App Layout - 主布局
   ============================================ */

#app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ---- 页面容器 ---- */
#page-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ---- Tab 页面 ---- */

:where(button, a, [role="button"], input, select, textarea):focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 3px;
}

/* fade 过渡用于需要动画的子页面 */

/* ---- 隐藏状态类 ---- */
.hidden {
  display: none !important;
}

/* ---- 导航栏 [hidden] 强制覆盖（组件 CSS 中的 display:flex 会覆盖 UA [hidden]） ---- */

/* 同上：nav-title 也需 !important 兜底，防止父级 flex 布局影响 */

/* ---- 通用 section 样式 ---- */
.section {
  padding: var(--space-lg) var(--space-md);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.section-header h2 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

/* ---- 短剧横向滚动列表 (基础) ---- */
.drama-scroll {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-sm);
  scrollbar-width: none;
}
.drama-scroll::-webkit-scrollbar { display: none; }

/* ---- 短剧卡片 (基础) ---- */
.drama-card {
  display: block;
  flex-shrink: 0;
  width: 140px;
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  transition: transform var(--duration-fast) var(--ease-out);
  text-align: left;
}

.drama-card:active {
  transform: scale(0.96);
}

.drama-card:focus-visible {
  border-radius: 10px;
}

.drama-card .card-poster {
  display: block;
  width: 140px;
  height: 196px;
  background-color: #1c1c1e;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.drama-card .card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 标签角标 - 默认右上角 */
.card-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  z-index: 2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-badge.hot { }
.card-badge.new { }
.card-badge.vip { }

/* 剧集数角标 */

.drama-card .card-title {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.6;
}

.drama-card .card-meta {
  display: block;
  font-size: 11px;
  color: #8e8e93;
  margin-top: 2px;
}

/* ============================
   退出确认弹窗
   ============================ */

/* ============================
   添加到桌面 - 顶部 banner
   ============================ */

/* ============================
   添加到桌面 - 指引蒙层
   ============================ */

