/* ===================================================
   AI超级工具箱 v2.0 - 全局样式
   扁平化商务简约风格 / PHP8.2企业内部系统
=================================================== */

/* ── 重置 & 基础 ─────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #2c6fbb;
    --primary-dark: #1e5a9e;
    --primary-light: #eaf1fb;
    --bg: #f2f4f7;
    --surface: #fff;
    --surface-2: #f7f9fc;
    --border: #dde3ed;
    --border-light: #eaecf3;
    --text-primary: #1a2236;
    --text-secondary: #4e5a6e;
    --text-muted: #8e99b0;
    --success: #1a9e52;
    --danger: #d04040;
    --warning: #c08c10;
    --info: #2c6fbb;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 3px 10px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 14px;
}

a { text-decoration: none; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; }

/* ── SVG 图标 ────────────────────────────────────── */
.icon {
    display: inline-block;
    vertical-align: -0.15em;
    overflow: hidden;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 28px; height: 28px; }

/* 图标容器（带背景色块） */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}
.icon-box-sm { width: 28px; height: 28px; }
.icon-box-md { width: 36px; height: 36px; }
.icon-box-lg { width: 44px; height: 44px; }
.icon-box-primary { background: var(--primary); color: #fff; }
.icon-box-success { background: var(--success); color: #fff; }
.icon-box-muted { background: var(--surface-2); color: var(--text-secondary); }

/* ── 布局 ────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 16px; }

/* ── 导航栏 ──────────────────────────────────────── */
.top-nav-wrapper {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.top-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 14px;
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 6px; min-width: 80px; }
.nav-right { justify-content: flex-end; }
.nav-title { font-weight: 600; font-size: 15px; text-align: center; flex: 1; }
.nav-title a { color: #fff; }

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.nav-back:hover { background: rgba(255,255,255,0.15); }
.nav-back .icon { width: 16px; height: 16px; }

.nav-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.15s;
    cursor: pointer;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.18); }
.nav-icon-btn .icon { width: 18px; height: 18px; }

.nav-username {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
.nav-avatar {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5); cursor: pointer; flex-shrink: 0;
}
.nav-avatar-placeholder {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.5);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: #fff; cursor: pointer; flex-shrink: 0;
}
.nav-logout-btn {
    padding: 4px 12px; border: 1px solid rgba(255,255,255,0.35);
    border-radius: var(--radius-full); color: #fff; font-size: 12px;
    cursor: pointer; transition: all 0.15s; background: transparent;
}
.nav-logout-btn:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.6); }

/* ── 公告 ────────────────────────────────────────── */
.announcement {
    background: #fffbeb; border: 1px solid #fde68a; border-left: 3px solid var(--warning);
    border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px; color: #78520a; font-size: 13px;
}
.announcement .icon { color: var(--warning); }

/* ── 区块标题 ─────────────────────────────────────── */
.section-title {
    font-size: 15px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.section-title::before {
    content: ''; display: inline-block; width: 3px; height: 16px;
    background: var(--primary); border-radius: 2px;
}
.section-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.section-header-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; color: var(--text-primary);
}
.section-header-title::before {
    content: ''; width: 3px; height: 16px; background: var(--primary);
    border-radius: 2px; display: inline-block;
}
.section-header-right { display: flex; align-items: center; gap: 8px; }

.section-btn {
    background: var(--primary-light); color: var(--primary); border: none;
    padding: 5px 10px; border-radius: var(--radius-sm); font-size: 12px;
    font-weight: 500; cursor: pointer; transition: all 0.15s;
    display: inline-flex; align-items: center; gap: 4px;
}
.section-btn:hover { background: var(--primary); color: #fff; }
.section-btn .icon { width: 14px; height: 14px; }

.more-btn { text-align: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.more-btn a {
    display: inline-flex; align-items: center; gap: 4px; color: var(--primary);
    font-size: 12px; font-weight: 500; background: var(--primary-light);
    padding: 5px 12px; border-radius: var(--radius-full); transition: all 0.15s;
}
.more-btn a:hover { background: var(--primary); color: #fff; }

/* ── 双栏布局 ─────────────────────────────────────── */
.two-column-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; align-items: stretch;
}
@media (max-width: 900px) { .two-column-layout { grid-template-columns: 1fr; } }
.two-col-item {
    background: var(--surface); border-radius: var(--radius-lg); padding: 16px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
    display: flex; flex-direction: column;
}

/* ── 快捷入口 ─────────────────────────────────────── */
.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.quick-link-item {
    background: var(--surface); border-radius: var(--radius-lg); padding: 14px 10px 12px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
    transition: all 0.2s; cursor: pointer;
}
.quick-link-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border); }
.quick-icon {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    display: flex; justify-content: center; align-items: center;
}
.quick-link-item span:last-child { color: var(--text-secondary); font-weight: 500; font-size: 13px; }

/* ── 工具分类卡片 ──────────────────────────────────── */
.tools-section { margin-bottom: 16px; }

/* ── 应用入口区域 ──────────────────────────────── */
.apps-section { margin-bottom: 20px; }
.apps-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 14px;
}
.app-card {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: var(--text-primary);
    transition: all 0.25s ease; cursor: pointer;
    padding: 8px;
}
.app-card:hover { transform: translateY(-3px); }
.app-card-icon-wrap {
    width: 72px; height: 72px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: #fff; margin-bottom: 10px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.app-card:hover .app-card-icon-wrap {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.app-card-icon-wrap .icon { width: 36px; height: 36px; }
.app-card-name {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    text-align: center; width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 640px) {
    .apps-card-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .app-card { padding: 6px; }
    .app-card-icon-wrap { width: 52px; height: 52px; }
    .app-card-icon-wrap .icon { width: 26px; height: 26px; }
    .app-card-name { font-size: 12px; }
}
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1000px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-category-card {
    background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); transition: box-shadow 0.15s;
}
.tool-category-card:hover { box-shadow: var(--shadow-md); }
.tool-category-header {
    padding: 10px 14px; display: flex; align-items: center; gap: 8px;
    background: var(--surface-2); border-bottom: 1px solid var(--border-light);
}
.tool-cat-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.tool-category-body { padding: 8px; }
.tool-link-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 10px; border-radius: var(--radius-sm); margin-bottom: 4px; transition: background 0.15s;
}
.tool-link-item:last-child { margin-bottom: 0; }
.tool-link-item:hover { background: var(--primary-light); }
.tool-link-title {
    color: var(--text-primary); font-size: 13px; flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 6px;
}
.tool-link-btn {
    background: var(--primary); color: #fff; padding: 3px 10px;
    border-radius: var(--radius-full); font-size: 11px; font-weight: 500; white-space: nowrap; flex-shrink: 0;
}
.no-tools { text-align: center; color: var(--text-muted); padding: 14px 8px; font-size: 13px; }

/* ── 提示词预览卡片(首页) ─────────────────────────── */
.prompt-preview-card {
    background: var(--surface-2); border-radius: var(--radius-md); padding: 12px;
    margin-bottom: 8px; border: 1px solid var(--border-light); transition: all 0.15s;
    display: flex; flex-direction: column;
}
.prompt-preview-card:last-child { margin-bottom: 0; }
.prompt-preview-card:hover { background: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(44,111,187,0.1); }
.prompt-preview-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; gap: 6px; }
.prompt-preview-title { font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prompt-preview-meta { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.prompt-preview-content {
    font-size: 12px; color: var(--text-secondary); line-height: 1.6; white-space: pre-wrap; word-break: break-all;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; flex: 1;
}
.prompt-preview-footer { display: flex; justify-content: flex-end; flex-shrink: 0; }
.btn-copy-preview {
    display: inline-flex; align-items: center; gap: 4px; background: var(--primary-light);
    color: var(--primary); border: none; padding: 4px 10px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 500; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.btn-copy-preview:hover { background: var(--primary); color: #fff; }
.btn-copy-preview.copied { background: var(--success); color: #fff; }
.btn-copy-preview .icon { width: 12px; height: 12px; }
.prompt-tag { background: var(--primary-light); color: var(--primary); padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 500; white-space: nowrap; }

/* ── 教程/资料 ─────────────────────────────────────── */
.tutorial-list {
    background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.tutorial-row {
    display: flex; align-items: center; padding: 11px 14px;
    border-bottom: 1px solid var(--border-light); color: inherit; transition: background 0.1s; gap: 10px;
}
.tutorial-row:last-child { border-bottom: none; }
.tutorial-row:hover { background: var(--surface-2); }

/* 首页双栏资料行 */
.two-col-item .tutorial-list { background: transparent; border-radius: 0; box-shadow: none; border: none; display: flex; flex-direction: column; gap: 8px; }
.two-col-item .tutorial-row { background: var(--surface-2); border-radius: var(--radius-md); border: 1px solid var(--border-light); padding: 12px; min-height: 56px; transition: all 0.15s; flex-shrink: 0; }
.two-col-item .tutorial-row:hover { background: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(44,111,187,0.08); }

.tut-preview-card {
    display: flex; flex-direction: column; background: var(--surface-2);
    border-radius: var(--radius-md); padding: 12px; border: 1px solid var(--border-light);
    color: inherit; text-decoration: none; transition: all 0.15s;
}
.tut-preview-card:hover { background: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(44,111,187,0.08); }
.tut-preview-title-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-shrink: 0; }
.tut-preview-title { font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tut-preview-content { font-size: 12px; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; flex: 1; word-break: break-all; }
.tut-preview-footer { display: flex; justify-content: flex-end; flex-shrink: 0; }
.tut-preview-arrow { font-size: 12px; color: var(--primary); font-weight: 500; }
.tutorial-row-icon { width: 28px; height: 28px; background: var(--primary); border-radius: var(--radius-sm); display: flex; justify-content: center; align-items: center; flex-shrink: 0; color: #fff; }
.tutorial-row-icon .icon { width: 14px; height: 14px; }
.tutorial-row-content { flex: 1; min-width: 0; }
.tutorial-row-title { font-size: 13px; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tutorial-row-arrow { color: var(--text-muted); }

/* 教程卡片(tutorials页面) */
.tutorial-card {
    display: flex; align-items: center; background: var(--surface-2);
    border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 6px;
    border: 1px solid var(--border-light); transition: all 0.15s; cursor: pointer;
}
.tutorial-card:last-child { margin-bottom: 0; }
.tutorial-card:hover { background: var(--primary-light); border-color: var(--primary); transform: translateX(2px); }
.tutorial-card-icon {
    width: 36px; height: 36px; background: var(--primary); border-radius: var(--radius-md);
    display: flex; justify-content: center; align-items: center; margin-right: 12px; flex-shrink: 0; color: #fff;
}
.tutorial-card-icon .icon { width: 18px; height: 18px; }
.tutorial-card-content { flex: 1; min-width: 0; }
.tutorial-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.tutorial-card-meta { font-size: 11px; color: var(--text-muted); }
.tutorial-badge-link { background: #dbeafe; color: #1d4ed8; padding: 1px 6px; border-radius: 3px; margin-right: 3px; font-size: 10px; }
.tutorial-badge-doc { background: #fce7f3; color: #be185d; padding: 1px 6px; border-radius: 3px; font-size: 10px; }

/* ── 提示词卡片(详情页) ───────────────────────────── */
.prompt-card {
    background: var(--surface); border-radius: var(--radius-lg); padding: 16px;
    margin-bottom: 10px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); transition: box-shadow 0.15s;
}
.prompt-card:hover { box-shadow: var(--shadow-md); }
.prompt-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.prompt-card-title { font-size: 14px; font-weight: 600; color: var(--primary); }
.prompt-card-badge { background: var(--primary-light); color: var(--primary); padding: 2px 8px; border-radius: var(--radius-full); font-size: 10px; font-weight: 500; }
.prompt-card-content {
    background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px;
    font-size: 13px; color: var(--text-secondary); max-height: 80px; overflow: hidden;
    margin-bottom: 10px; white-space: pre-wrap; line-height: 1.6; border: 1px solid var(--border-light);
}
.prompt-card-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.prompt-card-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.btn-copy {
    background: var(--success); color: #fff; padding: 6px 12px;
    border-radius: var(--radius-sm); font-size: 12px; cursor: pointer;
    border: none; transition: all 0.15s; font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px;
}
.btn-copy:hover { opacity: 0.85; }
.btn-copy .icon { width: 14px; height: 14px; }
.btn-edit-prompt { background: #f1f5f9; color: var(--text-secondary); padding: 6px 12px; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.btn-edit-prompt:hover { background: #e2e8f0; }
.btn-edit-prompt .icon { width: 14px; height: 14px; }
.btn-delete-prompt { background: #fee2e2; color: #dc2626; padding: 6px 12px; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.btn-delete-prompt:hover { background: #fecaca; }
.btn-delete-prompt .icon { width: 14px; height: 14px; }

/* ── 工具卡片(tools页) ────────────────────────────── */
.tool-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-md);
    margin-bottom: 6px; border: 1px solid var(--border-light); transition: all 0.15s;
}
.tool-card:last-child { margin-bottom: 0; }
.tool-card:hover { background: var(--primary-light); border-color: rgba(44,111,187,0.2); }
.tool-card-info { display: flex; align-items: center; flex: 1; min-width: 0; }
.tool-card-icon {
    width: 34px; height: 34px; background: var(--success); border-radius: var(--radius-md);
    display: flex; justify-content: center; align-items: center; margin-right: 10px; flex-shrink: 0; color: #fff;
}
.tool-card-icon .icon { width: 16px; height: 16px; }
.tool-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.tool-card-owner { font-size: 11px; color: var(--text-muted); margin-top: 1px; display: flex; align-items: center; gap: 3px; }
.tool-card-owner .icon { width: 12px; height: 12px; }
.tool-card-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tool-visit-btn {
    padding: 4px 10px; background: var(--primary); color: #fff;
    border-radius: var(--radius-full); font-size: 11px; font-weight: 500; transition: opacity 0.15s;
}
.tool-visit-btn:hover { opacity: 0.85; }

.btn-edit-tool { padding: 4px 8px; background: #fef3c7; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: #92400e; transition: background 0.15s; display: inline-flex; align-items: center; }
.btn-edit-tool:hover { background: #fde68a; }
.btn-edit-tool .icon { width: 14px; height: 14px; }
.btn-delete-tool { padding: 4px 8px; background: #fee2e2; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: #dc2626; transition: background 0.15s; display: inline-flex; align-items: center; }
.btn-delete-tool:hover { background: #fecaca; }
.btn-delete-tool .icon { width: 14px; height: 14px; }

/* ── 首页显示开关 ─────────────────────────────────── */
.home-switch { position: relative; display: inline-block; width: 34px; height: 18px; }
.home-switch input { opacity: 0; width: 0; height: 0; }
.home-slider { position: absolute; cursor: pointer; inset: 0; background: #d1d5db; border-radius: var(--radius-full); transition: 0.2s; }
.home-slider::before { position: absolute; content: ''; height: 12px; width: 12px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.home-switch input:checked + .home-slider { background: var(--success); }
.home-switch input:checked + .home-slider::before { transform: translateX(16px); }

/* ── 搜索框 ──────────────────────────────────────── */
.search-bar { position: relative; margin-bottom: 14px; }
.search-bar input {
    width: 100%; padding: 10px 14px 10px 36px; border: 1px solid var(--border);
    border-radius: var(--radius-full); font-size: 13px; background: var(--surface);
    color: var(--text-primary); transition: border-color 0.15s; outline: none;
}
.search-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(44,111,187,0.1); }
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-bar .search-icon .icon { width: 16px; height: 16px; }

/* ── 页面头部 ────────────────────────────────────── */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--surface); border-radius: var(--radius-lg); padding: 14px 16px;
    margin-bottom: 14px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.page-header h3 { margin: 0; font-size: 15px; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }

/* ── 按钮 ────────────────────────────────────────── */
.btn-add {
    padding: 7px 16px; background: var(--primary); color: #fff; border: none;
    border-radius: var(--radius-md); font-size: 13px; font-weight: 500;
    cursor: pointer; display: flex; align-items: center; gap: 4px; transition: opacity 0.15s;
}
.btn-add:hover { opacity: 0.88; }
.btn-add .icon { width: 14px; height: 14px; }

.btn-add-big {
    padding: 8px 18px; background: var(--primary); color: #fff; border: none;
    border-radius: var(--radius-md); font-size: 13px; font-weight: 500;
    cursor: pointer; display: flex; align-items: center; gap: 6px; transition: opacity 0.15s;
}
.btn-add-big:hover { opacity: 0.88; }
.btn-add-big .icon { width: 16px; height: 16px; }

.btn-submit {
    flex: 1; padding: 10px; background: var(--primary); color: #fff; border: none;
    border-radius: var(--radius-md); font-size: 14px; font-weight: 500; cursor: pointer; transition: opacity 0.15s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-submit:hover { opacity: 0.88; }
.btn-submit .icon { width: 16px; height: 16px; }

.btn-cancel {
    padding: 10px 16px; background: var(--surface-2); color: var(--text-secondary);
    border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 14px; cursor: pointer; transition: background 0.15s;
}
.btn-cancel:hover { background: var(--border); }

/* ── 弹窗 ────────────────────────────────────────── */
.modal {
    display: none; position: fixed; inset: 0; background: rgba(15,18,40,0.45);
    z-index: 1000; justify-content: center; align-items: center; padding: 16px; backdrop-filter: blur(1px);
}
.modal.active { display: flex; }
.modal-content {
    background: var(--surface); border-radius: var(--radius-xl); padding: 22px;
    width: 100%; max-width: 460px; max-height: 85vh; overflow-y: auto;
    box-shadow: var(--shadow-lg); animation: modalIn 0.15s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.97) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
    font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 16px;
    padding-bottom: 12px; border-bottom: 1px solid var(--border-light);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-close {
    width: 26px; height: 26px; background: var(--surface-2); border: none; border-radius: 50%;
    cursor: pointer; color: var(--text-muted); display: flex; align-items: center;
    justify-content: center; transition: background 0.15s;
}
.modal-close:hover { background: var(--border); color: var(--text-primary); }
.modal-close .icon { width: 14px; height: 14px; }
.modal-footer { display: flex; gap: 8px; margin-top: 16px; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ── 表单 ────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: var(--text-secondary); font-size: 13px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
    font-size: 13px; color: var(--text-primary); background: var(--surface); transition: border-color 0.15s; outline: none; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(44,111,187,0.08); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group textarea { min-height: 100px; resize: vertical; }
.sort-input { width: 80px !important; text-align: center; }

/* ── 分类排序 ─────────────────────────────────────── */
.category-sort-item {
    display: flex; align-items: center; padding: 10px 12px; background: var(--surface-2);
    border-radius: var(--radius-md); margin-bottom: 6px; cursor: pointer;
    border: 1px solid var(--border-light); transition: all 0.15s; user-select: none;
}
.category-sort-item:hover { background: var(--primary-light); border-color: var(--primary); }
.sort-modal { display: none; position: fixed; inset: 0; background: rgba(15,18,40,0.45); z-index: 1000; justify-content: center; align-items: center; padding: 16px; }
.sort-modal.active { display: flex; }
.sort-modal-content { background: var(--surface); border-radius: var(--radius-xl); padding: 22px; width: 100%; max-width: 360px; box-shadow: var(--shadow-lg); }
.sort-btns { display: flex; gap: 8px; margin-top: 14px; }
.btn-save-sort { flex: 1; padding: 9px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-md); font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-cancel-sort { padding: 9px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 13px; cursor: pointer; color: var(--text-secondary); }

/* ── 后台管理 ─────────────────────────────────────── */
.admin-container { max-width: 1000px; margin: 0 auto; padding: 16px; }
.admin-header {
    background: var(--primary); color: #fff; padding: 14px 18px;
    border-radius: var(--radius-lg); margin-bottom: 14px;
    display: flex; justify-content: space-between; align-items: center;
}
.admin-header h1 { font-size: 17px; font-weight: 600; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.admin-card { background: var(--surface); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border-light); }
.data-table th { background: var(--surface-2); font-weight: 600; font-size: 12px; color: var(--text-muted); letter-spacing: 0.3px; }
.data-table td { font-size: 13px; color: var(--text-primary); }
.data-table tr:hover td { background: var(--surface-2); }
.btn-edit, .btn-delete { padding: 4px 10px; border: none; border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; cursor: pointer; margin-right: 4px; transition: opacity 0.15s; }
.btn-edit { background: #dbeafe; color: #1d4ed8; }
.btn-edit:hover { background: #bfdbfe; }
.btn-delete { background: #fee2e2; color: #dc2626; }
.btn-delete:hover { background: #fecaca; }

/* ── 空状态 ──────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.empty-state .icon { width: 40px; height: 40px; margin-bottom: 10px; display: block; color: var(--border); }

/* ── 分类标签 ────────────────────────────────────── */
.category-tabs {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px;
    background: var(--surface); padding: 10px; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.tab-item {
    padding: 5px 14px; background: var(--surface-2); color: var(--text-secondary);
    border-radius: var(--radius-full); font-size: 12px; font-weight: 500;
    transition: all 0.15s; cursor: pointer;
}
.tab-item.active { background: var(--primary); color: #fff; }
.tab-item:hover:not(.active) { background: var(--border); }

/* ── 提示词列表 ──────────────────────────────────── */
.prompt-list { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.two-col-item .prompt-list { background: transparent; border-radius: 0; overflow: visible; box-shadow: none; border: none; display: flex; flex-direction: column; gap: 8px; }
.two-col-item .prompt-list .prompt-preview-card { margin-bottom: 0; }
.prompt-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border-light); transition: background 0.1s; gap: 10px; }
.prompt-item:last-child { border-bottom: none; }
.prompt-item:hover { background: var(--surface-2); }
.prompt-item-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.prompt-item-badge { background: var(--primary); color: #fff; padding: 2px 7px; border-radius: var(--radius-full); font-size: 10px; white-space: nowrap; }
.prompt-item-title { font-weight: 600; font-size: 13px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prompt-item-owner { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.prompt-item-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ── 登录页 ──────────────────────────────────────── */
.login-page { min-height: 100vh; background: var(--primary); display: flex; justify-content: center; align-items: center; padding: 16px; position: relative; overflow: hidden; }
.login-page::before { content: ''; position: absolute; top: -40%; right: -20%; width: 500px; height: 500px; background: rgba(255,255,255,0.05); border-radius: 50%; pointer-events: none; }
.login-container { width: 100%; max-width: 380px; position: relative; z-index: 1; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo-icon { width: 56px; height: 56px; background: rgba(255,255,255,0.15); border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; color: #fff; }
.login-logo-icon .icon { width: 28px; height: 28px; }
.login-logo h1 { color: #fff; font-size: 20px; font-weight: 600; }
.login-logo p { color: rgba(255,255,255,0.7); font-size: 12px; margin-top: 4px; }
.login-box { background: #fff; border-radius: var(--radius-xl); padding: 28px 24px; box-shadow: 0 16px 48px rgba(0,0,0,0.2); }
.login-box .form-group input { padding: 11px 14px; font-size: 14px; }
.login-submit-btn { width: 100%; padding: 12px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; cursor: pointer; transition: opacity 0.15s; }
.login-submit-btn:hover { opacity: 0.88; }
.remember-me { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.remember-me input { width: auto; }
.remember-me label { font-size: 12px; color: var(--text-secondary); cursor: pointer; }
.login-error { background: #fee2e2; color: #dc2626; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13px; border: 1px solid #fecaca; }

/* ── 首页欢迎 ────────────────────────────────────── */
.home-container { min-height: 100vh; background: var(--primary); display: flex; justify-content: center; align-items: center; padding: 16px; }
.home-content { text-align: center; color: #fff; }
.home-logo { width: 72px; height: 72px; background: rgba(255,255,255,0.15); border-radius: var(--radius-xl); display: flex; justify-content: center; align-items: center; margin: 0 auto 20px; color: #fff; }
.home-logo .icon { width: 36px; height: 36px; }
.home-title { font-size: 36px; font-weight: 700; margin-bottom: 6px; }
.home-subtitle { font-size: 14px; opacity: 0.8; margin-bottom: 28px; }
.home-btn { display: inline-block; padding: 12px 36px; background: #fff; color: var(--primary); border-radius: var(--radius-full); font-size: 15px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,0.15); transition: all 0.2s; }
.home-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.2); }

/* ── 底部 ────────────────────────────────────────── */
.footer { text-align: center; padding: 20px 0 12px; color: var(--text-muted); font-size: 12px; }

/* ── 图片管理 ────────────────────────────────────── */
.img-upload-area { background: var(--surface); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.img-upload-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light); }
.img-upload-header-icon { color: var(--primary); display: flex; }
.img-upload-header-icon .icon { width: 24px; height: 24px; }
.img-upload-header-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.img-upload-header-sub { font-size: 11px; color: var(--text-muted); }

.img-upload-zone {
    border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 28px 16px;
    text-align: center; cursor: pointer; transition: all 0.15s; background: var(--surface-2);
}
.img-upload-zone:hover, .img-upload-zone.drag-over { border-color: var(--primary); background: var(--primary-light); }
.img-upload-icon { margin-bottom: 8px; color: var(--text-muted); }
.img-upload-icon .icon { width: 32px; height: 32px; }
.img-upload-tip { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.img-upload-hint { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
.btn-choose-file { padding: 8px 20px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-md); font-size: 13px; font-weight: 500; cursor: pointer; transition: opacity 0.15s; }
.btn-choose-file:hover { opacity: 0.88; }

.upload-queue { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.upload-queue-item { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: var(--radius-md); padding: 8px 10px; border: 1px solid var(--border-light); width: calc(50% - 5px); min-width: 220px; }
@media (max-width: 600px) { .upload-queue-item { width: 100%; } }
.upload-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.upload-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.upload-title-input { width: 100%; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 11px; color: var(--text-primary); background: var(--surface); outline: none; font-family: inherit; transition: border-color 0.15s; }
.upload-title-input:focus { border-color: var(--primary); }
.upload-size { font-size: 10px; color: var(--text-muted); }
.upload-remove-btn { width: 22px; height: 22px; background: #fee2e2; border: none; border-radius: 50%; color: #dc2626; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.15s; }
.upload-remove-btn:hover { background: #fecaca; }

/* ── 图片网格 ────────────────────────────────────── */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.img-card { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); transition: all 0.15s; display: flex; flex-direction: column; }
.img-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.img-card-thumb { position: relative; overflow: hidden; height: 140px; cursor: pointer; background: var(--surface-2); }
.img-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.img-card:hover .img-card-thumb img { transform: scale(1.03); }
.img-card-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s; }
.img-card:hover .img-card-overlay { opacity: 1; }
.img-card-view { color: #fff; font-size: 12px; font-weight: 500; background: rgba(255,255,255,0.15); padding: 6px 14px; border-radius: var(--radius-full); backdrop-filter: blur(2px); display: inline-flex; align-items: center; gap: 4px; }
.img-card-view .icon { width: 14px; height: 14px; }
.img-card-info { padding: 8px 10px 4px; flex: 1; }
.img-card-title { font-size: 12px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 3px; }
.img-card-meta { display: flex; gap: 8px; font-size: 10px; color: var(--text-muted); }
.img-card-actions { display: flex; gap: 4px; padding: 6px 10px 8px; border-top: 1px solid var(--border-light); }
.btn-img-copy { flex: 1; padding: 4px 6px; background: var(--primary-light); color: var(--primary); border: none; border-radius: var(--radius-sm); font-size: 10px; font-weight: 500; cursor: pointer; transition: all 0.15s; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.btn-img-copy:hover { background: var(--primary); color: #fff; }
.btn-img-copy.copied { background: var(--success); color: #fff; }
.btn-img-copy .icon { width: 12px; height: 12px; }
.btn-img-edit, .btn-img-delete, .btn-img-download { padding: 4px 6px; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s; flex-shrink: 0; display: inline-flex; align-items: center; }
.btn-img-edit { background: #fef3c7; color: #92400e; }
.btn-img-edit:hover { background: #fde68a; }
.btn-img-edit .icon { width: 14px; height: 14px; }
.btn-img-delete { background: #fee2e2; color: #dc2626; }
.btn-img-delete:hover { background: #fecaca; }
.btn-img-delete .icon { width: 14px; height: 14px; }
.btn-img-download { background: #dbeafe; color: #1d4ed8; }
.btn-img-download:hover { background: #bfdbfe; }
.btn-img-download .icon { width: 14px; height: 14px; }

/* ── 灯箱 ────────────────────────────────────────── */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 2000; justify-content: center; align-items: center; padding: 16px; cursor: pointer; }
.lightbox.active { display: flex; }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 88vh; cursor: default; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox-inner img { max-width: 100%; max-height: 80vh; border-radius: var(--radius-lg); object-fit: contain; box-shadow: 0 16px 48px rgba(0,0,0,0.4); }
.lightbox-close { position: absolute; top: -12px; right: -12px; width: 32px; height: 32px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); border-radius: 50%; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; backdrop-filter: blur(2px); }
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-close .icon { width: 16px; height: 16px; }
.lightbox-caption { color: rgba(255,255,255,0.8); font-size: 12px; max-width: 100%; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-actions { display: flex; gap: 8px; justify-content: center; }
.lightbox-btn-download { padding: 6px 16px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius-full); color: #fff; font-size: 12px; font-weight: 500; cursor: pointer; transition: background 0.15s; backdrop-filter: blur(2px); display: inline-flex; align-items: center; gap: 4px; }
.lightbox-btn-download:hover { background: rgba(255,255,255,0.22); }
.lightbox-btn-download .icon { width: 14px; height: 14px; }

/* ── 首页图片预览区 ──────────────────────────────── */
.home-img-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 2px 0; }
@media (max-width: 900px) { .home-img-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 540px) { .home-img-grid { grid-template-columns: repeat(3, 1fr); } }
.home-img-item { display: block; aspect-ratio: 1/1; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-light); transition: all 0.15s; background: var(--surface-2); position: relative; }
.home-img-item:hover { border-color: var(--primary); transform: scale(1.03); box-shadow: var(--shadow-md); }
.home-img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-img-name { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); color: #fff; font-size: 9px; font-weight: 500; padding: 10px 4px 3px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transition: opacity 0.15s; }
.home-img-item:hover .home-img-name { opacity: 1; }
.home-img-more { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1/1; border-radius: var(--radius-md); background: var(--primary); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; transition: opacity 0.15s; border: 1px solid transparent; }
.home-img-more:hover { opacity: 0.88; }

/* ── 个人资料弹窗 ────────────────────────────────── */
.profile-avatar-section { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0 12px; border-bottom: 1px solid var(--border-light); margin-bottom: 12px; }
.profile-avatar-wrap { position: relative; width: 76px; height: 76px; border-radius: 50%; cursor: pointer; overflow: hidden; border: 3px solid var(--primary-light); transition: border-color 0.15s; flex-shrink: 0; }
.profile-avatar-wrap:hover { border-color: var(--primary); }
.profile-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar-ph { width: 100%; height: 100%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 600; color: #fff; user-select: none; }
.profile-avatar-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 500; opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.profile-avatar-wrap:hover .profile-avatar-overlay { opacity: 1; }
.profile-avatar-hint { font-size: 10px; color: var(--text-muted); text-align: center; line-height: 1.3; }

/* ── Toast ───────────────────────────────────────── */
.global-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px); background: rgba(30,37,53,0.9); color: #fff; padding: 10px 20px; border-radius: var(--radius-full); font-size: 13px; font-weight: 500; white-space: nowrap; pointer-events: none; opacity: 0; z-index: 9999; transition: opacity 0.2s, transform 0.2s; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.global-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.global-toast.toast-error { background: rgba(208,64,64,0.9); }

/* ── 通用辅助类 ──────────────────────────────────── */
.form-input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 13px; color: var(--text-primary); background: var(--surface); outline: none; font-family: inherit; transition: border-color 0.15s; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(44,111,187,0.08); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 540px) { .form-row-2 { grid-template-columns: 1fr; } }
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: var(--radius-full); font-size: 10px; font-weight: 500; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #dcfce7; color: var(--success); }
.badge-warning { background: #fef3c7; color: var(--warning); }
.badge-danger { background: #fee2e2; color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* ── 响应式 ──────────────────────────────────────── */
@media (max-width: 640px) {
    .home-title { font-size: 26px; }
    .quick-links { grid-template-columns: repeat(3, 1fr); gap: 7px; }
    .quick-link-item { padding: 10px 4px 8px; }
    .quick-icon { width: 38px; height: 38px; }
    .quick-link-item span:last-child { font-size: 11px; }
    .category-tabs { flex-wrap: nowrap; overflow-x: auto; }
    .tab-item { white-space: nowrap; }
    .prompt-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .prompt-item-actions { width: 100%; justify-content: flex-end; }
    .prompt-card-actions { justify-content: flex-start; }
    .tool-card { flex-wrap: wrap; gap: 8px; }
    .tool-card-actions { flex-wrap: wrap; }
    .modal-content { padding: 16px 14px; }
    .container { padding: 10px; }
    .page-header { padding: 12px 14px; }
}
@media (max-width: 400px) {
    .quick-links { gap: 5px; }
    .quick-link-item span:last-child { display: none; }
}
