/* ============================================================
   common.css — AI 提示词教练 3.0 统一设计系统
   所有页面共用的设计令牌 + 组件 + SVG 图标工具类
   ============================================================ */

/* ===== 设计令牌 ===== */
:root {
    /* 品牌色（紫色渐变体系） */
    --color-brand:       #667eea;
    --color-brand-dark:  #5a6fd6;
    --color-brand-light: #818cf8;
    --color-soft:        #eef2ff;
    --color-accent:      #764ba2;
    --color-success:     #22c55e;
    --color-danger:      #ef4444;
    --color-warning:     #f59e0b;
    --color-info:        #3b82f6;

    /* 渐变 */
    --gradient-brand: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-brand-soft: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    --gradient-success: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);

    /* 中性色 */
    --color-bg:          #f8fafc;
    --color-surface:     #ffffff;
    --color-surface-2:   #f1f5f9;
    --color-border:      #e2e8f0;
    --color-border-strong:#cbd5e1;
    --color-text:        #0f172a;
    --color-text-secondary: #475569;
    --color-text-tertiary:  #94a3b8;

    /* 间距 */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  32px;
    --space-2xl: 48px;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
    --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    --shadow-md: 0 4px 6px -1px rgba(15,23,42,0.08), 0 2px 4px -2px rgba(15,23,42,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15,23,42,0.10), 0 4px 6px -4px rgba(15,23,42,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(15,23,42,0.12), 0 8px 10px -6px rgba(15,23,42,0.06);
    --shadow-brand: 0 8px 24px -6px rgba(102,126,234,0.40);
    --shadow-brand-lg: 0 16px 40px -8px rgba(102,126,234,0.45);

    /* 字号 */
    --text-xs:   12px;
    --text-sm:   14px;
    --text-base: 16px;
    --text-lg:   18px;
    --text-xl:   22px;
    --text-2xl:  28px;
    --text-3xl:  36px;
    --text-4xl:  48px;

    /* 字重 */
    --weight-normal: 400;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;

    /* 过渡 */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* 容器最大宽度 */
    --container-max: 680px;

    /* 兼容旧变量（向后兼容） */
    --blue: var(--color-brand-dark);
    --blue-hover: #4f5fc7;
    --dark: var(--color-text);
    --gray: var(--color-text-secondary);
    --light-bg: var(--color-bg);
    --white: var(--color-surface);
    --border: var(--color-border);
    --orange: var(--color-warning);
    --green: var(--color-success);
    --radius: var(--radius-md);
}

/* ===== Vue 模板闪烁防护 ===== */
[v-cloak] { display: none !important; }

/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a { color: var(--color-brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ===== 通用容器 ===== */
.container,
.training-container,
.profile-container,
.daily-container,
.plaza-container {
    max-width: 680px;
    margin: 0 auto;
    padding: var(--space-lg);
    background: var(--color-surface);
    min-height: 100vh;
}

@media (max-width: 600px) {
    .container,
    .training-container,
    .profile-container,
    .daily-container,
    .plaza-container {
        padding: var(--space-md);
        padding-bottom: 100px;
    }
}

/* ===== SVG 图标系统（零依赖，纯内联） ===== */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    vertical-align: middle;
}
.icon svg { width: 100%; height: 100%; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* 图标品牌色变体 */
.icon-brand { color: var(--color-brand); }
.icon-success { color: var(--color-success); }
.icon-danger { color: var(--color-danger); }
.icon-warning { color: var(--color-warning); }
.icon-muted { color: var(--color-text-tertiary); }
.icon-on-brand { color: #fff; }

/* ===== 顶部栏（统一） ===== */
.top-bar-unified {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-xs);
    font-size: var(--text-sm);
}
.top-bar-unified .tb-left {
    display: flex; align-items: center; gap: var(--space-sm);
    min-width: 0;
}
.top-bar-unified .tb-back {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px;
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    transition: var(--transition);
}
.top-bar-unified .tb-back:hover {
    background: var(--color-brand);
    color: #fff;
    text-decoration: none;
}
.top-bar-unified .tb-center {
    font-weight: var(--weight-semibold);
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.top-bar-unified .tb-right {
    display: flex; align-items: center; gap: var(--space-sm);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}
.tb-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
}
.tb-badge.quick   { background: #fff7ed; color: #c2410c; }

/* ===== 顶部栏（新设计系统，与 .top-bar-unified 并存） ===== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-xs);
    font-size: var(--text-sm);
}
.top-bar-back {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px;
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    transition: var(--transition);
    flex-shrink: 0;
}
.top-bar-back:hover {
    background: var(--color-brand);
    color: #fff;
    text-decoration: none;
}
.top-bar-title {
    flex: 1;
    text-align: center;
    font-weight: var(--weight-bold);
    color: var(--color-text);
    font-size: var(--text-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.top-bar-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 12px;
    background: var(--color-soft);
    color: var(--color-brand-dark);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    flex-shrink: 0;
}
.tb-badge.train   { background: #f5f3ff; color: #7c3aed; }
.tb-badge.profile { background: #eff6ff; color: #2563eb; }
.tb-badge.daily   { background: #fef2f2; color: #dc2626; }
.tb-badge.plaza   { background: #f0fdf4; color: #16a34a; }

/* ===== 按钮系统（统一，替换原三套） ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.btn-primary:hover { box-shadow: var(--shadow-brand-lg); }

.btn-accent {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(118,75,162,0.3);
}

.btn-success {
    background: var(--gradient-success);
    color: #fff;
    box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}

.btn-warning {
    background: var(--gradient-warning);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.btn-outline {
    background: var(--color-surface);
    color: var(--color-brand-dark);
    border: 1.5px solid var(--color-brand);
}
.btn-outline:hover { background: #f5f3ff; }

.btn-ghost {
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
}
.btn-ghost:hover { background: var(--color-border); color: var(--color-text); }

.btn-soft {
    background: #eef2ff;
    color: var(--color-brand-dark);
}
.btn-soft:hover { background: #e0e7ff; }

.btn-lg { padding: 14px 28px; font-size: var(--text-base); }
.btn-sm { padding: 6px 14px; font-size: var(--text-xs); }
.btn-block { width: 100%; }
.btn-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}
.btn-group .btn { flex: 1; min-width: 120px; }

/* 兼容旧按钮类 */
.btn-blue { background: var(--gradient-brand); color:#fff; box-shadow: var(--shadow-brand); display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:10px 18px; border:none; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: var(--weight-semibold); text-decoration:none; cursor:pointer; transition: var(--transition); }
.btn-blue:hover { box-shadow: var(--shadow-brand-lg); transform: translateY(-1px); text-decoration:none; }
.btn-orange { background: var(--gradient-warning); color:#fff; box-shadow:0 4px 12px rgba(245,158,11,0.3); display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:10px 18px; border:none; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: var(--weight-semibold); text-decoration:none; cursor:pointer; transition: var(--transition); }
.btn-orange:hover { transform: translateY(-1px); text-decoration:none; }
.btn-green { background: var(--gradient-success); color:#fff; box-shadow:0 4px 12px rgba(34,197,94,0.3); display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:10px 18px; border:none; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: var(--weight-semibold); text-decoration:none; cursor:pointer; transition: var(--transition); }
.btn-green:hover { transform: translateY(-1px); text-decoration:none; }
.btn-gray { background: var(--color-surface-2); color: var(--color-text-secondary); display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 14px; border:none; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--weight-semibold); text-decoration:none; cursor:pointer; transition: var(--transition); }
.btn-gray:hover { background: var(--color-border); text-decoration:none; }
/* ===== 浮动按钮组 - 切换按钮（+ 旋转为 ×）===== */
.btn-more {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    font-size: 0;
}
.btn-more .ic { width: 18px; height: 18px; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.btn-more:hover {
    background: var(--color-surface-2);
    border-color: var(--color-brand-light);
    color: var(--color-brand-dark);
}
.floating-btn-group.expanded .btn-more {
    background: var(--gradient-brand);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-brand);
}
.floating-btn-group.expanded .btn-more .ic {
    transform: rotate(45deg);  /* + 旋转 45° 变成 × */
}

/* ===== 展开菜单 - 滑入动画 ===== */
.extra-btns {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px) scale(0.92);
    transform-origin: bottom right;
    transition: max-height 0.3s ease, opacity 0.22s ease, transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
    pointer-events: none;
}
.floating-btn-group.expanded .extra-btns {
    max-height: 220px;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ===== 卡片 ===== */
.card-white {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-xs);
}

.card-soft {
    background: var(--color-surface-2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-md);
}

.card-brand {
    background: var(--gradient-brand);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-brand);
    margin-bottom: var(--space-md);
}

.card-dashboard {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
    text-align: center;
}
.card-dashboard .dash-challenge {
    background: #fff7ed;
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    border: 1px solid #fed7aa;
    text-align: left;
}

/* ===== 标题层级 ===== */
.page-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.page-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}
h2 { font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--color-text); }
h3 { font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--color-text); }

/* ===== 表单 ===== */
.form-group { margin-bottom: var(--space-lg); }
.form-group label {
    display: block;
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
    font-size: var(--text-sm);
}
.form-group label .hint {
    font-weight: var(--weight-normal);
    color: var(--color-text-tertiary);
    font-size: var(--text-xs);
}
.form-group-hint {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin: -4px 0 8px 0;
    line-height: 1.5;
}
.form-input,
.form-textarea {
    width: 100%;
    padding: 12px var(--space-md);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    font-family: inherit;
    background: var(--color-surface);
    transition: var(--transition);
    color: var(--color-text);
}
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--color-text-tertiary); }

/* ===== 徽章 ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
}
.badge-brand { background: #eef2ff; color: var(--color-brand-dark); }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-muted { background: var(--color-surface-2); color: var(--color-text-secondary); }

/* ===== 加载 ===== */
.loading {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}
.spinner {
    display: inline-block;
    width: 28px; height: 28px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: var(--space-sm);
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-sm {
    width: 16px; height: 16px;
    border-width: 2px;
    margin-bottom: 0;
    vertical-align: middle;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    color: var(--color-text-tertiary);
}
.empty-state .empty-text {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}
.empty-state .empty-hint { font-size: var(--text-sm); }

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: var(--space-md);
}
.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}
.modal-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--color-text);
}
.modal-close {
    background: var(--color-surface-2);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 20px;
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: var(--color-border); color: var(--color-text); }

/* ===== 浮动按钮组 ===== */
.floating-btn-group {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
@media (max-width: 600px) {
    .floating-btn-group {
        bottom: 0;
        right: 0;
        left: 0;
        gap: 0;
        flex-direction: row;
        justify-content: space-around;
        max-width: none;
        background: var(--color-surface);
        border-top: 1px solid var(--color-border);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -2px 12px rgba(15,23,42,0.08);
    }
    /* extra-btns 子元素直接参与父级 flex 布局，5 个按钮平分宽度 */
    .floating-btn-group .extra-btns {
        display: contents !important;
        max-height: none !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }
    /* 所有链接统一为底部导航 tab 样式 */
    .floating-btn-group a {
        padding: 6px 2px !important;
        font-size: 10px !important;
        flex-direction: column;
        gap: 3px;
        flex: 1;
        min-height: 48px;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--color-text-secondary) !important;
        border-radius: var(--radius-sm);
        text-align: center;
    }
    .floating-btn-group a:active {
        background: var(--color-surface-2) !important;
    }
    .floating-btn-group a .ic {
        width: 22px; height: 22px;
    }
    /* 隐藏切换按钮（移动端全部展开为底部 tab） */
    .floating-btn-group .btn-more {
        display: none;
    }
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-brand { color: var(--color-brand-dark); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.font-bold { font-weight: var(--weight-bold); }
.font-semibold { font-weight: var(--weight-semibold); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.hidden { display: none !important; }

/* ===== 公众号底部 banner（非悬浮，统一） ===== */
.wechat-banner {
    max-width: 680px;
    margin: var(--space-lg) auto 0;
    padding: 12px var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    cursor: pointer;
    user-select: none;
    text-align: center;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}
.wechat-banner:hover {
    border-color: var(--color-brand);
    color: var(--color-brand-dark);
}

/* ===== 用户案例展示区 ===== */
.case-section {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 32px 20px;
}
.case-header {
    text-align: center;
    margin-bottom: 20px;
}
.case-title {
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    color: var(--color-text);
    margin-bottom: 6px;
}
.case-sub {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}
.case-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.case-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition);
    cursor: pointer;
}
.case-card:hover {
    border-color: var(--color-brand);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.case-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.case-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: #fff;
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.case-author-info {
    min-width: 0;
}
.case-author {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.case-tag {
    display: inline-block;
    font-size: 11px;
    color: var(--color-text-tertiary);
    background: var(--color-surface-2);
    padding: 1px 8px;
    border-radius: var(--radius-full);
    margin-top: 2px;
}
.case-prompt-title {
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--color-text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.case-scenario {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.case-stats {
    display: flex;
    gap: 12px;
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
    margin-top: auto;
}
.case-stat { display: flex; align-items: center; gap: 3px; }
.case-more {
    text-align: center;
    margin-top: 20px;
}
.case-more a {
    color: var(--color-brand);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
}
.case-more a:hover { text-decoration: underline; }
@media (max-width: 760px) {
    .case-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .case-grid { grid-template-columns: 1fr; }
}

/* ===== 数据证明横条（嵌于案例标题下） ===== */
.data-proof-bar {
    margin: 14px auto 20px;
    padding: 10px 16px;
    background: var(--color-soft);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 18px;
}
.case-section .data-proof-bar {
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}
.data-proof-item {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}
.data-proof-item strong {
    font-size: var(--text-base);
    font-weight: var(--weight-extrabold);
    color: var(--color-brand);
}
.data-proof-item span {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}
.data-proof-divider {
    width: 1px;
    height: 16px;
    background: var(--color-border);
}
@media (max-width: 480px) {
    .data-proof-bar { gap: 10px; padding: 8px 12px; flex-wrap: wrap; justify-content: center; }
    .data-proof-divider { display: none; }
    .data-proof-item strong { font-size: var(--text-base); }
    .data-proof-item span { font-size: 10px; }
}

/* ===== CTA 收口条 ===== */
.cta-closing {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}
.cta-closing-inner {
    background: var(--gradient-brand);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #fff;
    flex-wrap: wrap;
}
.cta-closing-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    margin-bottom: 4px;
}
.cta-closing-sub {
    font-size: var(--text-sm);
    opacity: 0.9;
}
.cta-closing-btns {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.cta-btn {
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}
.cta-btn-primary {
    background: #fff;
    color: var(--color-brand-dark);
}
.cta-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.cta-btn-secondary {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
}
.cta-btn-secondary:hover { background: rgba(255,255,255,0.3); }

/* ===== 统一 Footer ===== */
.site-footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 32px 20px;
    margin-top: 40px;
}
.site-footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    text-align: center;
}
.footer-brand {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: #fff;
    margin-bottom: 12px;
}
.footer-links {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: var(--text-sm);
}
.footer-links a:hover { color: #fff; }
.footer-contact {
    font-size: var(--text-xs);
    color: #94a3b8;
    margin-bottom: 8px;
}
.footer-copy {
    font-size: var(--text-xs);
    color: #64748b;
}
.footer-copy a { color: #94a3b8; text-decoration: none; }
.footer-copy a:hover { color: #fff; }

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 900;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: var(--color-brand);
    color: #fff;
    transform: translateY(-3px);
}

/* ===== Toast（统一，顶部居中） ===== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(30,41,59,0.95);
    color: #fff;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: var(--text-sm);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    width: fit-content;
    max-width: 90vw;
    text-align: center;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.toast-success { background: rgba(16,185,129,0.95); }
.toast.toast-error { background: rgba(239,68,68,0.95); }
.toast.toast-warning { background: rgba(245,158,11,0.95); }

/* ===== 升级引导条（免费页面底部 CTA） ===== */
.upgrade-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #1e293b 0%, #334155 100%);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 9998;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
    animation: slideUp 0.4s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.upgrade-banner-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
}
.upgrade-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--gradient-warning);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(245,158,11,0.4);
    transition: var(--transition);
}
.upgrade-banner-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245,158,11,0.5);
    text-decoration: none;
    color: #fff;
}
/* 底部留出空间避免被 banner 遮挡 */
body.has-upgrade-banner { padding-bottom: 80px; }

/* ===== 试用用户功能锁定遮罩 ===== */
.trial-lock-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.trial-lock-card {
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: var(--shadow-xl);
}
.trial-lock-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.trial-lock-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--color-text);
    margin-bottom: 8px;
}
.trial-lock-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 22px;
}
.trial-lock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 28px;
    background: var(--gradient-brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow-brand);
    transition: var(--transition);
}
.trial-lock-btn:hover {
    box-shadow: var(--shadow-brand-lg);
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}
.trial-lock-back {
    display: block;
    margin-top: 14px;
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    text-decoration: none;
}
.trial-lock-back:hover { text-decoration: underline; }

/* ===== 免费试用倒计时横幅 ===== */
.trial-countdown-banner {
    max-width: 680px;
    margin: 0 auto 10px;
    padding: 8px 16px;
    background: linear-gradient(90deg, #fef3c7, #fff7ed);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: #92400e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ===== 密码强度条 ===== */
.pw-strength { margin-top: 6px; }
.pw-strength-bar {
    height: 4px;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}
.pw-strength-text { font-size: 11px; margin-top: 2px; }
.pw-strength-weak .pw-strength-bar { width: 33%; background: #ef4444; }
.pw-strength-weak .pw-strength-text { color: #ef4444; }
.pw-strength-medium .pw-strength-bar { width: 66%; background: #f59e0b; }
.pw-strength-medium .pw-strength-text { color: #f59e0b; }
.pw-strength-strong .pw-strength-bar { width: 100%; background: #22c55e; }
.pw-strength-strong .pw-strength-text { color: #22c55e; }

/* 密码显示/隐藏切换 */
.pw-toggle {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    cursor: pointer; font-size: 16px;
    padding: 4px; color: var(--color-text-tertiary);
}
