/* ============================================================
   netpages 设计系统 v2
   主色 #00A1D6  强调粉 #FB7299  文本 #18191c/#61666d
   ============================================================ */
:root {
  --brand: #00a1d6;
  --brand-h: #00b5e5;
  --brand-soft: rgba(0, 161, 214, .12);
  --pink: #fb7299;
  --ink: #18191c;
  --ink-2: #61666d;
  --ink-3: #9499a0;
  --line: #e3e5e7;
  --bg: #f4f6f8;
  --card: #ffffff;
  --ok: #178544;
  --err: #e64545;
  --warn: #e67e22;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-2: 0 6px 18px rgba(0, 0, 0, .08);
  --ring: 0 0 0 3px rgba(0, 161, 214, .15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-h); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ============ 顶栏 ============ */
.topbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 58px; }
.logo {
  font-size: 20px; font-weight: 800; color: var(--brand);
  letter-spacing: .5px; white-space: nowrap;
}
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 6px 16px; border-radius: 18px;
  color: var(--ink-2); font-size: 15px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a:hover { background: #f1f2f3; color: var(--ink); }
.nav a.on { background: var(--brand); color: #fff; }

.search {
  flex: 1; display: flex; max-width: 460px;
  border: 1px solid transparent; border-radius: 10px; overflow: hidden;
  background: #f1f2f3; transition: background .15s, box-shadow .15s;
}
.search:focus-within { background: #fff; box-shadow: var(--ring); border-color: var(--brand); }
.search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  padding: 9px 14px; font-size: 14px; color: var(--ink);
}
.search button {
  border: none; background: var(--brand); color: #fff;
  padding: 0 20px; cursor: pointer; font-size: 14px;
  transition: background .15s;
}
.search button:hover { background: var(--brand-h); }

.userarea { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.userarea a { color: var(--ink-2); font-size: 14px; transition: color .15s; }
.userarea a:hover { color: var(--brand); }
.uname { color: var(--brand); font-weight: 600; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 22px; border-radius: 10px;
  cursor: pointer; border: none; font-size: 14px; font-weight: 500;
  transition: background .15s, transform .1s, box-shadow .15s;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(0, 161, 214, .3); }
.btn-primary:hover:not(:disabled) { background: var(--brand-h); }
.btn-block { width: 100%; padding: 11px; font-size: 15px; }
.btn-ghost { background: #f1f2f3; color: var(--ink-2); }
.btn-ghost:hover { background: #e3e5e7; color: var(--ink); }
.btn-sm { padding: 6px 16px; font-size: 13px; border-radius: 8px; }
.btn-warn { background: var(--warn); color: #fff; }
.btn-warn:hover:not(:disabled) { background: #d35400; }

/* ============ 提示条 ============ */
.flashes { margin-top: 14px; }
.flash {
  padding: 11px 16px; border-radius: 10px; margin-bottom: 8px;
  font-size: 14px; animation: drop .25s ease;
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.flash-ok { background: #e8f7ee; color: var(--ok); border: 1px solid #b7e4c7; }
.flash-error { background: #fdeeee; color: var(--err); border: 1px solid #f5c8c8; }
.flash-warn { background: #fff8e6; color: #8a6d1d; border: 1px solid #f0e0b3; }

/* ============ 通用 ============ */
main { padding: 22px 16px 70px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.muted { color: var(--ink-3); font-size: 13px; margin-top: 10px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
  box-shadow: var(--shadow-1);
}
.empty { text-align: center; padding: 90px 0; color: var(--ink-3); }
.empty p { margin-bottom: 18px; font-size: 15px; }

/* ============ 表单控件 ============ */
input[type=text], input[type=password], input:not([type]), textarea {
  padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 14px; outline: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
}
input:focus, textarea:focus { border-color: var(--brand); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 44px; font-family: inherit; line-height: 1.6; }
.form-label { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: block; color: var(--ink); }

/* ============ 登录/注册 ============ */
.auth-box {
  max-width: 380px; margin: 64px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 36px 32px;
  box-shadow: var(--shadow-2);
}
.auth-box.wide { max-width: 560px; }
.auth-box h1 { font-size: 21px; margin-bottom: 24px; text-align: center; font-weight: 700; }
.auth-box input[type=text], .auth-box input[type=password],
.auth-box input:not([type]), .auth-box textarea { width: 100%; }
.auth-box .btn { margin-top: 8px; }
.auth-box p { text-align: center; }

/* ============ 筛选条 ============ */
.filter-bar {
  display: flex; gap: 30px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px;
  box-shadow: var(--shadow-1);
}
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { color: var(--ink-2); font-size: 14px; font-weight: 500; }
.chip {
  padding: 5px 15px; border-radius: 16px; font-size: 13px;
  color: var(--ink-2); background: #f1f2f3;
  transition: background .15s, color .15s;
}
.chip:hover { background: #e3e5e7; color: var(--ink); }
.chip.on { background: var(--brand); color: #fff; font-weight: 500; }

/* ============ 视频卡片 ============ */
.video-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.video-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: inherit;
  transition: transform .18s, box-shadow .18s;
}
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.thumb {
  position: relative; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #22303e, #101820);
}
.thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .3s;
}
.video-card:hover .thumb img { transform: scale(1.04); }
.dur {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0, 0, 0, .68); color: #fff;
  font-size: 12px; padding: 2px 8px; border-radius: 5px;
}
.vc-body { padding: 12px 14px 14px; }
.vc-title {
  font-size: 15px; font-weight: 600; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.45;
}
.vc-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-3); }

/* ============ 视频详情 ============ */
.player-box {
  background: #000; border-radius: var(--radius); overflow: hidden;
  margin-bottom: 18px; box-shadow: var(--shadow-2);
}
.video-title { font-size: 21px; font-weight: 700; margin-bottom: 10px; }
.video-meta {
  display: flex; gap: 20px; color: var(--ink-3); font-size: 13px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.video-meta .up { color: var(--brand); font-weight: 600; }
.video-desc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; font-size: 14px; line-height: 1.8; white-space: pre-wrap;
  color: var(--ink-2);
}

/* ============ 论坛动态 ============ */
.post-composer textarea {
  width: 100%; min-height: 76px;
}
.feed-item { padding: 18px 20px; }
.feed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #00a1d6, #0077b6); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 119, 182, .3);
}
.feed-user { font-weight: 600; font-size: 15px; }
.feed-time { color: var(--ink-3); font-size: 12px; margin-left: auto; }
.feed-content {
  font-size: 15px; line-height: 1.75; white-space: pre-wrap;
  margin-bottom: 12px; color: var(--ink);
}
.feed-actions { display: flex; gap: 26px; align-items: center; }
.like-btn {
  background: none; border: none; cursor: pointer;
  font-size: 14px; color: var(--ink-2); transition: color .15s;
  padding: 2px 4px;
}
.like-btn:hover { color: var(--pink); }
.like-btn.liked { color: var(--pink); font-weight: 600; }
.comment-link { color: var(--ink-2); font-size: 14px; transition: color .15s; }
.comment-link:hover { color: var(--brand); }
.comment-item { padding: 14px 18px; }

/* ============ 个人中心 ============ */
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
@media (max-width: 720px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-card { padding: 0; overflow: hidden; text-align: center; }
.profile-banner {
  height: 86px;
  background: linear-gradient(120deg, #00a1d6 0%, #0077b6 55%, #00c6fb 100%);
  position: relative;
}
.profile-banner::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.35), transparent 45%);
}
.profile-id {
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; margin-top: -28px; position: relative; text-align: left;
}
.avatar.big {
  width: 64px; height: 64px; font-size: 26px;
  border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.profile-name { font-size: 19px; font-weight: 700; line-height: 1.3; }
.profile-joined { font-size: 12px; color: var(--ink-3); }
.profile-stats {
  display: flex; justify-content: space-around;
  border-top: 1px solid var(--line); padding: 16px 10px; margin-top: 20px;
}
.profile-stats b { display: block; font-size: 21px; color: var(--brand); font-weight: 700; }
.profile-stats span { font-size: 12px; color: var(--ink-3); }

.profile-edit-card h2 { font-size: 17px; margin-bottom: 20px; font-weight: 700; }
.profile-form .field { margin-bottom: 20px; }
.profile-form .field-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.profile-form .field-head label { font-size: 14px; font-weight: 600; color: var(--ink); }
.char-count { font-size: 12px; color: var(--ink-3); transition: color .15s; }
.char-count.hot { color: var(--pink); font-weight: 600; }
.profile-form textarea {
  width: 100%; min-height: 92px; line-height: 1.7;
}
.profile-form input[type=text] { width: 100%; }
.field-hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }

/* ============ 投稿管理 ============ */
.studio-item { display: flex; gap: 18px; padding: 16px; }
.studio-thumb {
  position: relative; width: 180px; aspect-ratio: 16/9; flex-shrink: 0;
  border-radius: 10px; overflow: hidden; background: #16222e;
}
.studio-thumb img { width: 100%; height: 100%; object-fit: cover; }
.studio-no-cover {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: #5a6b7c; font-size: 13px;
}
.studio-info { flex: 1; min-width: 0; }
.studio-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.studio-actions { margin-top: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.studio-msg { font-size: 13px; }

/* ============ 头像 ============ */
img.avatar { object-fit: cover; }
.topbar-avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.avatar-xs { width: 20px; height: 20px; font-size: 10px; }
.up-avatar {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
  vertical-align: -6px; margin-right: 6px;
}
a.up { display: inline-flex; align-items: center; }
.vc-up {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--ink-2); font-size: 12px;
}
.vc-up:hover { color: var(--brand); }
.user-bio {
  padding: 12px 22px 0; font-size: 13px; color: var(--ink-2);
  line-height: 1.7; text-align: left;
}

/* ============ 裁剪弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal {
  background: #fff; border-radius: 14px; padding: 20px;
  max-width: 620px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.25);
  animation: drop .2s ease;
}
.modal h3 { font-size: 16px; margin-bottom: 14px; }
.crop-wrap { display: flex; gap: 18px; align-items: flex-start; }
.crop-stage {
  position: relative; flex: 1; min-width: 0;
  max-height: 340px; overflow: hidden; border-radius: 10px;
  background: #111; line-height: 0;
}
.crop-stage img { max-width: 100%; max-height: 340px; width: auto; height: auto; }
.crop-box {
  position: absolute; border: 2px solid #fff; border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
  cursor: move; box-sizing: border-box;
}
.crop-handle {
  position: absolute; right: -7px; bottom: -7px;
  width: 14px; height: 14px; background: #fff;
  border-radius: 50%; cursor: nwse-resize;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.crop-side { width: 100px; flex-shrink: 0; text-align: center; }
.crop-preview {
  width: 88px; height: 88px; border-radius: 50%;
  background-repeat: no-repeat; margin: 0 auto;
  border: 2px solid var(--line);
}
@media (max-width: 560px) {
  .crop-wrap { flex-direction: column; align-items: center; }
}

/* ============ 分P / 视频集 ============ */
.series-box { padding: 14px 16px; }
.series-head { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.episode-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.episode {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px; font-size: 13px;
  color: var(--ink-2); text-decoration: none;
}
.episode:hover { background: #f1f2f3; color: var(--ink); }
.episode.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.ep-num { flex-shrink: 0; font-weight: 600; width: 34px; }
.ep-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-dur { flex-shrink: 0; color: var(--ink-3); font-size: 12px; }
.section-title { font-size: 17px; font-weight: 700; margin: 22px 0 12px; }
.series-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
}
.series-row-info { flex: 1; min-width: 0; }
.series-row-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.episode-full-list { display: flex; flex-direction: column; gap: 10px; }
.episode-row { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; }
.episode-row:hover { border-color: var(--brand); }
.ep-num-lg { font-size: 18px; font-weight: 700; color: var(--ink-3); width: 40px; text-align: center; flex-shrink: 0; }

/* ============ 屏幕共享 ============ */
.share-controls {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; flex-wrap: wrap;
}
.share-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #ccc; }
.dot.on { background: var(--ok); box-shadow: 0 0 6px rgba(23, 133, 68, .5); }
.dot.off { background: var(--err); }
.share-my-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.share-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.share-item-info { flex: 1; min-width: 0; }
.share-item-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
