:root {
  --bg: #fff7e9;
  --card: #fff;
  --text: #333;
  --muted: #888;
  --blue1: #2f6bff;
  --blue2: #6a3cf5;
  --gold: #ffe08a;
  --red: #e5413a;
  --radius: 10px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 12px; }
main.wrap { flex: 1; padding-bottom: 40px; }

/* 顶部横幅 */
.banner { max-width: 1100px; width: 100%; margin: 0 auto; }
.banner img { width: 100%; }
.banner-text { background: linear-gradient(120deg, #19b6ff, var(--blue1) 45%, var(--blue2)); color: #fff; text-align: center; padding: 28px 16px 22px; position: relative; overflow: hidden; }
.banner-text::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); }
.banner-text h1 { margin: 0; font-size: clamp(30px, 7vw, 48px); letter-spacing: 6px; font-weight: 900; text-shadow: 0 3px 0 rgba(0,0,0,.15); }
.banner-text p { margin: 6px 0 0; font-size: 14px; opacity: .92; letter-spacing: 2px; }

/* 搜索 */
.searchbar { background: #fff; border-bottom: 1px solid #f0e4cc; position: sticky; top: 0; z-index: 20; }
.searchbar form { display: flex; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.searchbar input { flex: 1; min-width: 0; height: 36px; border: 1px solid #e6d8bd; border-radius: 18px; padding: 0 14px; font-size: 14px; outline: none; background: #fffdf8; }
.searchbar input:focus { border-color: var(--blue1); }
.searchbar button { height: 36px; padding: 0 18px; border: 0; border-radius: 18px; color: #fff; background: linear-gradient(90deg, var(--blue1), var(--blue2)); }

.notice { margin: 12px 0 0; padding: 8px 12px; background: #fff; border-radius: var(--radius); color: #b35b00; font-size: 14px; border: 1px dashed #f2c98a; white-space: pre-line; }

/* 首页大类按钮 */
.cat-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 18px auto 0; max-width: 560px; }
@media (min-width: 760px) { .cat-grid { grid-template-columns: 1fr 1fr; max-width: 900px; } }
.cat-btn { display: flex; align-items: center; justify-content: center; gap: 14px; height: 64px; border-radius: 32px; background: linear-gradient(180deg, #4f8bff, var(--blue1) 55%, #2350d8); box-shadow: 0 5px 0 #1b3fae, 0 8px 18px rgba(47,107,255,.3); color: var(--gold); font-size: 24px; font-weight: 800; letter-spacing: 4px; transition: transform .1s; }
.cat-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #1b3fae; }
.cat-btn .arrow { font-size: 20px; letter-spacing: -4px; }
.cat-btn small { font-size: 12px; color: #dce6ff; font-weight: 400; letter-spacing: 0; }
.cat-img { border-radius: var(--radius); overflow: hidden; }
.cat-img img { width: 100%; }

/* 栏目标题 */
.col-title { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--red); font-size: 18px; margin: 26px 0 14px; font-weight: 600; }
.col-title::before, .col-title::after { content: ""; width: 34px; height: 1px; background: var(--red); }

/* 子系列标签 */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 7px 14px; border-radius: 6px; background: linear-gradient(180deg, #4f8bff, var(--blue1)); color: #fff; font-size: 14px; white-space: nowrap; border: 2px solid transparent; }
.tab.home { background: #fff; color: var(--blue1); border-color: var(--blue1); }
.tab.on { background: linear-gradient(180deg, #ffd65a, #f5a623); color: #7a2e00; font-weight: 700; }
.page-head { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.page-head h2 { margin: 0; font-size: 20px; }
.page-head span { color: var(--muted); font-size: 13px; }

/* 视频卡片 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 4px rgba(120,80,0,.08); transition: transform .15s, box-shadow .15s; }
@media (hover: hover) { .card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(120,80,0,.15); } }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #222 center / cover no-repeat; }
.thumb .play { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.9); }
.thumb .play::after { content: ""; position: absolute; left: 15px; top: 10px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #fff; }
.thumb .badge { position: absolute; left: 6px; top: 6px; background: var(--red); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 3px; }
.card .info { padding: 6px 8px 8px; text-align: center; }
.card .name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot { font-size: 11px; color: var(--muted); }
.stars { color: #e33; letter-spacing: 1px; }

.more { display: block; margin: 20px auto 0; padding: 9px 36px; border: 1px solid var(--blue1); color: var(--blue1); background: #fff; border-radius: 20px; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }

/* 详情页 */
.crumbs { font-size: 13px; color: var(--muted); padding: 12px 0 8px; }
.crumbs a { color: var(--blue1); }
.detail { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 4px rgba(120,80,0,.08); }
@media (min-width: 900px) { .detail { display: grid; grid-template-columns: 1.6fr 1fr; } }
.player { position: relative; background: #000; aspect-ratio: 16 / 9; overflow: hidden; user-select: none; -webkit-user-select: none; }
.player video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.player .poster { position: absolute; inset: 0; background: #000 center / contain no-repeat; cursor: pointer; }
.player .poster .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: rgba(0,0,0,.5); border: 3px solid #fff; }
.player .poster .play::after { content: ""; position: absolute; left: 25px; top: 17px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff; }
.player .wm { position: absolute; pointer-events: none; color: rgba(255,255,255,.35); font-size: 14px; font-weight: 700; text-shadow: 0 0 2px rgba(0,0,0,.4); transition: left 1.5s, top 1.5s; white-space: nowrap; z-index: 2; }
.player .msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #ddd; font-size: 14px; }
.meta { padding: 14px 16px 18px; }
.meta h1 { margin: 0 0 4px; font-size: 20px; line-height: 1.4; }
.meta .sub { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.meta .intro { margin-top: 12px; white-space: pre-line; font-size: 14px; color: #555; }
.cta { display: flex; gap: 10px; margin-top: 16px; }
.cta a, .cta button { flex: 1; height: 42px; border: 0; border-radius: 21px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.cta .call { background: linear-gradient(90deg, #ff7a45, var(--red)); color: #fff; }
.cta .wx { background: #07c160; color: #fff; }

/* 联系方式 */
.contact-fab { position: fixed; right: 14px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 30; width: 56px; height: 56px; border-radius: 50%; border: 0; color: #fff; font-size: 13px; line-height: 1.2; background: linear-gradient(135deg, #ff7a45, var(--red)); box-shadow: 0 6px 16px rgba(229,65,58,.45); }
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .sheet { align-items: center; } }
.sheet-mask { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.sheet-body { position: relative; background: #fff; width: 100%; max-width: 380px; border-radius: 16px 16px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); text-align: center; }
@media (min-width: 640px) { .sheet-body { border-radius: 16px; } }
.sheet-x { position: absolute; right: 10px; top: 6px; border: 0; background: none; font-size: 26px; color: #999; }
.sheet h3 { margin: 0 0 12px; }
.sheet .qr { width: 180px; margin: 6px auto 4px; border-radius: 6px; }
.sheet .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #f1f1f1; text-align: left; }
.sheet .row b { font-weight: 600; }
.sheet .row a, .sheet .row button { flex: none; padding: 5px 14px; border-radius: 14px; border: 1px solid var(--blue1); color: var(--blue1); background: #fff; font-size: 13px; }

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 12px 90px; line-height: 1.9; }
.footer a { color: var(--muted); }
.toast { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); background: rgba(0,0,0,.78); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 99; font-size: 14px; }
