/* ===============================================
 * 服装人神器 - 全局样式
 * 深色科技风，玻璃拟态，蓝色霓虹光
 * 主色 / 辅助 / 警示 / 墨黑，遵循设计稿
 * ============================================= */

:root {
    --c-primary:        #2550D8;        /* 深蓝主色 */
    --c-primary-deep:   #1a3aa0;
    --c-accent:         #4CD964;        /* 荧光绿强调 */
    --c-accent-warm:    #9aff66;        /* 嫩绿（按钮hover） */
    --c-danger:         #F55555;        /* 警示红 */
    --c-bg-deep:        #080B12;        /* 墨黑底 */
    --c-bg-card:        rgba(20, 30, 60, .55);
    --c-bg-glass:       rgba(255,255,255,.04);
    --c-border:         rgba(140, 180, 255, .18);
    --c-border-glow:    rgba(76, 217, 100, .35);
    --c-text:           #EAF0FF;
    --c-text-dim:       #8a9bc4;
    --c-text-faint:     #5a698a;
    --shadow-neon:      0 0 32px rgba(76, 217, 100, .22), 0 0 60px rgba(37,80,216,.18);
    --shadow-card:      0 8px 32px rgba(0,0,0,.5);
    --grad-blue:        linear-gradient(135deg,#2550D8 0%, #4985ff 100%);
    --grad-green:       linear-gradient(135deg,#4CD964 0%, #2bd1ff 100%);
    --grad-deepbg:      radial-gradient(ellipse at top, #0d1736 0%, #080B12 60%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--c-bg-deep);
    color: var(--c-text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* 全局背景：深色 + 网格 + 蓝光 */
.bbs-bg {
    position: fixed; inset: 0; z-index: -1;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(37,80,216,.18) 0%, transparent 60%),
        radial-gradient(ellipse at 100% 100%, rgba(76,217,100,.08) 0%, transparent 50%),
        var(--c-bg-deep);
    overflow: hidden;
}
.bbs-bg::before {
    content:'';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(140,180,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140,180,255,.04) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.bbs-bg::after {
    content:'';
    position: absolute; bottom: -30%; left: 0; right: 0; height: 60%;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='800' height='200' viewBox='0 0 800 200'><path d='M0,150 Q200,50 400,100 T800,80 L800,200 L0,200 Z' fill='none' stroke='%232550d8' stroke-width='1.2' opacity='.18'/><path d='M0,170 Q200,80 400,130 T800,110 L800,200 L0,200 Z' fill='none' stroke='%234CD964' stroke-width='1' opacity='.14'/></svg>") repeat-x;
    background-size: 100% 100%;
    opacity: .8;
    pointer-events: none;
}

/* ============= 公共 ============= */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }

/* 玻璃卡片 */
.glass {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}
.glass::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(140deg, rgba(255,255,255,.06), transparent 40%);
    pointer-events: none;
}
.glass-glow { border-color: var(--c-border-glow); box-shadow: var(--shadow-neon), var(--shadow-card); }

/* 常用原子类 */
.txt-dim   { color: var(--c-text-dim); }
.txt-faint { color: var(--c-text-faint); }
.txt-accent{ color: var(--c-accent); }
.txt-price { color: var(--c-accent-warm); font-weight: 700; }
.txt-danger{ color: var(--c-danger); }
.fz-12 { font-size: 12px; }
.fz-14 { font-size: 14px; }
.fz-16 { font-size: 16px; }
.fz-20 { font-size: 20px; }
.fz-24 { font-size: 24px; }
.fz-32 { font-size: 32px; }
.fz-40 { font-size: 40px; line-height: 1.1; }
.fw-7  { font-weight: 700; }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 44px; padding: 0 22px; border-radius: 999px;
    font-size: 15px; font-weight: 600; letter-spacing: .5px;
    cursor: pointer; border: 1px solid transparent;
    transition: all .2s ease;
    user-select: none; white-space: nowrap;
}
.btn-primary {
    background: var(--c-accent); color: #08101c;
    box-shadow: 0 4px 24px rgba(76,217,100,.4);
}
.btn-primary:hover { background: var(--c-accent-warm); transform: translateY(-1px); }
.btn-ghost {
    background: transparent; color: var(--c-text);
    border-color: var(--c-border);
}
.btn-ghost:hover { border-color: var(--c-accent); color: var(--c-accent); }
.btn-blue {
    background: var(--grad-blue);
    color: #fff;
    box-shadow: 0 4px 24px rgba(37,80,216,.4);
}
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* 顶部 Header */
.header {
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(8,11,18,.72);
    border-bottom: 1px solid var(--c-border);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; padding: 0 24px; max-width: 1280px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: 1px; }
.logo-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--grad-green);
    display: grid; place-items: center; color: #08101c; font-weight: 900;
    box-shadow: 0 0 18px rgba(76,217,100,.4);
}
.logo small { display: block; font-size: 9px; color: var(--c-text-dim); letter-spacing: 2px; font-weight: 400; }
.nav { display: flex; gap: 28px; }
.nav a {
    font-size: 14px; color: var(--c-text-dim);
    padding: 6px 0; position: relative;
    transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--c-accent); }
.nav a.active::after {
    content:''; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px;
    background: var(--c-accent); border-radius: 2px;
    box-shadow: 0 0 8px var(--c-accent);
}
.header-actions { display: flex; gap: 10px; align-items: center; }
.search-icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; color: var(--c-text-dim);
}
.search-icon:hover { color: var(--c-text); }

@media (max-width: 860px) {
    .nav { display: none; }
    .header { background: rgba(8,11,18,.85); }
}

/* 移动端容器 - 让 H5 也有 APP 感 */
@media (max-width: 768px) {
    body { padding-bottom: 80px; }
    .container { padding: 0 16px; }
}

/* 移动端底部 Tab */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 90;
    background: rgba(8,11,18,.92);
    border-top: 1px solid var(--c-border);
    backdrop-filter: blur(20px);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    display: none;
}
@media (max-width: 768px) {
    .tabbar { display: flex; }
}
.tabbar a {
    flex: 1; text-align: center;
    color: var(--c-text-dim); font-size: 12px;
    padding: 6px 4px;
}
.tabbar a b {
    display: block; font-size: 22px; line-height: 1;
    font-weight: 400;
    margin-bottom: 4px;
}
.tabbar a.active, .tabbar a:hover { color: var(--c-accent); }
.tabbar a.active b { filter: drop-shadow(0 0 4px var(--c-accent)); }
.tabbar .tab-pill {
    background: linear-gradient(135deg, rgba(76,217,100,.25), rgba(43,209,255,.18));
    color: var(--c-accent);
    border-radius: 32px;
    margin: -4px 0 4px;
    border: 1px solid var(--c-border-glow);
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(140,180,255,.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(140,180,255,.35); }

/* 通用：分页/列表项 */
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 6px; }
.spacer { flex: 1; }

.section-title {
    display: flex; align-items: baseline; gap: 12px;
    margin: 36px 0 18px;
}
.section-title h2 {
    margin: 0; font-size: 26px; font-weight: 800; letter-spacing: 1px;
    background: linear-gradient(90deg, #fff 0%, var(--c-accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.section-title small { color: var(--c-text-dim); font-size: 13px; }

/* 卡片工具栅格 */
.tools-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.tool-card {
    padding: 22px 18px; text-align: left;
    transition: transform .25s, border-color .25s, box-shadow .25s;
    cursor: pointer;
}
.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--c-border-glow);
    box-shadow: var(--shadow-neon);
}
.tool-card .ic {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; font-size: 24px;
    background: linear-gradient(135deg, rgba(76,217,100,.18), rgba(37,80,216,.18));
    color: var(--c-accent);
    margin-bottom: 12px;
}
.tool-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.tool-card p  { margin: 0; font-size: 12px; color: var(--c-text-dim); line-height: 1.5; }

/* 首页首屏 Hero */
.hero {
    padding: 80px 0 60px;
    position: relative;
}
.hero-grid {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px;
    align-items: center;
}
@media (max-width: 980px) {
    .hero { padding: 40px 0 24px; }
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}
.hero h1 {
    margin: 0 0 18px;
    font-size: 52px; line-height: 1.15; font-weight: 900;
    letter-spacing: 1px;
}
.hero h1 .accent {
    background: linear-gradient(120deg, var(--c-accent) 0%, #2bd1ff 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.lead { color: var(--c-text-dim); font-size: 17px; margin: 0 0 28px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero 右侧"样例卡片" */
.preview-card {
    padding: 30px;
    display: grid; gap: 18px;
}
.preview-card .row-stats {
    display: flex; flex-wrap: wrap; gap: 12px;
    padding: 12px 14px; border-radius: 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--c-border);
    font-size: 12px;
}
.preview-card .row-stats span { color: var(--c-text-dim); margin-right: 8px; }
.preview-card .row-stats b { color: #fff; }
.preview-card .row-stats .pct { color: var(--c-text); }
.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-cards .mini {
    padding: 12px 10px; border-radius: 10px;
    background: rgba(76,217,100,.08); border: 1px solid var(--c-border-glow);
    text-align: center;
}
.mini-cards .mini small { display: block; color: var(--c-text-dim); font-size: 11px; margin-bottom: 4px; }
.mini-cards .mini b { color: var(--c-accent-warm); font-size: 16px; }

/* 通用输入控件 */
.field {
    margin-bottom: 14px;
}
.field label {
    display: block; font-size: 13px; color: var(--c-text-dim);
    margin-bottom: 6px;
}
.field input, .field select {
    width: 100%;
    height: 44px;
    background: rgba(0,0,0,.25);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 0 14px;
    color: var(--c-text); font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus {
    outline: none; border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(76,217,100,.15);
}
.field .suffix { color: var(--c-text-dim); font-size: 12px; margin-left: 6px; }
.field-flex {
    display: flex; gap: 10px; align-items: center;
}
.field-flex .field { flex: 1; margin-bottom: 0; }

.tabs {
    display: inline-flex; padding: 4px; gap: 4px;
    border: 1px solid var(--c-border); border-radius: 999px;
    background: rgba(0,0,0,.25);
    margin-bottom: 24px;
}
.tabs button {
    height: 36px; padding: 0 22px; border-radius: 999px;
    background: transparent; border: 0; color: var(--c-text-dim);
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .2s;
}
.tabs button.active {
    background: var(--c-accent); color: #08101c;
    box-shadow: 0 0 16px rgba(76,217,100,.4);
}

/* 卡片工具：示范 */
.calc-grid {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.calc-card {
    padding: 22px;
}
.calc-card h3 { margin: 0 0 16px; font-size: 16px; color: var(--c-text-dim); }
.calc-card .result {
    padding: 16px;
    border-radius: 12px;
    margin: 16px -8px 0;
    background: rgba(76,217,100,.06);
    border: 1px solid var(--c-border-glow);
    text-align: center;
}
.calc-card .result .label { font-size: 12px; color: var(--c-text-dim); }
.calc-card .result .value {
    font-size: 30px; color: var(--c-danger); font-weight: 800;
    margin: 6px 0 2px;
}

/* 记录卡 */
.record-card {
    padding: 16px 18px; margin-bottom: 12px;
    display: flex; align-items: center; gap: 14px;
}
.record-card .badge {
    width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center; font-size: 18px;
    background: rgba(76,217,100,.12); color: var(--c-accent);
}
.record-card .meta { flex: 1; }
.record-card .meta h4 { margin: 0 0 4px; font-size: 14px; }
.record-card .meta p { margin: 0; color: var(--c-text-dim); font-size: 12px; }
.record-card .price { color: var(--c-danger); font-weight: 800; font-size: 18px; }

/* 头像/标记 */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 12px;
    background: rgba(76,217,100,.14); color: var(--c-accent);
    border: 1px solid var(--c-border-glow);
}
.tag.warn { background: rgba(245,85,85,.12); color: var(--c-danger); border-color: rgba(245,85,85,.3); }
.tag.blue { background: rgba(37,80,216,.16); color: #6ea2ff; border-color: rgba(110,162,255,.3); }

/* 个人中心 header */
.profile-hero {
    padding: 28px;
    margin-bottom: 22px;
}
.profile-hero .head { display: flex; align-items: center; gap: 16px; }
.profile-hero .avatar {
    width: 64px; height: 64px; border-radius: 16px;
    background: var(--grad-blue); color: #fff;
    display: grid; place-items: center; font-size: 30px; font-weight: 800;
}
.profile-hero .name { font-size: 22px; font-weight: 700; }
.profile-hero .row-meta { display: flex; gap: 12px; margin-top: 6px; align-items: center; }
.profile-hero .stat-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
    margin-top: 22px;
}
.profile-hero .stat-grid .stat {
    padding: 18px;
    border-radius: 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--c-border);
    text-align: center;
}
.profile-hero .stat-grid .stat .v { font-size: 26px; font-weight: 800; color: var(--c-accent); }
.profile-hero .stat-grid .stat .l { font-size: 12px; color: var(--c-text-dim); margin-top: 4px; }

/* 会员套餐卡 */
.pkg-card {
    padding: 24px; margin-bottom: 16px;
    display: flex; gap: 18px;
    align-items: stretch;
    position: relative;
}
.pkg-card.recommend { border-color: var(--c-accent); box-shadow: var(--shadow-neon); }
.pkg-card.recommend::before {
    content: '推荐';
    position: absolute; top: -10px; right: 20px;
    padding: 4px 12px; border-radius: 6px;
    background: var(--c-accent); color: #08101c; font-size: 12px; font-weight: 700;
}
.pkg-card .pkg-price {
    font-size: 32px; font-weight: 800; color: var(--c-accent-warm);
    line-height: 1;
}
.pkg-card .pkg-name { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.pkg-card ul { padding-left: 20px; margin: 6px 0 0; color: var(--c-text-dim); font-size: 13px; line-height: 1.9; }
.pkg-card .pkg-meta { display: flex; flex-direction: column; justify-content: space-between; }
.pkg-card .pkg-meta a { width: 100%; }

/* 上传/AI */
.uploader {
    border: 2px dashed rgba(140,180,255,.3);
    border-radius: 18px;
    padding: 50px 30px;
    text-align: center;
    background: rgba(0,0,0,.18);
    cursor: pointer;
}
.uploader:hover { border-color: var(--c-accent); }

/* 弹窗 */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.7);
    display: none; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal.show { display: flex; }
.modal-inner {
    width: 90%; max-width: 420px; padding: 28px;
    animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 自适应 */
@media (max-width: 540px) {
    .hero h1 { font-size: 32px; }
    .hero .cta-row .btn { flex: 1; }
    .section-title h2 { font-size: 20px; }
}

/* 页面小标题 */
.sub-head { font-size: 12px; color: var(--c-text-faint); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }

/* 暖色按钮（首页 CTA 风格） */
.btn-warm {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(255,107,107,.35);
}
.btn-warm:hover { filter: brightness(1.08); }

/* 实用工具 */
.hide-mobile { }
@media (max-width: 768px) {
    .hide-mobile { display: none; }
}
.show-mobile { display: none; }
@media (max-width: 768px) {
    .show-mobile { display: block; }
}

/* 子切换标签（如梭织布空差模式切换） */
.sub-tabs .btn {
    flex: 1; height: 34px; padding: 0 10px; border-radius: 999px;
    background: transparent; border: 1px solid rgba(255,255,255,.08);
    color: var(--c-text-dim); font-size: 13px; cursor: pointer;
    transition: all .2s;
}
.sub-tabs .btn.active {
    background: var(--c-accent); border-color: var(--c-accent);
    color: #08101c; font-weight: 600;
    box-shadow: 0 0 12px rgba(76,217,100,.35);
}
