/* ============================================================
   小鲸工具箱 - 全站样式（红色主题 · H5 自适应）
   ============================================================ */

:root {
    /* 主题红 */
    --brand:        #e11d2e;
    --brand-deep:   #b3121f;
    --brand-light:  #ff5964;
    --brand-soft:   #fff1f2;
    --brand-soft-2: #ffe4e6;

    /* 中性色 */
    --ink:      #1f2430;
    --ink-2:    #4b5563;
    --muted:    #7a8699;
    --line:     #eef0f4;
    --bg:       #ffffff;
    --bg-soft:  #f7f8fb;

    /* 页脚深色 */
    --footer-bg:   #16181d;
    --footer-bar:  #0f1114;
    --footer-txt:  #c3c7cf;
    --footer-muted:#8a8f9a;

    --radius:  16px;
    --shadow:  0 12px 30px rgba(24, 30, 45, .08);
    --shadow-hover: 0 20px 46px rgba(190, 24, 40, .18);
    --maxw: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav {
    height: 64px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.brand .bt { font-size: 19px; font-weight: 800; letter-spacing: .5px; color: var(--ink); }
.brand .bt small { display: block; font-size: 10px; font-weight: 500; letter-spacing: 2px; color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
    font-size: 15px; color: var(--ink-2); font-weight: 500; position: relative; padding: 4px 0;
    transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--brand); }
.nav-links a.active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: var(--brand); border-radius: 2px;
}
.nav-cta {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--brand); color: #fff !important; font-weight: 600; font-size: 14px;
    padding: 9px 18px; border-radius: 999px; transition: transform .2s, box-shadow .2s;
    box-shadow: 0 6px 16px rgba(225, 29, 46, .28);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(225, 29, 46, .38); }
.nav-toggle { display: none; background: none; border: 0; font-size: 26px; color: var(--ink); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: linear-gradient(155deg, var(--brand-deep) 0%, var(--brand) 48%, var(--brand-light) 100%);
    color: #fff; overflow: hidden;
    padding: 62px 0 78px;
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, .10); pointer-events: none;
}
.hero::before { width: 380px; height: 380px; top: -140px; right: -80px; }
.hero::after  { width: 240px; height: 240px; bottom: -120px; left: -60px; background: rgba(255,255,255,.07); }
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero .badge {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255,255,255,.25);
    padding: 6px 15px; border-radius: 999px; font-size: 13px; margin-bottom: 20px;
}
.hero h1 {
    font-size: clamp(28px, 6vw, 48px); font-weight: 800; line-height: 1.25; letter-spacing: 1px;
    text-shadow: 0 6px 24px rgba(90, 0, 8, .3);
}
.hero h1 .hl {
    background: linear-gradient(120deg, #fff4c2, #ffd0d4);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.sub {
    margin: 16px auto 0; max-width: 620px; font-size: clamp(14px, 3.4vw, 18px);
    opacity: .92; line-height: 1.7;
}

/* 两大入口卡片 */
.entry-cards {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
    margin-top: 40px; position: relative; z-index: 1;
}
.entry-card {
    position: relative; display: flex; flex-direction: column; text-align: left;
    background: #fff; border-radius: 22px; padding: 30px 28px 26px; color: var(--ink);
    box-shadow: 0 18px 45px rgba(60, 0, 8, .22); overflow: hidden;
    transition: transform .28s, box-shadow .28s;
}
.entry-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, #4a4a50, #29292e, #141416); /* 默认深色 */
    transition: background .25s;
}
/* 悬浮卡片 → 顶部彩条显示主题色（紫 / 粉） */
.entry-card.c-create:hover::before { background: linear-gradient(90deg, #a78bfa, #8b5cf6, #7c3aed); }
.entry-card.c-shop:hover::before   { background: linear-gradient(90deg, #f9a8d4, #ec4899, #db2777); }
.entry-card:hover { box-shadow: 0 18px 45px rgba(60, 0, 8, .22); } /* 悬浮不位移，卡片不晃动 */
.entry-icon {
    width: 60px; height: 60px; display: grid; place-items: center; border-radius: 17px;
    font-size: 30px; margin-bottom: 16px;
}
.entry-card.c-create .entry-icon { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.entry-card.c-shop .entry-icon   { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.entry-badge {
    position: absolute; top: 28px; right: 26px; font-size: 12px; font-weight: 600;
    padding: 5px 12px; border-radius: 999px; color: #fff;
}
.entry-card.c-create .entry-badge { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.entry-card.c-shop .entry-badge   { background: linear-gradient(135deg, #ec4899, #be185d); }
.entry-card h3 { font-size: 23px; font-weight: 800; }
.entry-card h3 .sys-arrow { color: var(--muted); margin: 0 7px; font-weight: 700; }
.entry-card h3 .sys-tag {
    display: inline-block; vertical-align: middle;
    font-size: 13px; font-weight: 700; line-height: 1.5;
    padding: 2px 11px; border-radius: 8px; color: #fff;
}
.entry-card h3 .sys-a { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.entry-card h3 .sys-b { background: linear-gradient(135deg, #ec4899, #be185d); }
.entry-card .desc { margin-top: 9px; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; flex: 1; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.entry-tags span { font-size: 12.5px; color: var(--ink-2); background: var(--bg-soft); padding: 5px 11px; border-radius: 8px; }
.entry-cta {
    margin-top: 22px; align-self: flex-start;
    display: inline-flex; align-items: center; gap: 9px;
    font-weight: 700; font-size: 15px; color: #fff;
    padding: 13px 32px; border-radius: 12px;
    background: linear-gradient(180deg, #4a4a50 0%, #29292e 48%, #141416 100%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(255, 255, 255, .16);
    transition: background .25s, box-shadow .25s;
}
.entry-cta .arrow { transition: transform .25s; font-size: 16px; }
/* 悬浮卡片任意区域 → 按钮进入选中态，跟随卡片主题色 */
.entry-card.c-create:hover .entry-cta {
    background: linear-gradient(180deg, #a78bfa 0%, #8b5cf6 55%, #6d28d9 100%);
    box-shadow: 0 10px 22px rgba(124, 58, 237, .42), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.entry-card.c-shop:hover .entry-cta {
    background: linear-gradient(180deg, #f9a8d4 0%, #ec4899 55%, #be185d 100%);
    box-shadow: 0 10px 22px rgba(219, 39, 119, .42), inset 0 1px 0 rgba(255, 255, 255, .25);
}
@media (max-width: 720px) { .entry-cta { align-self: stretch; justify-content: center; } }

/* ---------- 通用区块标题 ---------- */
.section { padding: 66px 0; }
.section.alt { background: var(--bg-soft); }
.sec-head { text-align: center; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(24px, 5vw, 34px); font-weight: 800; letter-spacing: 1px; }
.sec-head p { margin-top: 12px; color: var(--muted); font-size: clamp(14px, 3.2vw, 16px); }
.sec-head .line { width: 46px; height: 4px; background: var(--brand); border-radius: 4px; margin: 16px auto 0; }

/* ---------- 为什么选择我们 ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px 24px; text-align: center; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.why-ic {
    width: 62px; height: 62px; margin: 0 auto 16px; display: grid; place-items: center;
    border-radius: 18px; font-size: 30px; background: var(--brand-soft);
}
.why-card h4 { font-size: 18px; font-weight: 700; }
.why-card p { margin-top: 9px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }

/* ---------- Tab 功能展示 ---------- */
.tabs { display: flex; justify-content: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tab-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border: 1.5px solid var(--line); color: var(--ink-2);
    font-size: 16px; font-weight: 700; padding: 12px 26px; border-radius: 999px; cursor: pointer;
    transition: all .25s;
}
.tab-btn .ic { font-size: 19px; }
.tab-btn:hover { border-color: var(--brand-light); color: var(--brand); }
.tab-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(225,29,46,.3); }

.tab-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 34px; }

.tab-panel { display: none; animation: fade .4s ease; }
.tab-panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 分类块 */
.cat { margin-bottom: 40px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.cat-ic {
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px;
    font-size: 23px; background: var(--brand-soft); flex-shrink: 0;
}
.cat-title { font-size: 19px; font-weight: 800; }
.cat-title small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }

/* 功能卡片网格（不可点击，仅展示） */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feat {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 18px 18px 16px; cursor: default; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-soft-2); }
.feat .fic {
    width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px;
    font-size: 21px; background: var(--bg-soft); margin-bottom: 12px;
}
.feat h5 { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.feat p { margin-top: 7px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.tag {
    font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; letter-spacing: .5px;
    line-height: 1.4; color: #fff;
}
.tag.hot  { background: #ef4444; }
.tag.new  { background: #10b981; }
.tag.soon { background: #94a3b8; }

.tab-foot { text-align: center; margin-top: 26px; }
.enter-btn {
    display: inline-flex; align-items: center; gap: 9px;
    background: var(--brand); color: #fff; font-size: 16px; font-weight: 700;
    padding: 14px 34px; border-radius: 999px; box-shadow: 0 12px 28px rgba(225,29,46,.32);
    transition: transform .25s, box-shadow .25s;
}
.enter-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(225,29,46,.42); }
.tab-note { margin-top: 14px; color: var(--muted); font-size: 12.5px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-txt); padding: 48px 0 0; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 40px; padding-bottom: 40px; }
.foot-brand .fb { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.foot-brand .fb img { width: 34px; height: 34px; border-radius: 9px; }
.foot-brand .fb span { font-size: 20px; font-weight: 800; color: #fff; }
.foot-brand p { color: var(--footer-muted); font-size: 13.5px; line-height: 1.8; max-width: 340px; }
.foot-col h5 { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 18px; }
.foot-col .row { display: flex; gap: 10px; font-size: 13.5px; margin-bottom: 12px; line-height: 1.6; }
.foot-col .row .k { color: var(--footer-muted); flex-shrink: 0; }
.foot-col .row .v { color: var(--footer-txt); }
.foot-qr { text-align: center; }
.foot-qr .qrbox {
    width: 118px; height: 118px; border-radius: 12px; background: #fff; padding: 8px;
    display: grid; place-items: center; overflow: hidden;
}
.foot-qr .qrbox img { width: 100%; height: 100%; object-fit: contain; }
.foot-qr .qr-ph {
    width: 100%; height: 100%; border: 1.5px dashed #cbd0d8; border-radius: 8px;
    display: grid; place-items: center; color: #9aa0aa; font-size: 12px; text-align: center; padding: 6px;
}
.foot-qr .qr-cap { margin-top: 10px; font-size: 12.5px; color: var(--footer-muted); }
.foot-bar {
    border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0;
    text-align: center; font-size: 12.5px; color: var(--footer-muted); line-height: 1.9;
}
.foot-bar a { color: var(--footer-muted); }
.foot-bar a:hover { color: #fff; }
.foot-bar .sep { margin: 0 8px; opacity: .5; }

/* ---------- 右侧悬浮工具 ---------- */
.side-tools { position: fixed; right: 16px; bottom: 26px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.side-tools a, .side-tools button {
    width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line);
    background: #fff; color: var(--ink-2); cursor: pointer; box-shadow: var(--shadow);
    display: grid; place-items: center; font-size: 12px; line-height: 1.15; text-align: center;
    transition: transform .2s, color .2s, border-color .2s;
}
.side-tools a:hover, .side-tools button:hover { color: var(--brand); border-color: var(--brand-soft-2); transform: translateY(-2px); }
.side-tools .emo { font-size: 18px; }
#toTop { display: none; }

/* 客服二维码弹窗 */
.kefu-item { position: relative; }
.kefu-pop {
    position: absolute; right: calc(100% + 14px); bottom: 0;
    width: 212px; background: #fff; border: 1px solid var(--line);
    border-radius: 16px; box-shadow: 0 18px 44px rgba(0, 0, 0, .20);
    padding: 16px 16px 14px; text-align: center;
    opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s; z-index: 95;
}
.kefu-item:hover .kefu-pop, .kefu-item.open .kefu-pop {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(0);
}
.kefu-pop::before { content: ""; position: absolute; right: -14px; top: 0; bottom: 0; width: 14px; } /* 悬浮桥，防止移入时闪断 */
.kefu-pop::after {
    content: ""; position: absolute; right: -8px; bottom: 16px;
    border: 8px solid transparent; border-left-color: #fff;
}
.kefu-qr { width: 180px; height: 180px; margin: 0 auto; border-radius: 10px; overflow: hidden; }
.kefu-qr img { width: 100%; height: 100%; object-fit: contain; }
.kefu-qr .qr-ph {
    width: 100%; height: 100%; border: 1.5px dashed #cbd0d8; border-radius: 8px;
    display: grid; place-items: center; color: #9aa0aa; font-size: 12px; text-align: center; padding: 6px;
}
.kefu-add { margin-top: 10px; font-weight: 700; font-size: 14.5px; color: var(--ink); }
.kefu-time-h { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.kefu-time { margin-top: 5px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }

/* ============================================================
   H5 / 移动端自适应
   ============================================================ */
@media (max-width: 992px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .feat-grid { grid-template-columns: repeat(3, 1fr); }
    .foot-top { grid-template-columns: 1fr 1fr; }
    .foot-qr { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .site-header.open .nav-links {
        display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
        position: absolute; top: 64px; left: 0; right: 0; background: #fff;
        border-bottom: 1px solid var(--line); padding: 12px 20px 18px; box-shadow: var(--shadow);
    }
    .site-header.open .nav-links a { width: 100%; padding: 10px 0; }
    .site-header.open .nav-links a.active::after { display: none; }
    .site-header.open .nav-cta { margin-top: 6px; }

    .hero { padding: 44px 0 56px; }
    .entry-cards { grid-template-columns: 1fr; gap: 16px; margin-top: 30px; }
    .section { padding: 46px 0; }
    .sec-head { margin-bottom: 30px; }
    .why-grid { grid-template-columns: 1fr; gap: 14px; }
    .feat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tab-btn { font-size: 15px; padding: 11px 20px; }
    .cat-head { gap: 10px; }
    .foot-top { grid-template-columns: 1fr; gap: 28px; text-align: center; }
    .foot-brand .fb { justify-content: center; }
    .foot-brand p { margin: 0 auto; }
    .foot-col .row { justify-content: center; }
    .foot-qr { grid-column: auto; }
    .side-tools { right: 12px; bottom: 16px; }
    .side-tools a, .side-tools button { width: 42px; height: 42px; }
}
@media (max-width: 400px) {
    .feat-grid { grid-template-columns: 1fr; }
    .feat { display: flex; align-items: flex-start; gap: 12px; }
    .feat .fic { margin-bottom: 0; }
    .feat .fbody { flex: 1; }
}
