* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; background:#0f1419; color:#e6edf3; }
.topbar { display:flex; align-items:center; gap:16px; padding:12px 24px; background:#161b22; position:sticky; top:0; z-index:10; }
.brand { font-weight:700; font-size:18px; }
.search { flex:1; } .search input { width:100%; max-width:480px; padding:8px 14px; border-radius:8px; border:1px solid #30363d; background:#0d1117; color:#e6edf3; }
.actions { display:flex; align-items:center; gap:12px; }
.btn { padding:8px 14px; border:none; border-radius:8px; cursor:pointer; background:#21262d; color:#e6edf3; transition:transform .1s, background .2s; }
.btn:hover { background:#30363d; } .btn:active { transform:scale(.96); }
.btn.primary { background:#2ea043; } .btn.primary:hover { background:#3fb950; }
.who { color:#8b949e; } #userBox a { color:#58a6ff; margin-left:6px; }
.filters { display:flex; align-items:center; justify-content:space-between; padding:12px 24px; gap:12px; flex-wrap:wrap; }
.cat-tabs { display:flex; gap:8px; flex-wrap:wrap; }
.cat-tab { padding:6px 14px; border-radius:20px; background:#21262d; cursor:pointer; transition:background .2s, color .2s; }
.cat-tab.active { background:#1f6feb; color:#fff; }
.sort { padding:6px 10px; border-radius:8px; background:#0d1117; color:#e6edf3; border:1px solid #30363d; }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); gap:16px; padding:24px; }
.card { background:#161b22; border:1px solid #30363d; border-radius:12px; overflow:hidden; cursor:pointer;
        transition:transform .15s ease, box-shadow .15s ease, border-color .15s; opacity:0; animation:fadeIn .3s forwards; }
.card:hover { transform:translateY(-4px); box-shadow:0 8px 24px rgba(0,0,0,.4); border-color:#1f6feb; }
@keyframes fadeIn { to { opacity:1; } }
.card-cover { height:120px; background:#0d1117; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.card-cover img { width:100%; height:100%; object-fit:cover; }
.card-cover.grad { color:#c9d1d9; }
.card-ic { width:56px; height:56px; border-radius:14px; object-fit:cover; box-shadow:0 4px 14px rgba(0,0,0,.35); }
.card-ic.ph { display:flex; align-items:center; justify-content:center; font-size:30px; font-weight:700;
              color:#c9d1d9; text-transform:uppercase; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08); }
.card-body { padding:14px 16px; }
.card .ttl { font-weight:600; font-size:15px; margin-bottom:6px; }
.card .sum { color:#8b949e; font-size:13px; height:36px; overflow:hidden; }
.card .meta { display:flex; justify-content:space-between; margin-top:10px; font-size:12px; color:#8b949e; }
.stars { color:#f1c40f; letter-spacing:2px; }
.type-badge { font-size:11px; padding:2px 6px; border-radius:4px; background:#30363d; }
.feat-badge { font-size:11px; padding:2px 6px; border-radius:4px; background:#3a2d00; color:#f1c40f; margin-left:4px; }
.hidden-badge { font-size:11px; padding:2px 6px; border-radius:4px; background:#3a1d1d; color:#f85149; margin-left:4px; }

/* 首页分区 */
.sections { padding:8px 24px 32px; }
.home-sec { margin-top:24px; }
.home-sec h2 { font-size:18px; margin-bottom:12px; }
.home-sec .row { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); gap:16px; }
.skeleton { background:linear-gradient(90deg,#161b22 25%,#21262d 50%,#161b22 75%); background-size:200% 100%;
            animation:shimmer 1.2s infinite; height:140px; border-radius:12px; }
@keyframes shimmer { to { background-position:-200% 0; } }
.hidden { display:none !important; }
.btn.lg { padding:12px 28px; font-size:15px; font-weight:600; }

/* ===== 详情页 ===== */
.detail-page { padding:24px; }
.dp-wrap { max-width:880px; margin:0 auto; animation:fadeIn .3s; }
.dp-back { margin-bottom:20px; }
.dp-cover { border-radius:16px; overflow:hidden; margin-bottom:16px; max-height:280px; }
.dp-cover img { width:100%; max-height:280px; object-fit:cover; display:block; }
.dp-hero { display:flex; gap:24px; background:#161b22; border:1px solid #30363d; border-radius:16px; padding:28px; }
.dp-icon-img, .dp-icon-ph { width:96px; height:96px; border-radius:20px; flex-shrink:0; object-fit:cover; }
.dp-icon-ph { display:flex; align-items:center; justify-content:center; font-size:44px; font-weight:700; color:#c9d1d9;
              background:linear-gradient(135deg,#262c36,#313945); text-transform:uppercase; border:1px solid rgba(255,255,255,.08); }
.dp-hero-main { flex:1; min-width:0; }
.dp-title-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.dp-title-row h1 { font-size:26px; }
.dp-meta { color:#8b949e; margin-top:8px; }
.dp-rating { display:flex; align-items:center; gap:8px; margin-top:12px; flex-wrap:wrap; }
.dp-rating .stars { font-size:18px; }
.dp-rating-num { font-weight:700; font-size:18px; color:#f1c40f; }
.dp-rating-cnt, .dp-uses { color:#8b949e; font-size:13px; }
.dp-cta { margin-top:18px; }
.dp-nofile { color:#8b949e; }
.dp-owner { margin-top:14px; padding:14px; border:1px dashed #30363d; border-radius:10px; }
.dp-owner-t { color:#8b949e; font-size:12px; margin-bottom:8px; }
.dp-owner input[type=file] { color:#e6edf3; }
.dp-section { background:#161b22; border:1px solid #30363d; border-radius:16px; padding:24px; margin-top:16px; }
.dp-section h3 { font-size:16px; margin-bottom:12px; }
.dp-summary { color:#c9d1d9; font-size:15px; margin-bottom:10px; }
.dp-desc { white-space:pre-wrap; color:#c9d1d9; line-height:1.7; }
.dp-shots { display:flex; gap:12px; flex-wrap:wrap; }
.dp-shots img { max-width:240px; border-radius:10px; border:1px solid #30363d; }
.dp-comment { width:100%; margin-top:10px; background:#0d1117; color:#e6edf3; border:1px solid #30363d; border-radius:8px; padding:10px; min-height:72px; }
.dp-reviews { display:flex; flex-direction:column; gap:2px; }
.dp-review { border-bottom:1px solid #21262d; padding:12px 0; }
.dp-review-h { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.dp-review-h .stars { font-size:13px; }
.dp-review-t { color:#6e7681; font-size:12px; margin-left:auto; }
.dp-review-c { color:#8b949e; margin-top:4px; }

/* 详情页：操作/收藏/管理/版本/评价互动 */
.btn.danger { background:#3a1d1d; color:#f85149; }
.btn.danger:hover { background:#4a2424; }
.btn.faved { background:#3a2d00; color:#f1c40f; }
.btn.tip { background:#3a2d00; color:#f1c40f; }
.btn.tip:hover { background:#4a3900; }
.btn.sm { padding:4px 10px; font-size:12px; }
.dp-cta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.dp-actions { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.dp-owner-panel .dp-mgr-block { padding:12px; border:1px dashed #30363d; border-radius:10px; margin-bottom:10px; }
.dp-mgr-t { color:#8b949e; font-size:12px; margin-bottom:6px; }
.dp-inp { width:100%; padding:8px 10px; margin:4px 0; border-radius:8px; background:#0d1117; color:#e6edf3; border:1px solid #30363d; }
.dp-owner-panel input[type=file] { color:#e6edf3; }
.dp-vers { display:flex; flex-direction:column; gap:10px; }
.dp-ver { border:1px solid #30363d; border-radius:10px; padding:12px; }
.dp-ver-t { color:#6e7681; font-size:12px; margin-left:6px; }
.dp-ver-sz { color:#8b949e; font-size:12px; margin-left:6px; }
.dp-ver-log { color:#8b949e; font-size:13px; margin:6px 0 8px; white-space:pre-wrap; }
.dp-rev-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.dp-review-act { margin-top:6px; display:flex; gap:8px; }
.dp-reply { margin-top:6px; padding:8px 10px; background:#0d1117; border-radius:8px; color:#c9d1d9; font-size:13px; border-left:2px solid #2ea043; }

/* 我的主页 */
.my-tabs { display:flex; gap:8px; margin-bottom:16px; }
.my-tab { padding:8px 16px; border-radius:20px; background:#21262d; color:#e6edf3; border:none; cursor:pointer; }
.my-tab.active { background:#1f6feb; color:#fff; }
.my-reviews .dp-review:first-child { border-top:none; }
.my-reviews a { color:#58a6ff; text-decoration:none; }

/* 分页网格 + 加载更多 */
.grid-wrap { padding:24px; }
.grid-inner { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); gap:16px; }
.more-bar { text-align:center; padding:24px 0; }

/* AI 能力标签 / 徽章 */
.cap-pick { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 14px; }
.cap-chip { padding:5px 12px; border-radius:16px; background:#21262d; color:#8b949e; cursor:pointer;
            border:1px solid #30363d; font-size:13px; transition:all .15s; user-select:none; }
.cap-chip:hover { border-color:#1f6feb; }
.cap-chip.on { background:#1f6feb; color:#fff; border-color:#1f6feb; }
.cap-chip.sm { padding:2px 9px; font-size:12px; cursor:default; }
.dp-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.ai-badge { font-size:12px; padding:3px 9px; border-radius:6px; background:#21262d; color:#c9d1d9; }
.ai-badge.key { background:#3a2d00; color:#f1c40f; }
.ai-badge.model { background:#1c2b3a; color:#58a6ff; }
.ai-badge.pricing-free { background:#16331f; color:#3fb950; }
.ai-badge.pricing-freemium { background:#16331f; color:#3fb950; }
.ai-badge.pricing-paid { background:#3a1d1d; color:#f85149; }
.ai-badge.pricing-subscription { background:#2d1f3a; color:#bc8cff; }
.pub-check { display:flex; align-items:center; gap:8px; cursor:pointer; }
.pub-check input { width:auto; }
/* 卡片价格角标 */
.card-cover { position:relative; }
.card-price { position:absolute; top:8px; right:8px; font-size:11px; padding:2px 8px; border-radius:10px;
              backdrop-filter:blur(4px); }
.card-price.pricing-free, .card-price.pricing-freemium { background:rgba(46,160,67,.85); color:#fff; }
.card-price.pricing-paid { background:rgba(248,81,73,.85); color:#fff; }
.card-price.pricing-subscription { background:rgba(188,140,255,.85); color:#fff; }

/* 榜单 */
.rank-list { display:flex; flex-direction:column; gap:8px; }
.rank-row { display:flex; align-items:center; gap:14px; padding:12px; background:#161b22; border:1px solid #30363d;
            border-radius:12px; cursor:pointer; transition:border-color .15s, transform .1s; }
.rank-row:hover { border-color:#1f6feb; transform:translateX(2px); }
.rank-no { width:28px; text-align:center; font-weight:800; font-size:18px; color:#6e7681; flex-shrink:0; }
.rank-no.top { color:#f1c40f; }
.rank-ic { width:48px; height:48px; border-radius:12px; object-fit:cover; flex-shrink:0; }
.rank-ic.ph { display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:700; color:#c9d1d9; }
.rank-main { flex:1; min-width:0; }
.rank-ttl { font-weight:600; }
.rank-sum { color:#8b949e; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rank-metric { color:#f1c40f; font-size:14px; flex-shrink:0; }

/* 作者主页 */
.au-link { color:#58a6ff; text-decoration:none; }
.au-link:hover { text-decoration:underline; }
.au-hero { display:flex; align-items:center; gap:20px; background:#161b22; border:1px solid #30363d;
           border-radius:16px; padding:24px; }
.au-avatar { width:80px; height:80px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.au-avatar.ph { display:flex; align-items:center; justify-content:center; font-size:34px; font-weight:700;
                color:#c9d1d9; background:linear-gradient(135deg,#262c36,#313945); }
.au-main { flex:1; } .au-main h1 { font-size:22px; }
.au-stat { color:#8b949e; margin-top:6px; } .au-stat b { color:#e6edf3; }

/* 评价配图 */
.rev-img-label { display:block; font-size:13px; color:#8b949e; margin:12px 0 6px; }
.rev-kept { display:flex; gap:8px; flex-wrap:wrap; }
.rev-imgs { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.rev-imgs img { width:96px; height:96px; object-fit:cover; border-radius:8px; cursor:pointer; border:1px solid #30363d; }

/* 上架/编辑 整页表单 */
.pub-wrap { max-width:760px; margin:0 auto; animation:fadeIn .3s; }
.pub-wrap h1 { font-size:24px; margin-bottom:4px; }
.pub-sub { color:#8b949e; margin-bottom:20px; }
.pub-sec { background:#161b22; border:1px solid #30363d; border-radius:16px; padding:24px; margin-top:16px; }
.pub-sec h3 { font-size:15px; margin-bottom:14px; color:#e6edf3; }
.pub-sec label { display:block; font-size:13px; color:#8b949e; margin:14px 0 6px; }
.pub-sec label:first-of-type { margin-top:0; }
.pub-sec input[type=text], .pub-sec input:not([type]), .pub-sec textarea, .pub-sec select {
  width:100%; padding:10px 12px; border-radius:8px; background:#0d1117; color:#e6edf3;
  border:1px solid #30363d; font-size:14px; outline:none; transition:border-color .2s; }
.pub-sec input:focus, .pub-sec textarea:focus, .pub-sec select:focus { border-color:#1f6feb; }
.pub-sec input[type=file] { color:#e6edf3; }
.pub-sec select:disabled { opacity:.6; cursor:not-allowed; }
.pub-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.req { color:#f85149; }
.pub-tip { color:#8b949e; font-size:13px; margin-top:8px; }
.pub-actions { display:flex; gap:12px; margin:20px 0 40px; }
.exist-media { display:flex; gap:8px; flex-wrap:wrap; margin:6px 0; }

/* 图片上传 dropzone（仿 rice 反馈模块） */
.uz { border:1.5px dashed #30363d; border-radius:10px; padding:20px; text-align:center; cursor:pointer;
      transition:border-color .2s, background .2s; outline:none; }
.uz:hover, .uz:focus { border-color:#1f6feb; background:rgba(31,111,235,.06); }
.uz.over { border-color:#2ea043; background:rgba(46,160,67,.1); }
.uz-ic { font-size:24px; opacity:.7; }
.uz-hint { color:#8b949e; font-size:13px; margin-top:4px; }
.uz-previews { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.uz-thumb { position:relative; width:72px; height:72px; border-radius:8px; overflow:hidden; border:1px solid #30363d; }
.uz-thumb img { width:100%; height:100%; object-fit:cover; }
.uz-rm { position:absolute; top:2px; right:2px; width:18px; height:18px; line-height:16px; text-align:center;
         background:rgba(0,0,0,.6); color:#fff; border-radius:50%; font-size:13px; cursor:pointer; }
.uz-rm:hover { background:#f85149; }
/* 弹窗里 div 化的上传区，去掉 input 默认 margin */
.modal #pCover, .modal #pShots, .dp-owner-panel #coverUz, .dp-owner-panel #shotUz { margin:6px 0 14px; }
.modal { position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; z-index:30; }
.modal .panel { background:#161b22; border-radius:12px; padding:24px; width:min(520px,92vw); max-height:90vh; overflow-y:auto; }
.modal label { display:block; margin-top:8px; font-size:13px; color:#8b949e; }
.modal input, .modal textarea, .modal select { width:100%; padding:8px 10px; margin:6px 0 14px; border-radius:8px;
          background:#0d1117; color:#e6edf3; border:1px solid #30363d; }
.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:#1f6feb; color:#fff;
         padding:10px 20px; border-radius:8px; z-index:50; box-shadow:0 6px 20px rgba(0,0,0,.35); }
.toast-info { background:#1f6feb; }
.toast-success { background:#2ea043; }
.toast-error { background:#da3633; }

/* 空状态 */
.empty-state { text-align:center; padding:56px 20px; color:#8b949e; }
.empty-ic { font-size:44px; opacity:.7; margin-bottom:8px; }
.empty-state p { margin-bottom:16px; }

/* 我的评价高亮 */
.dp-review.mine { background:rgba(31,111,235,.06); border-left:2px solid #1f6feb; padding-left:10px; border-radius:0 8px 8px 0; }
.mine-badge { font-size:11px; padding:1px 6px; border-radius:4px; background:#1f6feb; color:#fff; }

/* Markdown 介绍排版 */
.dp-desc.md h3, .dp-desc.md h4, .dp-desc.md h5 { margin:12px 0 6px; color:#e6edf3; }
.dp-desc.md p { margin:8px 0; line-height:1.7; }
.dp-desc.md ul { margin:8px 0 8px 20px; }
.dp-desc.md li { margin:3px 0; }
.dp-desc.md code { background:#0d1117; padding:1px 5px; border-radius:4px; font-size:.92em; border:1px solid #30363d; }
.dp-desc.md pre { background:#0d1117; padding:12px; border-radius:8px; overflow-x:auto; border:1px solid #30363d; margin:8px 0; }
.dp-desc.md pre code { background:none; border:none; padding:0; }
.dp-desc.md a { color:#58a6ff; }
.modal .panel.app-modal { max-width:380px; animation:fadeUp .25s cubic-bezier(.4,0,.2,1); }
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
/* 评分控件 */
.rate { display:inline-flex; gap:4px; font-size:28px; cursor:pointer; }
.rate span { color:#30363d; transition:transform .1s, color .15s; }
.rate span.on { color:#f1c40f; }
.rate span:hover { transform:scale(1.2); }
.rate span.pop { animation:pop .3s; }
@keyframes pop { 0%{transform:scale(1);} 50%{transform:scale(1.4);} 100%{transform:scale(1);} }
