/* ============================================
   基础样式 / 设计系统变量
   ============================================ */

:root {
    /* 品牌色 */
    --brand-red: #c7000b;
    --brand-blue: #0e42d2;
    --brand-blue-light: #1677ff;
    --brand-dark: #0a1a3a;
    --brand-dark-2: #112955;

    /* 文字色 */
    --text-primary: #1a1a1a;
    --text-secondary: #555;
    --text-tertiary: #888;
    --text-inverse: #fff;

    /* 背景色 */
    --bg-page: #f5f7fa;
    --bg-card: #fff;
    --bg-hover: #f0f4ff;

    /* 边框 */
    --border-color: #e5e8ed;
    --border-light: #f0f2f5;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.12);

    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* 布局 */
    --header-height: 64px;
    --sidebar-width: 240px;
    --content-max: 1200px;

    /* 过渡 */
    --transition: all .2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand-blue-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--brand-blue);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* 通用容器 */
.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* 通用按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 28px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-red);
    color: var(--text-inverse);
    border-color: var(--brand-red);
}

.btn-primary:hover {
    background: #b00010;
    color: var(--text-inverse);
}

.btn-secondary {
    background: transparent;
    color: var(--text-inverse);
    border-color: rgba(255,255,255,.5);
}

.btn-secondary:hover {
    background: rgba(255,255,255,.1);
    color: var(--text-inverse);
    border-color: #fff;
}

.btn-outline {
    background: #fff;
    color: var(--brand-blue-light);
    border-color: var(--brand-blue-light);
}

.btn-outline:hover {
    background: var(--bg-hover);
}

/* 通用卡片 */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* 区块标题 */
.section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: "";
    width: 4px;
    height: 20px;
    background: var(--brand-red);
    border-radius: 2px;
}

/* 通用工具类 */
.text-center { text-align: center; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

/* ============================================
   悬浮客服机器人按钮(右下角，悬浮显示微信二维码)
   ============================================ */
.assistant-fab {
    position: fixed;
    right: 24px;
    bottom: 28px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
.assistant-fab-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(145deg, var(--brand-blue-light), var(--brand-blue));
    box-shadow: 0 8px 22px rgba(14, 66, 210, .36);
    transition: transform .22s ease, box-shadow .22s ease;
}
.assistant-fab-btn:hover,
.assistant-fab-btn:focus-visible {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 12px 30px rgba(14, 66, 210, .48);
    outline: none;
}
.assistant-fab-btn svg { width: 34px; height: 34px; }
.assistant-fab-avatar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.assistant-fab-dot {
    position: absolute;
    right: 4px;
    bottom: 6px;
    width: 13px;
    height: 13px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #29d24e;
    animation: assistant-pulse 1.8s infinite;
}
@keyframes assistant-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(41, 210, 78, .55); }
    70%  { box-shadow: 0 0 0 9px rgba(41, 210, 78, 0); }
    100% { box-shadow: 0 0 0 0 rgba(41, 210, 78, 0); }
}
.assistant-fab-pop {
    width: 224px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(16, 37, 68, .24);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(.96);
    transform-origin: bottom right;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.assistant-fab:hover .assistant-fab-pop,
.assistant-fab:focus-within .assistant-fab-pop,
.assistant-fab.is-open .assistant-fab-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.assistant-fab-pop-title {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 700;
    color: #172d4b;
    text-align: center;
}
.assistant-fab-pop-sub {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
}
.assistant-fab-pop img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.assistant-fab-pop-hint {
    margin: 9px 0 0;
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
}
@media (max-width: 520px) {
    .assistant-fab { right: 14px; bottom: 16px; }
    .assistant-fab-btn { width: 52px; height: 52px; }
    .assistant-fab-btn svg { width: 29px; height: 29px; }
    .assistant-fab-pop { width: 200px; }
}
