/* ========================================
   舞动视频 - 移动端 UIkit 3 主题
   蓝 + 白灰 + 深色 | 无渐变
   ======================================== */

:root {
  --c1: #3b82f6;
  --c1-hover: #2563eb;
  --c1-rgb: 59,130,246;
  --bg: #0f172a;
  --surface: #1e293b;
  --card: #1e293b;
  --card-hover: #2a3a52;
  --border: rgba(255,255,255,.07);
  --border-light: rgba(59,130,246,.25);
  --text: #f1f5f9;
  --text-sub: #cbd5e1;
  --muted: #64748b;
  --radius: 12px;
  --radius-sm: 8px;
  --nav-h: 52px;
}

/* ===== 基础 ===== */
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); overflow-y: scroll; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  margin: 0; padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* 禁用 WebKit 默认点击高亮（iOS/开发者工具模拟手机的半透明点击效果） */
* { -webkit-tap-highlight-color: transparent; }
/* 480px居中容器 */
.d-wrap {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
}
main, .main-content { flex: 1; }

h1,h2,h3,h4,h5,h6 { color: var(--text); margin: 0; }
a { color: var(--c1); text-decoration: none; transition: color .15s; }
a:hover { color: var(--c1-hover); }
p { margin: 0; }
img { max-width: 100%; display: block; }

/* ===== UIkit 覆写 ===== */

.uk-container { max-width: 480px; padding-left: 12px; padding-right: 12px; }

/* Tab - 药丸式，无底线 */
.uk-tab {
  background: transparent; margin: 0;
  padding: 8px 12px 0 10px; border: none;
  flex-wrap: nowrap; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; /* 滑动到边界回弹不穿透到 body */
  scrollbar-width: none; gap: 2px;
}
.uk-tab::before { display: none !important; }
.uk-tab::-webkit-scrollbar { display: none; }
.uk-tab > * { flex: none; }
.uk-tab > * > a {
  color: var(--muted) !important;
  font-size: 13px; font-weight: 600;
  padding: 6px 10px !important;
  border: none !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.04);
  transition: all .15s; white-space: nowrap;
}
.uk-tab > * > a:hover { color: var(--text) !important; background: rgba(255,255,255,.08); }
.uk-tab > .uk-active > a {
  color: #fff !important;
  background: var(--c1) !important;
}

/* Tab 滑动引导：左右渐变遮罩，暗示可滑动方向 */
.d-tab-wrap { position: relative; }
.d-tab-wrap::before,
.d-tab-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0;
  width: 28px; pointer-events: none; z-index: 2;
  transition: opacity .25s;
}
.d-tab-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.d-tab-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}
/* 滚动到边界时隐藏对应遮罩 */
.d-tab-wrap.at-start::before { opacity: 0; }
.d-tab-wrap.at-end::after { opacity: 0; }

.uk-card { background: var(--card) !important; color: var(--text); border-radius: var(--radius); border: 1px solid var(--border); }
.uk-card-body { padding: 12px; }

.uk-button-primary {
  background: var(--c1) !important; color: #fff !important;
  border-radius: 20px; font-size: 14px; font-weight: 600; border: none;
}
.uk-button-primary:hover { background: var(--c1-hover) !important; }
.uk-button-default {
  background: rgba(255,255,255,.04) !important; color: #fff !important;
  border: 1px solid var(--border) !important; border-radius: 20px;
}
.uk-button-default:hover { background: rgba(255,255,255,.08) !important; color: #fff !important; }
.uk-button-small { font-size: 12px; padding: 2px 14px; line-height: 26px; }

.uk-input, .uk-textarea, .uk-select {
  background: rgba(255,255,255,.04) !important; color: #fff !important;
  border: 1px solid var(--border) !important; border-radius: var(--radius-sm); font-size: 14px;
}
.uk-input:focus, .uk-textarea:focus { border-color: var(--c1) !important; outline: none; }
.uk-input::placeholder { color: var(--muted); }

.uk-modal-dialog { background: var(--surface) !important; color: var(--text); border-radius: var(--radius); border: 1px solid var(--border); max-width: 460px; margin: 0 auto; }
.uk-modal-title { color: var(--text); font-size: 16px; }

.uk-offcanvas-bar { background: var(--bg) !important; color: var(--text); }
.uk-offcanvas-bar a { color: #cbd5e1; }
.uk-offcanvas-bar a:hover { color: var(--c1); }
.uk-offcanvas-close svg { color: #fff; }
.uk-offcanvas-overlay { background: rgba(0,0,0,.5) !important; }
/* 电脑端：抽屉菜单限制在480px容器内 */
@media (min-width: 481px) {
  .uk-offcanvas-flip .uk-offcanvas-bar {
    right: calc(50% - 240px) !important;
    width: 270px;
  }
}

.uk-pagination { gap: 4px; }
.uk-pagination > * > * {
  background: rgba(255,255,255,.04); color: #fff;
  border-radius: var(--radius-sm); padding: 6px 10px; font-size: 13px;
  border: 1px solid var(--border);
  min-width: 36px; min-height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
}
.uk-pagination > * > :hover { background: rgba(255,255,255,.08); color: #fff; }
.uk-pagination > .uk-active > * { background: var(--c1) !important; color: #fff !important; border-color: var(--c1) !important; }

.uk-subnav-pill { gap: 6px; }
.uk-subnav-pill > * > a {
  color: var(--muted); background: rgba(255,255,255,.04);
  border-radius: 16px; font-size: 12px; font-weight: 500;
  padding: 4px 14px; border: 1px solid var(--border);
}
.uk-subnav-pill > * > a:hover { color: var(--c1); border-color: var(--border-light); }
.uk-subnav-pill > .uk-active > a { background: var(--c1) !important; color: #fff !important; border-color: var(--c1) !important; }

.uk-breadcrumb a { color: var(--muted); font-size: 13px; }
.uk-breadcrumb a:hover { color: var(--c1); }
.uk-breadcrumb > :last-child * { color: var(--text); }
.uk-breadcrumb > :nth-child(n+2)::before { color: #334155; }

.uk-switcher { margin: 0; }
hr { display: none; }

/* ===== 导航栏 ===== */
.d-nav {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--nav-h);
  background: rgba(15,23,42,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 980; display: flex; align-items: center;
  justify-content: space-between; padding: 0 12px;
}
.d-nav-logo {
  color: #fff; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 8px;
  transition: background .15s;
}
.d-nav-logo:hover { background: rgba(255,255,255,.06); }
.d-nav-actions { display: flex; align-items: center; gap: 8px; }
.d-nav-logo i { color: var(--c1); font-size: 18px; }
/* 增大图标点击区域：36x36 圆形热区，图标视觉中心往内移，更好点击 */
.d-nav-actions a {
  color: rgba(255,255,255,.6); font-size: 17px;
  transition: color .15s, background .15s;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
}
.d-nav-actions a:hover { color: var(--c1); background: rgba(255,255,255,.06); }

/* 侧滑菜单图标：统一宽度对齐文字，间距 6px */
.d-menu-icon { width: 22px; margin-right: 6px; text-align: center; }

/* ===== 搜索 ===== */
.d-search {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 9px 14px;
  display: flex; align-items: center; gap: 8px;
  margin: 10px 12px; transition: border-color .2s;
}
.d-search:focus-within { border-color: var(--c1); }
.d-search input { flex: 1; background: transparent; border: none; color: #fff; font-size: 14px; outline: none; }
.d-search input::placeholder { color: var(--muted); }
.d-search i { color: var(--muted); font-size: 14px; }

/* ===== 视频卡片 ===== */
.d-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.d-card:active { transform: scale(.97); }
.d-card:hover { border-color: var(--border-light); }
.d-card-thumb {
  position: relative; width: 100%; aspect-ratio: 16/9;
  overflow: hidden; background: #0a0f1a;
}
.d-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.d-card:hover .d-card-thumb img { transform: scale(1.05); }
.d-card-dur {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(0,0,0,.7); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 3px; z-index: 5;
}
.d-card-vip {
  position: absolute; top: 4px; left: 4px;
  background: var(--c1); color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 3px; z-index: 5;
  display: flex; align-items: center; gap: 3px;
}
.d-card-info { padding: 8px 10px; }
.d-card-title {
  font-size: 13px; font-weight: 500; line-height: 1.35;
  color: var(--text); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; margin-bottom: 3px;
}
.d-card-title a { color: var(--text); }
.d-card-title a:hover { color: var(--c1); }
.d-card-meta {
  font-size: 11px; color: var(--muted);
  display: flex; align-items: center; gap: 4px;
}
.d-card-meta i { font-size: 10px; }

/* ===== 推荐大卡片：图片全屏 + 文字覆盖底部 ===== */
.d-feature-card {
  position: relative; display: block; text-decoration: none;
  border-radius: 12px; overflow: hidden;
  margin: 0 12px 12px; height: 180px;
}
.d-feature-card img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.d-feature-card-tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--c1); color: #fff; font-size: 11px;
  padding: 3px 10px; border-radius: 10px;
}
.d-feature-card-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  padding: 36px 12px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
}
.d-feature-card-title {
  font-size: 15px; font-weight: 600; color: #fff; margin: 0 0 4px;
  line-height: 1.4; display: -webkit-box;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.d-feature-card-meta {
  display: flex; gap: 12px; font-size: 12px;
  color: rgba(255,255,255,.8); margin: 0;
}

/* ===== 双列网格 ===== */
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 12px; }

/* ===== 区块标题 ===== */
.d-section { padding: 16px 12px 8px; display: flex; justify-content: space-between; align-items: center; }
.d-section-title { font-size: 16px; font-weight: 700; color: var(--text); }
.d-section-title::before {
  content: ''; display: inline-block;
  width: 3px; height: 16px; background: var(--c1);
  border-radius: 2px; margin-right: 4px; vertical-align: middle;
}
.d-section-more { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 3px; }

/* ===== 面板 ===== */
.d-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin: 10px 12px;
}
.d-panel-title {
  font-size: 15px; font-weight: 700;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 6px;
}
.d-panel-title i { color: var(--c1); }

/* ===== 播放器 ===== */
.d-player-wrap { position: relative; background: #000; aspect-ratio: 16/9; overflow: hidden; transform: translateZ(0); }
.d-player-wrap iframe { width: 100% !important; height: 100% !important; border: none; display: block; }
.d-player-tips {
  background: var(--surface); border-bottom: none;
  padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; font-size: 13px;
}
.d-episodes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; margin: 0; }
.d-episodes li { margin: 0; padding: 0; list-style: none; }
.d-episodes li a {
  display: block; padding: 5px 14px;
  background: rgba(255,255,255,.04); color: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; white-space: nowrap; transition: all .15s;
}
.d-episodes li a:hover { border-color: var(--border-light); background: rgba(255,255,255,.08); }
.playon a { color: #fff !important; background: var(--c1) !important; border-color: var(--c1) !important; font-weight: 600 !important; }
.playvip a { position: relative !important; padding-left: 24px !important; }
.playvip a::before {
  content: "\f521"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  color: #fbbf24; font-size: 10px;
}

/* ===== 操作栏 ===== */
.d-actions { display: flex; gap: 6px; padding: 10px 0; overflow-x: auto; scrollbar-width: none; }
.d-actions::-webkit-scrollbar { display: none; }
.d-actions a {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  color: #fff; padding: 6px 14px; border-radius: 18px;
  font-size: 12px; white-space: nowrap; transition: all .15s;
}
.d-actions a:hover { border-color: var(--border-light); background: rgba(255,255,255,.08); }

/* ===== 播放页收藏/分享（PlayApp 组件，原 play-page.css 合并） ===== */
.play-app { display: flex; gap: 6px; }
.play-app a {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  color: #fff; padding: 6px 14px; border-radius: 18px;
  font-size: 12px; white-space: nowrap; transition: all .15s;
  cursor: pointer; text-decoration: none;
}
.play-app a:hover { border-color: var(--border-light); background: rgba(255,255,255,.08); }
.play-app a.is-fav i { color: #ef4444 !important; }

/* ===== 专题 ===== */
.d-topic {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius);
  overflow: hidden; display: block; border: 1px solid var(--border);
  transition: border-color .2s;
}
.d-topic:hover { border-color: var(--border-light); }
.d-topic img { width: 100%; height: 100%; object-fit: cover; }
.d-topic-over {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.9), rgba(15,23,42,.3) 50%, transparent);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
}
.d-topic-badge { background: var(--c1); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 3px; width: fit-content; margin-bottom: 4px; }
.d-topic-name { font-size: 14px; font-weight: 600; color: #fff; }
.d-topic-count { font-size: 11px; color: rgba(255,255,255,.5); }

/* ===== 资讯 ===== */
.d-news { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.d-news:last-child { border-bottom: none; }
.d-news-img { width: 100px; flex-shrink: 0; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; }
.d-news-img img { width: 100%; height: 100%; object-fit: cover; }
.d-news-body { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.d-news-ttl {
  font-size: 14px; font-weight: 500; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px;
}
.d-news-ttl a { color: var(--text); }
.d-news-ttl a:hover { color: var(--c1); }
.d-news-meta { font-size: 11px; color: var(--muted); }

/* ===== 懒加载 ===== */
.lazy-wrap { position: relative; width: 100%; height: 100%; overflow: hidden; }
.lazy-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--c1); font-size: 16px; z-index: 5; }
.lazy-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.lazy-img.loaded { opacity: 1; }

/* ===== 文章内容 ===== */
.article-content { color: var(--text-sub); line-height: 1.8; font-size: 15px; }
.article-content p { margin-bottom: 14px; }
.article-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 10px 0; }
.article-content a { color: var(--c1); }
.article-content blockquote {
  border-left: 3px solid var(--c1); padding: 8px 14px; margin: 14px 0;
  background: rgba(var(--c1-rgb),.06); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted);
}

/* ===== 留言 ===== */
.sea_gbook_item { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.sea_gbook_head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sea_gbook_name { font-weight: 600; color: #fff; font-size: 14px; }
.sea_gbook_time { font-size: 11px; color: var(--muted); }
.sea_gbook_content { font-size: 13px; color: var(--text-sub); line-height: 1.5; }
.sea_gbook_reply { margin-top: 8px; padding: 8px; background: rgba(var(--c1-rgb),.06); border-radius: var(--radius-sm); border-left: 3px solid var(--c1); font-size: 13px; }
.sea_form_group { margin-bottom: 12px; }
.sea_form_label { display: block; margin-bottom: 6px; color: var(--text-sub); font-size: 13px; }
.sea_form_input, .sea_form_textarea {
  width: 100%; padding: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: #fff; font-size: 14px; box-sizing: border-box;
}
.sea_form_input:focus, .sea_form_textarea:focus { border-color: var(--c1); outline: none; }
.sea_form_textarea { min-height: 120px; resize: vertical; }
.sea_form_btn { background: var(--c1); color: #fff; padding: 10px 24px; border-radius: 20px; border: none; font-size: 14px; font-weight: 600; cursor: pointer; }

/* ===== 登录注册 ===== */
.login-wrap { max-width: 360px; margin: 20px auto; padding: 0 12px; }
.login-wrap .myui-panel { background: var(--surface) !important; border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; }
.login-wrap .head h5 { color: #fff; font-size: 17px; font-weight: 600; }
.login-wrap .input-list { list-style: none; padding: 0; margin: 0; }
.login-wrap .input-list li { margin: 16px 0; }
.login-wrap .form-control {
  width: 100%; padding: 10px 14px; background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: #fff; font-size: 14px; box-sizing: border-box;
}
.login-wrap .form-control:focus { border-color: var(--c1); outline: none; }
.login-wrap .btn-warning {
  background: var(--c1); color: #fff; letter-spacing: 3px; border: none;
  border-radius: 20px; padding: 10px; font-size: 15px; font-weight: 600; width: 100%; cursor: pointer;
}

/* ===== 回到顶部 ===== */
.d-back-top {
  position: fixed; bottom: 20px; z-index: 50; display: none;
  width: 42px; height: 42px; border-radius: 50%; background: var(--c1);
  color: #fff; align-items: center; justify-content: center; font-size: 16px;
  box-shadow: 0 2px 12px rgba(59,130,246,.3); text-decoration: none;
}
