*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;overflow:hidden;background:#000}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#fff;font-size:14px}
button,input,textarea,select{font-family:inherit;font-size:inherit;color:inherit}
button{background:none;border:0;cursor:pointer}
svg{width:24px;height:24px;fill:currentColor;display:block}
.hidden{display:none!important}

#app{position:fixed;inset:0;overflow:hidden;background:#000}
.page{position:absolute;inset:0;overflow:hidden}
.icon-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;color:#fff;opacity:.92}
.icon-btn svg{width:22px;height:22px}
.icon-btn.active{color:#fe2c55}

/* ---------- 底部导航 ---------- */
.tabbar{position:absolute;left:0;right:0;bottom:0;height:58px;z-index:20;display:flex;align-items:center;justify-content:space-around;background:rgba(0,0,0,.82);backdrop-filter:blur(12px);border-top:1px solid rgba(255,255,255,.07);padding-bottom:env(safe-area-inset-bottom)}
.tab{width:25%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#8b8b8b;font-size:10px}
.tab svg{width:23px;height:23px}
.tab.active{color:#fff}
.upload-tab{width:30%}
.plus-circle{width:44px;height:30px;border-radius:9px;background:linear-gradient(135deg,#25f4ee,#fe2c55);display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:0 3px 14px rgba(254,44,85,.35)}
.plus-circle svg{width:22px;height:22px}

/* ---------- 视频流 ---------- */
.feed{position:absolute;inset:0;overflow-y:auto;scroll-snap-type:y mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.feed::-webkit-scrollbar{display:none}
.video-item{position:relative;height:100%;scroll-snap-align:start;overflow:hidden;background:#000}
.player{width:100%;height:100%;object-fit:cover;background:#000;display:block}
.video-mask{position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.25) 0%,transparent 22%,transparent 55%,rgba(0,0,0,.78) 100%);pointer-events:none}
.play-hint{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:66px;height:66px;border-radius:50%;background:rgba(0,0,0,.42);display:flex;align-items:center;justify-content:center;color:#fff;border:1px solid rgba(255,255,255,.3);opacity:0;transition:opacity .2s;pointer-events:none}
.play-hint.show{opacity:1}
.play-hint svg{width:30px;height:30px;margin-left:3px}
.center-pause{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:62px;height:62px;border-radius:50%;background:rgba(0,0,0,.35);display:none;align-items:center;justify-content:center;pointer-events:none}
.center-pause.show{display:flex;animation:fadePause .8s forwards}
.center-pause svg{width:30px;height:30px}
@keyframes fadePause{0%{opacity:1}100%{opacity:0}}

.right-bar{position:absolute;right:12px;bottom:88px;z-index:10;display:flex;flex-direction:column;align-items:center;gap:16px}
.rb-author{position:relative;margin-bottom:6px}
.rb-author img,.rb-author .no-avatar{width:46px;height:46px;border-radius:50%;object-fit:cover;border:2px solid #fff;background:#444;display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff}
.no-avatar{display:inline-flex;align-items:center;justify-content:center;background:#444;color:#fff;border-radius:50%;flex:none}
.rb-author .author-plus{position:absolute;left:50%;bottom:-8px;transform:translateX(-50%);width:18px;height:18px;border-radius:50%;background:#fe2c55;color:#fff;font-size:13px;line-height:17px;text-align:center;font-weight:700}
.act{display:flex;flex-direction:column;align-items:center;gap:4px;color:#fff;font-size:11px;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.act svg{width:32px;height:32px;filter:drop-shadow(0 1px 3px rgba(0,0,0,.5))}
.act:active{transform:scale(.9)}
.act.liked svg{fill:#fe2c55;color:#fe2c55}
.act.favorited svg{fill:#ffd836;color:#ffd836}
.disc{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#333,#111);border:1px solid rgba(255,255,255,.25);display:flex;align-items:center;justify-content:center;font-size:16px;animation:spin 4s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

.bottom-info{position:absolute;left:15px;right:80px;bottom:76px;z-index:10;text-shadow:0 1px 4px rgba(0,0,0,.7)}
.author-name{font-size:16px;font-weight:700;margin-bottom:7px}
.desc-text{font-size:14px;line-height:1.5;margin-bottom:7px;word-break:break-word;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.music-line{font-size:12px;opacity:.9;display:flex;align-items:center;gap:6px}
.music-line .note{font-size:14px}
.progress{position:absolute;left:0;right:0;bottom:58px;height:2px;background:rgba(255,255,255,.18);z-index:10}
.progress .bar{height:100%;width:0;background:#fff}
.empty-feed{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#888;font-size:14px;z-index:5}

/* ---------- 通用子页面 ---------- */
.sub-page{background:#111;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:30}
.sub-header{position:sticky;top:0;height:52px;z-index:5;display:flex;align-items:center;justify-content:center;background:#111;border-bottom:1px solid #262626;font-size:16px;font-weight:600}
.sub-header .back{position:absolute;left:10px;width:40px;height:52px;display:flex;align-items:center;color:#fff}
.sub-header .right-link{position:absolute;right:14px;font-size:13px;color:#fe2c55;font-weight:400}
.sub-body{padding:18px 16px 40px;min-height:calc(100% - 52px)}
.card{background:#1c1c1e;border:1px solid #2a2a2c;border-radius:12px;padding:16px;margin-bottom:14px}
.field{margin-bottom:16px}
.field label{display:block;font-size:12px;color:#9a9a9a;margin-bottom:7px}
.field input,.field textarea,.field select{width:100%;background:#262628;border:1px solid #333336;border-radius:9px;padding:11px 12px;outline:none;min-height:44px}
.field input:focus,.field textarea:focus,.field select:focus{border-color:#fe2c55}
.field textarea{min-height:88px;resize:vertical;line-height:1.5}
.btn-primary{width:100%;height:45px;border-radius:9px;background:linear-gradient(135deg,#fe2c55,#ff6a4d);color:#fff;font-weight:600;font-size:15px}
.btn-primary:disabled{opacity:.5}
.btn-ghost{width:100%;height:42px;border-radius:9px;border:1px solid #3a3a3c;color:#ddd;background:#1c1c1e}
.wx-divider{display:flex;align-items:center;gap:12px;color:#777;font-size:12px;margin:24px 0 14px}
.wx-divider::before,.wx-divider::after{content:"";flex:1;height:1px;background:#333}
.btn-wechat{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:45px;border-radius:9px;background:#07c160;color:#fff;font-size:15px;font-weight:600;text-decoration:none}
.btn-wechat svg{width:22px;height:22px}
.btn-wechat:active{opacity:.85}
.link-row{display:flex;justify-content:space-between;align-items:center;color:#aaa;font-size:13px;margin-top:14px}
.link-row a{color:#fe2c55;text-decoration:none}
.tabs{display:flex;border-bottom:1px solid #2b2b2d;margin-bottom:20px}
.tabs button{flex:1;padding:12px 0;color:#8a8a8a;font-size:14px;border-bottom:2px solid transparent}
.tabs button.active{color:#fff;border-color:#fe2c55;font-weight:600}
.hint{font-size:12px;color:#888;line-height:1.7;margin-top:10px}

.profile-head{display:flex;align-items:center;gap:16px;padding:6px 0 22px}
.profile-head img,.profile-head .no-avatar{width:72px;height:72px;border-radius:50%;object-fit:cover;background:#333;border:2px solid #333;display:flex;align-items:center;justify-content:center;font-size:26px}
.profile-head .nick{font-size:21px;font-weight:700;margin-bottom:6px}
.profile-head .id{font-size:12px;color:#888}
.profile-head .bio{font-size:13px;color:#aaa;margin-top:6px}
.stat-row{display:flex;background:#1c1c1e;border-radius:12px;padding:16px 0;margin-bottom:16px}
.stat-row div{flex:1;text-align:center;border-right:1px solid #2b2b2d}
.stat-row div:last-child{border:0}
.stat-row b{display:block;font-size:20px;margin-bottom:4px}
.stat-row span{font-size:11px;color:#8a8a8a}
.menu-item{display:flex;align-items:center;justify-content:space-between;padding:15px 16px;background:#1c1c1e;border-radius:11px;margin-bottom:10px;color:#eee}
.menu-item .left{display:flex;align-items:center;gap:12px}
.menu-item svg{width:20px;height:20px;color:#fe2c55}
.menu-item .arrow{color:#666}
.grid-list{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
.grid-item{position:relative;aspect-ratio:3/4;background:#222;overflow:hidden;border-radius:4px}
.grid-item img{width:100%;height:100%;object-fit:cover}
.grid-item .badge{position:absolute;left:0;right:0;bottom:0;background:linear-gradient(transparent,rgba(0,0,0,.85));color:#fff;font-size:10px;padding:12px 5px 5px;text-align:center}
.list-item{display:flex;gap:12px;background:#1c1c1e;border-radius:11px;padding:10px;margin-bottom:10px}
.list-item img{width:68px;height:90px;object-fit:cover;border-radius:6px;background:#333}
.list-item .info{flex:1;min-width:0}
.list-item .title{font-size:14px;font-weight:600;margin-bottom:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.list-item .meta{font-size:11px;color:#8a8a8a;line-height:1.8}
.list-item .status{display:inline-block;padding:2px 7px;border-radius:10px;background:#333;font-size:10px;margin-top:4px}
.list-item .status.s1{background:rgba(37,212,102,.18);color:#4ad07f}
.list-item .status.s2{background:rgba(254,44,85,.18);color:#ff6b84}
.list-item .status.s0{background:rgba(255,204,51,.16);color:#ffd836}
.avatar-preview{width:80px;height:80px;border-radius:50%;object-fit:cover;background:#333;margin-bottom:14px;border:2px solid #3a3a3c}
.code-btn{padding:0 12px;height:44px;border-radius:9px;background:#2a2a2c;color:#fe2c55;font-size:12px;white-space:nowrap}
.code-row{display:flex;gap:8px}
.code-row input{flex:1}

/* ---------- 评论抽屉 ---------- */
.drawer{position:absolute;inset:0;z-index:50}
.drawer-mask{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.drawer-panel{position:absolute;left:0;right:0;bottom:0;height:68%;background:#1c1c1e;border-radius:16px 16px 0 0;display:flex;flex-direction:column;overflow:hidden}
.drawer-head{height:50px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid #2e2e30;font-size:14px;color:#aaa;position:relative}
.drawer-head .icon-btn{position:absolute;right:8px}
.comment-list{flex:1;overflow-y:auto;padding:14px 16px}
.comment{display:flex;gap:10px;margin-bottom:18px}
.comment img,.comment .no-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;background:#333;flex:none;display:flex;align-items:center;justify-content:center;font-size:14px}
.comment .c-body{flex:1;min-width:0}
.comment .c-name{font-size:12px;color:#999;margin-bottom:5px}
.comment .c-text{font-size:14px;line-height:1.5;word-break:break-word}
.comment .c-time{font-size:11px;color:#777;margin-top:5px}
.comment-empty{text-align:center;color:#777;padding:40px 0;font-size:13px}
.comment-form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid #2e2e30;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
.comment-form input{flex:1;background:#2a2a2c;border:1px solid #3a3a3c;border-radius:20px;padding:0 15px;height:40px;outline:none}
.comment-form button{color:#fe2c55;font-weight:600;padding:0 6px}

/* ---------- 提示 ---------- */
.toast{position:absolute;left:50%;bottom:110px;transform:translate(-50%,10px);background:rgba(30,30,30,.94);border:1px solid #3a3a3c;color:#fff;padding:10px 18px;border-radius:22px;font-size:13px;z-index:100;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;max-width:80%;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- 发布：拍摄与图文 ---------- */
.publish-tabs{display:flex;gap:8px;margin-bottom:14px}
.publish-tabs button{flex:1;height:38px;border-radius:8px;border:1px solid #3a3a3c;background:#2a2a2c;color:#aaa;font-size:14px}
.publish-tabs button.active{background:#fe2c55;border-color:#fe2c55;color:#fff;font-weight:600}
.media-picker{position:relative;width:100%;aspect-ratio:3/4;border:1px dashed #444;border-radius:10px;background:#222;overflow:hidden;display:flex;align-items:center;justify-content:center;margin-bottom:14px}
.media-picker img,.media-picker video{width:100%;height:100%;object-fit:cover}
.media-picker .picker-actions{display:flex;gap:12px;z-index:2}
.media-picker .picker-actions button{background:#333;color:#fff;border:1px solid #555;border-radius:20px;padding:9px 16px;font-size:13px}
.media-picker .picker-actions button.primary{background:#fe2c55;border-color:#fe2c55}
.media-picker .change-media{position:absolute;right:10px;top:10px;z-index:3;background:rgba(0,0,0,.6);color:#fff;border-radius:16px;padding:6px 12px;font-size:12px}
.camera-modal{position:absolute;inset:0;background:#000;z-index:200}
.cam-stage{position:relative;width:100%;height:100%;overflow:hidden}
.cam-stage video,.cam-stage img{width:100%;height:100%;object-fit:cover;background:#000}
.cam-top{position:absolute;top:calc(12px + env(safe-area-inset-top));left:12px;right:12px;display:flex;justify-content:space-between}
.cam-round{background:rgba(0,0,0,.45);color:#fff;border:1px solid rgba(255,255,255,.3);border-radius:20px;min-width:42px;height:36px;font-size:13px}
.cam-mode{position:static;transform:none;display:flex;background:rgba(0,0,0,.5);border-radius:20px;padding:3px;border:1px solid rgba(255,255,255,.2)}
.cam-mode button{background:transparent;color:#ddd;border-radius:17px;padding:6px 20px;font-size:13px}
.cam-mode button.active{background:#fe2c55;color:#fff}
.cam-bottom{position:absolute;left:0;right:0;bottom:calc(32px + env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr auto 1fr;align-items:end;justify-items:center;color:#ddd;font-size:13px}
.cam-center{display:flex;flex-direction:column;align-items:center;gap:14px}
.cam-album{position:absolute;right:18%;bottom:38px;background:rgba(255,255,255,.14);color:#fff;border-radius:20px;padding:10px 18px}
.cam-bottom-spacer{display:block;width:1px}
.shutter{position:relative;width:72px;height:72px;border-radius:50%;background:#fe2c55;border:5px solid rgba(255,255,255,.85);box-shadow:0 0 0 3px rgba(0,0,0,.25);z-index:1}
.shutter.recording{background:#e0254c}
.shutter.recording::after{content:"";position:absolute;inset:-10px;border-radius:50%;background:conic-gradient(#fff calc(var(--cam-progress,0) * 1turn),rgba(255,255,255,.25) 0);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 5px),#000 calc(100% - 4px));mask:radial-gradient(farthest-side,transparent calc(100% - 5px),#000 calc(100% - 4px))}
.player-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
.preview-page{position:absolute;inset:0;background:#000;overflow:hidden}
.preview-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
.preview-back{position:absolute;left:14px;top:calc(14px + env(safe-area-inset-top));z-index:5;width:38px;height:38px;border-radius:50%;background:rgba(0,0,0,.45);color:#fff;font-size:22px;line-height:1}
.preview-next{position:absolute;left:50%;bottom:calc(32px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:5;background:#fe2c55;color:#fff;border-radius:24px;padding:12px 42px;font-size:15px;font-weight:600;white-space:nowrap}

/* 抖音式发布页 */
.publish-page{position:absolute;inset:0;background:#000;color:#fff;display:flex;flex-direction:column;padding:calc(14px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));overflow:hidden}
.publish-back{position:absolute;left:14px;top:calc(12px + env(safe-area-inset-top));z-index:5;width:38px;height:38px;border-radius:50%;background:rgba(0,0,0,.45);color:#fff;font-size:22px;line-height:1}
.publish-preview{position:relative;flex:1;min-height:0;border-radius:12px;overflow:hidden;background:#111;display:flex;align-items:center;justify-content:center}
.publish-media{width:100%;height:100%;object-fit:cover}
.publish-media-empty{display:flex;gap:12px}
.publish-media-empty button{background:#2a2a2c;color:#fff;border:1px solid #444;border-radius:20px;padding:10px 18px;font-size:13px}
.publish-media-empty button:last-child{background:#fe2c55;border-color:#fe2c55}
.cover-edit{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);z-index:4;background:rgba(0,0,0,.62);color:#fff;border-radius:18px;padding:8px 14px;font-size:12px;cursor:pointer;white-space:nowrap}
.publish-fields{display:flex;flex-direction:column;gap:10px;margin:14px 0}
.publish-fields input,.publish-fields textarea{width:100%;background:transparent;border:none;border-bottom:1px solid #333;color:#fff;padding:8px 0;font-size:14px;outline:none;resize:none;line-height:1.5}
.publish-fields textarea{min-height:54px}
.publish-fields input::placeholder,.publish-fields textarea::placeholder{color:#777}
.publish-submit{height:44px;background:#fe2c55;color:#fff;border-radius:22px;font-size:15px;font-weight:600;letter-spacing:1px}
.publish-submit:disabled{background:#555;color:#999}
.publish-disabled{text-align:center;color:#ffd836;font-size:12px;margin-top:8px}

/* 封面编辑器 */
.cover-edit{display:flex;align-items:center;gap:7px}
.cover-edit img{width:22px;height:22px;object-fit:cover;border-radius:4px}
.cover-editor{position:absolute;inset:0;background:#000;z-index:210;display:flex;flex-direction:column;padding:calc(12px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom))}
.cover-editor-head{position:relative;height:44px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:15px;font-weight:600}
.cover-editor-head button{position:absolute;left:0;top:4px;width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:21px}
.cover-tabs{display:flex;gap:6px;margin:6px 0 14px}
.cover-tabs button{flex:1;height:36px;border-radius:8px;background:#222;color:#aaa;border:1px solid #333;font-size:12px}
.cover-tabs button.active{background:#fe2c55;border-color:#fe2c55;color:#fff}
.cover-panel{flex:1;min-height:0;display:flex;flex-direction:column;gap:14px}
.cover-panel video{width:100%;flex:1;min-height:0;object-fit:contain;background:#111;border-radius:10px}
.cover-seek-row{display:flex;align-items:center;gap:10px;color:#ccc;font-size:12px}
.cover-seek-row input{flex:1;accent-color:#fe2c55}
.cover-save,.cover-option{height:44px;border-radius:22px;background:#fe2c55;color:#fff;font-size:15px;font-weight:600}
.cover-option{background:#2a2a2c;border:1px solid #444}
