/* ============================================
 * PromptHub v5 - 紫蓝渐变现代SaaS主题
 * 智思天下 (c) 2026
 * ============================================ */

/* ===== CSS变量 ===== */
:root {
    --primary: #7C3AED;
    --primary-light: #8B5CF6;
    --primary-dark: #6D28D9;
    --primary-gradient: linear-gradient(135deg, #7C3AED, #3B82F6);
    --primary-gradient-full: linear-gradient(135deg, #7C3AED 0%, #3B82F6 50%, #06B6D4 100%);
    --primary-glow: rgba(124, 58, 237, 0.2);
    --primary-bg: rgba(124, 58, 237, 0.06);
    --bg: #F8FAFC;
    --bg-secondary: #F1F5F9;
    --surface: #FFFFFF;
    --surface-hover: #F8FAFC;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --text: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.08);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --card-radius: 16px;
    --radius: 10px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 240px;
    --topbar-height: 60px;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ===== 整体布局 ===== */
.app-container { display: flex; min-height: 100vh; }

/* ===== 左侧全局侧边栏 ===== */
.global-sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
    transition: transform var(--transition);
}
.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-light);
}
.sidebar-logo a {
    display: flex; align-items: center; gap: 10px;
    color: var(--text); text-decoration: none;
}
.logo-icon {
    width: 40px; height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 16px;
    box-shadow: 0 2px 8px var(--primary-glow);
    flex-shrink: 0;
}
.logo-text {
    font-size: 17px; font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #a855f7 50%, #06b6d4 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoShine 3s ease-in-out infinite;
    color: #667eea;
}
@supports not (-webkit-background-clip: text) {
    .logo-text { color: #667eea; background: none; -webkit-text-fill-color: #667eea; }
}

/* WeChat QR centering */
.modal-container.modal-sm img[alt="微信扫码分享"],
.modal-container.modal-sm img[alt="二维码"] {
    display: block; margin: 0 auto;
}
@keyframes logoShine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.logo-text-img { max-height: 32px; object-fit: contain; vertical-align: middle; }
.nav-menu {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 12px; flex: 1; overflow-y: auto;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius);
    color: var(--text-secondary); font-size: 14px;
    font-weight: 500; transition: var(--transition);
    text-decoration: none; white-space: nowrap;
    border-left: 3px solid transparent;
}
.nav-item:hover {
    background: var(--primary-bg); color: var(--primary);
}
.nav-item.active {
    background: var(--primary-bg); color: var(--primary);
    font-weight: 600; border-left-color: var(--primary);
}
.nav-item svg { flex-shrink: 0; color: currentColor; }
.nav-section-title {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1px;
    padding: 16px 14px 6px;
}
.sidebar-bottom {
    padding: 12px; border-top: 1px solid var(--border-light);
    display: flex; flex-direction: column; gap: 2px;
}

.sidebar-quick-buttons {
    padding: 0 12px 12px;
    display: flex; flex-wrap: wrap; gap: 6px;
    border-top: 1px solid var(--border-light);
}
.sidebar-quick-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 20px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 12px;
    transition: var(--transition); cursor: pointer; text-decoration: none;
}
.sidebar-quick-btn:hover {
    border-color: var(--primary); color: var(--primary);
    background: var(--primary-bg);
}
.sidebar-quick-btn-icon {
    width: 18px; height: 18px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.sidebar-quick-btn-icon img { width: 16px; height: 16px; object-fit: contain; }
.nav-link-icon-sidebar { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex-shrink: 0; }
.nav-link-icon-sidebar img { width: 18px; height: 18px; border-radius: 4px; }

/* ===== 导航手风琴折叠分组 ===== */
.nav-accordion { }
.nav-accordion-toggle {
    cursor: pointer; user-select: none; justify-content: space-between;
}
.nav-accordion-arrow {
    margin-left: auto; font-size: 10px; transition: transform 0.25s;
    color: var(--text-muted);
}
.nav-accordion.open .nav-accordion-arrow { transform: rotate(90deg); }
.nav-accordion-body {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.nav-accordion.open .nav-accordion-body { max-height: 800px; overflow-y: auto; }
.nav-accordion-body .nav-item { padding-left: 36px; font-size: 13px; }

.nav-section-title {
    padding: 8px 14px 4px; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted);
}
.sidebar-quick-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 13px;
    transition: var(--transition); cursor: pointer; text-decoration: none;
    margin: 1px 6px;
}

/* 工具箱侧边栏 — 纯文字链接列表风格 */
.nav-item-toolbox {
    font-size: 14px; padding: 10px 14px;
    display: flex; align-items: center; gap: 10px;
    color: #555; text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex-shrink: 0; width: 100%; box-sizing: border-box;
    text-align: left; justify-content: flex-start;
}
.nav-item-toolbox:hover {
    color: var(--primary);
}
.nav-item-toolbox.active {
    color: var(--primary); font-weight: 600;
}
.nav-item-toolbox svg { flex-shrink: 0; }

/* ===== 主内容容器 ===== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    min-height: 100vh;
}

/* ===== 顶部栏 ===== */
.top-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px; height: var(--topbar-height);
    position: sticky; top: 0; z-index: 50;
    gap: 16px;
}
.top-bar-left { display: flex; align-items: center; gap: 12px; }
.page-title { font-size: 18px; font-weight: 700; color: var(--text); white-space: nowrap; }
.back-link {
    font-size: 14px; color: var(--text-secondary);
    display: flex; align-items: center; gap: 4px; transition: var(--transition);
}
.back-link:hover { color: var(--primary); }
.top-bar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.search-box {
    display: flex; align-items: center;
    background: var(--bg-secondary); border-radius: var(--radius);
    border: 1px solid var(--border); overflow: hidden;
    transition: var(--transition);
}
.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--surface);
}
.search-box input {
    border: none; background: transparent; padding: 8px 12px;
    outline: none; width: 200px; font-size: 14px; color: var(--text);
}
.search-box input::placeholder { color: var(--text-muted); }
.btn-search {
    background: none; border: none; color: var(--text-muted);
    padding: 8px 10px; display: flex; align-items: center; transition: var(--transition);
}
.btn-search:hover { color: var(--primary); }

.menu-toggle {
    display: none; width: 36px; height: 36px; border: 1px solid var(--border);
    background: var(--surface); border-radius: var(--radius-sm);
    align-items: center; justify-content: center;
    color: var(--text-secondary); cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }
.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 99;
}
.sidebar-overlay.show { display: block; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 20px; border-radius: var(--radius); font-size: 14px;
    font-weight: 500; border: 1px solid transparent; transition: var(--transition);
    white-space: nowrap; cursor: pointer; position: relative;
}
.btn-primary {
    background: var(--primary-gradient); color: #fff; border: none;
    box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover {
    box-shadow: 0 4px 16px var(--primary-glow);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 1px 4px var(--primary-glow); }
.btn-outline {
    background: var(--surface); color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--primary); color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.btn-outline.active {
    border-color: var(--primary); color: var(--primary);
    background: var(--primary-bg);
}
.btn-ghost {
    background: transparent; color: var(--text-secondary); border: none;
}
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text); }
.btn-admin { background: var(--text); color: #fff; border: none; }
.btn-admin:hover { background: #334155; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { background: #DC2626; }
.btn-success { background: var(--success); color: #fff; border: none; }
.btn-success:hover { background: #059669; }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: var(--radius-xs); }

/* ===== 首页Banner ===== */
.home-banner {
    margin: -20px -24px 24px;
    background: var(--primary-gradient-full);
    padding: 48px 32px 40px;
    position: relative; overflow: hidden;
}
.home-banner::before {
    content: ''; position: absolute;
    top: -50%; right: -10%; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.home-banner::after {
    content: ''; position: absolute;
    bottom: -30%; left: 5%; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.banner-content {
    position: relative; z-index: 1;
    max-width: 700px;
}
.banner-content h1 {
    font-size: 32px; font-weight: 700; color: #fff;
    margin-bottom: 10px; letter-spacing: 0.5px;
}
.banner-content p {
    font-size: 16px; color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px; line-height: 1.6;
}
.banner-search {
    display: flex; gap: 0; max-width: 480px;
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); overflow: hidden;
}
.banner-search input {
    flex: 1; border: none; padding: 14px 20px; outline: none;
    font-size: 15px; color: var(--text);
}
.banner-search input::placeholder { color: var(--text-muted); }
.banner-search button {
    padding: 14px 28px; background: var(--primary-gradient);
    color: #fff; border: none; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    white-space: nowrap;
}
.banner-search button:hover { filter: brightness(1.05); }

.home-banner-img {
    margin: -20px -24px 24px;
}
.home-banner-img img {
    width: 100%; max-height: 280px; object-fit: cover; display: block;
}

/* ===== 功能工具卡片行 ===== */
.feature-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px; margin-bottom: 28px;
}
.feature-tool-card {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--card-radius); cursor: pointer;
    transition: var(--transition); box-shadow: var(--shadow-sm);
}
.feature-tool-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.feature-tool-icon {
    width: 48px; height: 48px; border-radius: var(--radius);
    background: var(--primary-gradient);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px; flex-shrink: 0;
}
.feature-tool-info h4 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.feature-tool-info p { font-size: 12px; color: var(--text-muted); }

/* ===== 网址导航栏 ===== */
.nav-links-bar {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}
.nav-link-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    min-width: 72px; padding: 12px 10px;
    border-radius: var(--radius); color: var(--text-secondary);
    background: var(--surface); border: 1px solid var(--border);
    transition: var(--transition); text-decoration: none; box-shadow: var(--shadow-sm);
}
.nav-link-item:hover {
    border-color: var(--primary); color: var(--primary);
    box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.nav-link-icon {
    width: 36px; height: 36px; border-radius: var(--radius-xs);
    background: var(--primary-bg);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; font-size: 18px;
}
.nav-link-icon img { width: 24px; height: 24px; object-fit: contain; }
.nav-link-title { font-size: 11px; font-weight: 500; white-space: nowrap; }

/* ===== 内容区布局 ===== */
.content-wrapper { display: flex; flex: 1; }

/* ===== 分组侧边栏 ===== */
.content-sidebar {
    width: 200px; background: var(--surface);
    border-right: 1px solid var(--border); padding: 16px 12px;
    flex-shrink: 0; overflow-y: auto; box-shadow: var(--shadow-sm);
}
.sidebar-header { margin-bottom: 14px; }
.sidebar-header h3 { font-size: 14px; font-weight: 700; color: var(--text); }
.group-list { display: flex; flex-direction: column; gap: 2px; }
.group-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 10px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 13px;
    transition: var(--transition); gap: 6px; cursor: pointer;
    text-decoration: none; border-left: 3px solid transparent;
}
.group-item:hover { background: var(--primary-bg); color: var(--primary); }
.group-item.active {
    background: var(--primary-bg); color: var(--primary);
    font-weight: 600; border-left-color: var(--primary);
}
.group-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.group-count { color: var(--text-muted); font-size: 12px; flex-shrink: 0; }

/* ===== 主内容区 ===== */
.main-content { flex: 1; padding: 24px; min-width: 0; }

/* ===== 工具栏 ===== */
.toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; }
.select-filter {
    padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font-size: 13px;
    outline: none; cursor: pointer;
}
.select-filter:focus { border-color: var(--primary); }

/* ===== 首页Tab ===== */
.home-tabs {
    display: flex; gap: 4px; margin-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}
.home-tab {
    padding: 10px 22px; text-decoration: none;
    color: var(--text-secondary); font-size: 15px; font-weight: 500;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: var(--transition);
}
.home-tab:hover { color: var(--text); }
.home-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== 一级分组Tab ===== */
.group-tabs {
    display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap;
}
.group-tab {
    padding: 8px 18px; border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface); color: var(--text-secondary);
    font-size: 14px; cursor: pointer; transition: var(--transition);
    text-decoration: none; white-space: nowrap;
}
.group-tab:hover { border-color: var(--primary); color: var(--primary); }
.group-tab.active {
    background: var(--primary-gradient); border-color: transparent;
    color: #fff; font-weight: 600; box-shadow: 0 2px 8px var(--primary-glow);
}

/* 二级手风琴 */
.subgroups-accordion {
    margin-bottom: 20px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow-sm);
}
.accordion-header {
    font-size: 14px; font-weight: 600; color: var(--text);
    padding: 8px 12px; margin-bottom: 4px;
}
.subgroup-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 14px; margin-bottom: 1px;
    border-radius: var(--radius-sm); cursor: pointer;
    color: var(--text-secondary); font-size: 13px;
    transition: var(--transition); text-decoration: none;
    border-left: 3px solid transparent;
}
.subgroup-item:hover {
    background: var(--primary-bg); color: var(--primary);
}
.subgroup-item.active {
    background: var(--primary-bg); border-left-color: var(--primary);
    color: var(--primary); font-weight: 600;
}
.subgroup-count { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.tree-children { display: none; }
.tree-children.open { display: block; }
.tree-arrow { transition: transform 0.2s; display: inline-block; }
.tree-arrow.open { transform: rotate(90deg); }

.quick-buttons-bar {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}
.quick-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 20px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 13px;
    transition: var(--transition); cursor: pointer; text-decoration: none;
    box-shadow: var(--shadow-sm);
}
.quick-btn:hover {
    border-color: var(--primary); color: var(--primary);
    box-shadow: var(--shadow-md); transform: translateY(-1px);
}
.quick-btn-icon {
    width: 20px; height: 20px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.quick-btn-icon img { width: 18px; height: 18px; object-fit: contain; }

.section-divider { margin: 32px 0 16px; }
.section-title { font-size: 20px; font-weight: 700; color: var(--text); }

/* ===== 卡片网格 ===== */
.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px; align-items: stretch;
}

.prompt-card {
    background: var(--surface); border-radius: var(--card-radius);
    border: 1px solid var(--border); overflow: hidden;
    transition: var(--transition); display: flex; flex-direction: column; height: 100%;
    box-shadow: var(--shadow-sm);
}
.prompt-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #C7D2FE;
    transform: translateY(-2px);
}
/* 纯文字分组卡片 */
.prompt-card.card-text-only { min-height: auto; }
.prompt-card.card-text-only .card-body { padding-top: 16px; }
.card-text-body { padding: 20px 20px 12px; cursor: pointer; flex: 1; }
.card-text-body:hover { background: var(--bg-secondary); }
.card-text-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.card-text-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-text-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.card-image {
    position: relative; cursor: pointer; overflow: hidden;
    background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 16 / 9;
}
.card-image img, .card-image video {
    width: 100%; height: 100%; display: block;
    transition: transform 0.35s; object-fit: cover;
}
.card-image:hover img, .card-image:hover video { transform: scale(1.03); }
.card-image video { pointer-events: none; }
.card-image-placeholder {
    width: 100%; height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    color: var(--text-muted); font-size: 13px;
}
.card-image .video-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.55); z-index: 4; pointer-events: none;
    display: flex; align-items: center; justify-content: center;
}
.card-image .video-icon::after {
    content: ''; width: 0; height: 0;
    border-left: 12px solid #fff;
    border-top: 7px solid transparent; border-bottom: 7px solid transparent;
    margin-left: 3px;
}
.card-video-thumb {
    position: relative; width: 100%; height: 100%; cursor: pointer;
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px;
}
.video-play-badge {
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.35s;
}
.card-image:hover .video-play-badge { transform: scale(1.1); }
.video-thumb-text {
    font-size: 12px; color: rgba(255,255,255,0.75); letter-spacing: 0.5px;
}
.card-body { padding: 14px 16px 8px; flex: 1; }
.card-title {
    font-size: 15px; font-weight: 600; margin-bottom: 6px;
    cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; color: var(--text);
    transition: var(--transition);
}
.card-title:hover { color: var(--primary); }
.card-desc {
    font-size: 12px; color: var(--text-secondary); margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
    padding: 3px 10px; background: var(--primary-bg); color: var(--primary);
    border-radius: 20px; font-size: 11px; font-weight: 500;
}
.tag-featured { background: var(--warning-bg); color: #D97706; }
.card-image-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.25);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition);
}
.card-image:hover .card-image-overlay { opacity: 1; }
.card-image-overlay span {
    background: var(--primary-gradient); color: #fff;
    padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 500;
}

.card-actions {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 16px; border-top: 1px solid var(--border-light);
}
.btn-card {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 5px 12px; border-radius: var(--radius-xs); font-size: 12px;
    border: 1px solid transparent; cursor: pointer; transition: var(--transition);
    font-weight: 500;
}
.btn-preview {
    background: var(--bg-secondary); border-color: var(--border);
    color: var(--text-secondary);
}
.btn-preview:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.btn-copy {
    background: var(--primary-gradient); color: #fff;
    box-shadow: 0 2px 6px var(--primary-glow);
}
.btn-copy:hover { box-shadow: 0 3px 10px var(--primary-glow); transform: translateY(-1px); }
.btn-icon {
    background: none; border: none; color: var(--text-muted);
    padding: 5px 7px; gap: 2px; transition: var(--transition);
    display: inline-flex; align-items: center; font-size: 12px; cursor: pointer;
}
.btn-icon:hover { color: var(--primary); }
.btn-icon.active { color: var(--primary); }
.btn-icon .like-count { font-size: 11px; margin-left: 2px; }

.card-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 16px 14px; font-size: 12px;
}
.author-info { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); transition: var(--transition); text-decoration: none; }
.author-info:hover { color: var(--primary); }
.author-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-light); }
.author-name { font-size: 12px; font-weight: 500; }
.card-time { color: var(--text-muted); font-size: 11px; }
.card-stats { color: var(--text-muted); font-size: 11px; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; padding: 16px 0; }
.page-btn {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--surface); color: var(--text-secondary);
    font-size: 14px; transition: var(--transition); text-decoration: none;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
    background: var(--primary-gradient); border-color: transparent; color: #fff;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* ===== 详情页 ===== */
.detail-page { max-width: 1000px; margin: 0 auto; }
.detail-container { display: flex; gap: 24px; align-items: flex-start; }
.detail-image-section {
    flex: 0 0 58%; border-radius: var(--card-radius); overflow: hidden;
    background: var(--bg-secondary); border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.detail-image {
    width: 100%; max-height: 480px; object-fit: contain;
    background: var(--bg-secondary);
}
.detail-image-section video.detail-image {
    border-radius: var(--card-radius); display: block;
    background: #000; outline: none;
}
.detail-image-placeholder {
    width: 100%; height: 300px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
    background: var(--bg-secondary); color: var(--text-muted);
}
.detail-info-section {
    flex: 1; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--card-radius);
    padding: 24px; box-shadow: var(--shadow);
}
.detail-info-section h1 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.author-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; background: var(--bg-secondary);
    border-radius: var(--radius); margin-bottom: 20px;
}
.author-card-avatar {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--border);
}
.author-card-info { flex: 1; }
.author-card-info h4 { font-size: 15px; font-weight: 600; }
.author-card-info p { font-size: 12px; color: var(--text-muted); }
.prompt-content-box, .prompt-desc-box { margin-bottom: 20px; }
.content-label {
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}
.content-text {
    background: var(--bg-secondary); padding: 18px;
    border-radius: var(--radius); font-size: 13px; line-height: 1.8;
    white-space: pre-wrap; word-break: break-word;
    border: 1px solid var(--border); color: var(--text);
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
}
.detail-actions { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.detail-meta {
    display: flex; flex-wrap: wrap; gap: 16px; padding-top: 16px;
    border-top: 1px solid var(--border-light); font-size: 13px; color: var(--text-secondary);
}
.meta-item { display: flex; align-items: center; gap: 4px; }
.detail-breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-muted); margin-bottom: 16px;
}
.detail-breadcrumb a { color: var(--text-secondary); }
.detail-breadcrumb a:hover { color: var(--primary); }
.detail-breadcrumb span { color: var(--text-muted); }

.related-section { margin-top: 32px; }
.related-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.related-scroll {
    display: flex; gap: 14px; overflow-x: auto;
    padding-bottom: 8px; scroll-snap-type: x mandatory;
}
.related-scroll .prompt-card {
    min-width: 240px; max-width: 260px;
    scroll-snap-align: start; flex-shrink: 0;
}

/* ===== 访问受限 ===== */
.access-block {
    text-align: center; padding: 48px 24px;
    background: var(--bg-secondary); border-radius: var(--card-radius);
    border: 1px solid var(--border);
}
.lock-icon { margin-bottom: 16px; color: var(--text-muted); }
.access-block h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); }
.access-block p { color: var(--text-secondary); margin-bottom: 20px; font-size: 14px; }
.access-buttons { display: flex; gap: 10px; justify-content: center; }

/* ===== 模态框 ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-container {
    background: var(--surface); border-radius: var(--card-radius);
    width: 90%; max-width: 560px; max-height: 85vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: modalIn 0.25s ease;
}
.modal-lg { max-width: 720px; }
.modal-sm { max-width: 420px; }
@keyframes modalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px 16px;
}
.modal-header h3 { font-size: 18px; font-weight: 700; color: var(--text); }
.modal-close {
    width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface);
    border-radius: 50%; font-size: 18px; color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); cursor: pointer;
}
.modal-close:hover { background: var(--bg-secondary); color: var(--text); }
.modal-body { padding: 8px 24px 20px; }
.modal-footer { padding: 0 24px 24px; }
.modal-preview-image { margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; }
.modal-preview-image img {
    width: 100%; max-height: 350px; object-fit: contain;
    background: var(--bg-secondary);
}
.modal-prompt-content {
    background: var(--bg-secondary); padding: 16px;
    border-radius: var(--radius); font-size: 13px; line-height: 1.8;
    white-space: pre-wrap; word-break: break-word;
    border: 1px solid var(--border); max-height: 300px; overflow-y: auto;
    color: var(--text); font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}
.modal-actions-bar { display: flex; gap: 10px; flex-wrap: wrap; }

.qrcode-container { text-align: center; padding: 16px; }
.qrcode-container canvas, .qrcode-container img { margin: 0 auto; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text); margin-bottom: 6px;
}
.form-group label .required { color: var(--danger); }
.form-input {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; outline: none; transition: var(--transition);
    background: var(--surface); color: var(--text);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
textarea.form-input { resize: vertical; min-height: 80px; }

.input-with-upload { display: flex; gap: 8px; align-items: center; }
.input-with-upload .form-input { flex: 1; min-width: 0; }
.upload-btn { flex-shrink: 0; white-space: nowrap; }

/* ===== Toast ===== */
.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: var(--text); color: #fff; padding: 12px 24px;
    border-radius: var(--radius); font-size: 14px; z-index: 2000;
    pointer-events: none; opacity: 0; transition: opacity 0.3s;
    box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; }

/* ===== 页脚 ===== */
.site-footer {
    padding: 20px 28px; border-top: 1px solid var(--border-light);
    background: var(--surface); text-align: center;
}
.site-footer p { color: var(--text-muted); font-size: 12px; }
.footer-icp { margin-top: 4px; }

/* ===== 空状态 ===== */
.empty-state {
    text-align: center; padding: 80px 20px; color: var(--text-muted);
}
.empty-state p { font-size: 16px; margin-bottom: 12px; }
.empty-state svg { margin-bottom: 16px; opacity: 0.4; }

/* ===== 页头（旧 includes/header） ===== */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 50;
}
.header-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; height: 60px;
}
.header-left { display: flex; align-items: center; gap: 32px; }
.header-left .logo {
    font-size: 18px; font-weight: 700; color: var(--text); text-decoration: none;
    display: flex; align-items: center; gap: 8px;
}
.header-left .logo::before {
    content: ''; width: 32px; height: 32px;
    background: var(--primary-gradient); border-radius: var(--radius-xs);
}
.header-nav { display: flex; gap: 4px; }
.header-nav a {
    padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px;
    font-weight: 500; color: var(--text-secondary); transition: var(--transition); text-decoration: none;
}
.header-nav a:hover { background: var(--bg-secondary); color: var(--text); }
.header-nav a.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 8px; }
.site-main { flex: 1; }

/* 旧版add.php表单样式 */
.form-page { max-width: 680px; margin: 0 auto; padding: 24px; }
.form-page h1 { font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.image-upload-area {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 32px; text-align: center; cursor: pointer;
    transition: var(--transition); color: var(--text-muted);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.image-upload-area:hover { border-color: var(--primary); background: var(--primary-bg); }
.image-upload-area svg { width: 40px; height: 40px; }
.image-preview { margin-top: 12px; border-radius: var(--radius); overflow: hidden; display: none; }
.image-preview img { width: 100%; max-height: 200px; object-fit: contain; background: var(--bg-secondary); }
.toggle-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--border); border-radius: 24px; transition: var(--transition);
}
.toggle-slider::before {
    content: ''; position: absolute; width: 18px; height: 18px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--primary-gradient); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-label { font-size: 14px; color: var(--text-secondary); }
.form-btn {
    width: 100%; padding: 12px; background: var(--primary-gradient);
    color: #fff; border: none; border-radius: var(--radius);
    font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.form-btn:hover { box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }

/* ============================================
   后台管理
   ============================================ */
.admin-page { padding: 4px 28px 28px; }
.admin-tabs {
    display: flex; gap: 4px; margin-bottom: 24px;
    border-bottom: 2px solid var(--border-light);
    overflow-x: auto;
}
.admin-tab {
    padding: 10px 20px; border: none; background: none;
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.admin-tab:hover { color: var(--primary); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px; margin-bottom: 28px;
}
.dash-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--card-radius); padding: 24px;
    transition: var(--transition); box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 16px;
}
.dash-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.dash-card-icon {
    width: 52px; height: 52px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.dash-card-icon.purple { background: rgba(124,58,237,0.1); color: #7C3AED; }
.dash-card-icon.green { background: rgba(16,185,129,0.1); color: #10B981; }
.dash-card-icon.amber { background: rgba(245,158,11,0.1); color: #F59E0B; }
.dash-card-icon.blue { background: rgba(59,130,246,0.1); color: #3B82F6; }
.dash-card-body { flex: 1; }
.dash-card .dash-value { font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; }
.dash-card .dash-label { color: var(--text-muted); margin-top: 6px; font-size: 13px; }

.chart-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--card-radius); padding: 24px;
    box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.chart-card h4 { margin-bottom: 16px; font-size: 15px; font-weight: 600; color: var(--text); }
.chart-wrapper { position: relative; width: 100%; }
.chart-wrapper canvas { width: 100% !important; }

.admin-table-section {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--card-radius); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.admin-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.admin-table th, .admin-table td {
    padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border-light);
}
.admin-table th {
    background: var(--bg-secondary); font-weight: 600;
    color: var(--text-secondary); font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-secondary); }
.admin-table tr:nth-child(even) td { background: rgba(241,245,249,0.5); }
.admin-table tr:hover td { background: var(--primary-bg) !important; }
.badge {
    padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500;
    display: inline-block;
}
.badge-success { background: var(--success-bg); color: #059669; }
.badge-warning { background: var(--warning-bg); color: #D97706; }
.badge-danger { background: var(--danger-bg); color: #DC2626; }
.badge-info { background: rgba(59,130,246,0.08); color: #2563EB; }

.toolbar-row {
    display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap;
}
.toolbar-row .form-input { max-width: 280px; }

.group-tree { list-style: none; padding: 0; }
.group-tree li { padding: 5px 0; }
.group-tree .tree-level-0 { padding-left: 0; font-weight: 600; }
.group-tree .tree-level-1 { padding-left: 24px; font-size: 13px; color: var(--text-secondary); }
.group-tree .tree-action { margin-left: 8px; font-size: 11px; cursor: pointer; color: var(--danger); opacity: 0.6; transition: var(--transition); }
.group-tree .tree-action:hover { opacity: 1; }

/* ===== 个人中心 ===== */
.profile-page { max-width: 820px; margin: 0 auto; padding: 24px; }
.profile-header-card {
    background: var(--primary-gradient-full);
    border-radius: var(--card-radius); padding: 40px 32px;
    color: #fff; margin-bottom: 24px; position: relative; overflow: hidden;
}
.profile-header-card::before {
    content: ''; position: absolute;
    top: -30%; right: -10%; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.profile-header-content {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 24px;
}
.profile-avatar-section { flex-shrink: 0; text-align: center; }
.profile-avatar {
    width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.avatar-upload-form { margin-top: 10px; }
.avatar-upload-btn {
    font-size: 12px; color: rgba(255,255,255,0.8);
    cursor: pointer; background: rgba(255,255,255,0.15);
    padding: 4px 12px; border-radius: 20px; border: none;
    transition: var(--transition);
}
.avatar-upload-btn:hover { background: rgba(255,255,255,0.25); }
.profile-info { flex: 1; }
.profile-info h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.profile-info .profile-bio { font-size: 14px; opacity: 0.85; margin-bottom: 8px; }
.profile-info .profile-meta { font-size: 13px; opacity: 0.75; }
.profile-meta span { margin-right: 4px; }

.profile-section {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--card-radius); padding: 24px;
    margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.profile-section h3 { margin-bottom: 18px; font-size: 16px; font-weight: 700; color: var(--text); }

.profile-tabs {
    display: flex; gap: 4px; margin-bottom: 24px;
    border-bottom: 2px solid var(--border-light); flex-wrap: wrap;
}
.profile-tab {
    padding: 10px 20px; border: none; background: none;
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    cursor: pointer; transition: var(--transition);
}
.profile-tab:hover { color: var(--primary); }
.profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.profile-tab-content { display: none; }
.profile-tab-content.active { display: block; }

.activate-section { margin-bottom: 24px; }
.activate-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--card-radius); padding: 20px 24px;
    box-shadow: var(--shadow-sm);
}
.activate-card.activated {
    border-color: rgba(16, 185, 129, 0.3);
    background: var(--success-bg);
}
.activate-icon {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--warning-bg); color: #D97706;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.activate-icon.check-icon { background: var(--success-bg); color: #059669; }

.activate-page { max-width: 480px; margin: 40px auto; text-align: center; }
.activate-page h1 { margin-bottom: 12px; }
.activate-page .activate-card { flex-direction: column; padding: 32px; margin-top: 24px; }
.activate-status {
    display: inline-block; padding: 6px 16px; border-radius: 20px;
    font-weight: 500; font-size: 14px;
}
.activate-status.active { background: var(--success-bg); color: #059669; }
.activate-status.inactive { background: var(--danger-bg); color: #DC2626; }

.auth-page-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #7C3AED 0%, #3B82F6 50%, #06B6D4 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.auth-card {
    background: var(--surface); border-radius: var(--card-radius);
    padding: 40px; width: 100%; max-width: 440px;
    box-shadow: var(--shadow-lg);
}
.auth-card-header { text-align: center; margin-bottom: 28px; }
.auth-card-header .auth-logo {
    width: 56px; height: 56px; background: var(--primary-gradient);
    border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; color: #fff; font-size: 22px; font-weight: 800;
    box-shadow: 0 4px 16px var(--primary-glow);
}
.auth-card-header h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.auth-card-header p { color: var(--text-secondary); font-size: 14px; margin-top: 6px; }
.auth-alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; }
.auth-alert-error { background: var(--danger-bg); color: #991B1B; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-secondary); }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ============================================
   响应式
   ============================================ */

@media (max-width: 1024px) {
    .prompt-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-tools { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-container { flex-direction: column; }
    .detail-image-section { flex: none; }
}

@media (max-width: 768px) {
    .global-sidebar {
        transform: translateX(-100%);
        width: 260px; z-index: 101;
    }
    .global-sidebar.open { transform: translateX(0); }
    .menu-toggle { display: flex; }
    .main-wrapper { margin-left: 0; }
    .top-bar { padding: 0 16px; height: 56px; }
    .content-wrapper { flex-direction: column; }
    .content-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
    .main-content { padding: 16px; }
    .home-banner { margin: -16px -16px 20px; padding: 36px 20px 32px; }
    .home-banner .banner-content h1 { font-size: 24px; }
    .banner-search { flex-direction: column; }
    .banner-search button { padding: 12px; }
    .prompt-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card-body { padding: 10px 12px; }
    .card-actions { padding: 8px 12px; gap: 4px; }
    .card-title { font-size: 13px; }
    .btn-card { font-size: 11px; padding: 4px 8px; }
    .modal-container { width: 95%; max-height: 90vh; }
    .detail-page { max-width: 100%; }
    .detail-container { gap: 12px; }
    .detail-info-section { padding: 16px; }
    .admin-page { padding: 4px 12px 16px; }
    .profile-page { padding: 12px; }
    .profile-header-content { flex-direction: column; text-align: center; }
    .feature-tools { grid-template-columns: 1fr; }
    .nav-links-bar { gap: 6px; }
    .nav-link-item { min-width: 56px; padding: 8px; }
    .dash-grid { grid-template-columns: 1fr; }
    .search-box input { width: 140px; }
    .top-bar-right { gap: 6px; }
    .btn { padding: 7px 14px; font-size: 13px; }
    .header-inner { padding: 0 16px; }
    .header-nav { display: none; }
}

@media (max-width: 480px) {
    .prompt-grid { grid-template-columns: 1fr; }
    .top-bar { gap: 8px; flex-wrap: wrap; height: auto; padding: 10px 12px; }
    .top-bar-right { width: 100%; flex-wrap: wrap; justify-content: flex-end; }
    .btn { padding: 6px 12px; font-size: 12px; }
    .card-actions { flex-wrap: wrap; }
    .detail-actions .btn { font-size: 13px; padding: 8px 14px; }
    .admin-tabs { overflow-x: auto; }
    .admin-tab { padding: 8px 12px; font-size: 12px; }
    .group-tab { padding: 6px 12px; font-size: 12px; }
    .home-banner { padding: 28px 16px 24px; }
    .banner-content h1 { font-size: 20px; }
    .auth-card { padding: 28px 20px; }
}

/* ============================================
 *   ADMIN DASHBOARD
 * ============================================ */
.admin-content { padding: 20px 24px; }
.admin-sidebar { background: #1E293B; }
.admin-sidebar .sidebar-logo a { color: #fff; }
.admin-sidebar .nav-item { color: #94A3B8; }
.admin-sidebar .nav-item:hover { color: #E2E8F0; background: rgba(255,255,255,0.05); }
.admin-sidebar .nav-item.active { color: #fff; background: rgba(124,58,237,0.3); border-left-color: #A78BFA; }
.admin-sidebar .sidebar-bottom { border-top-color: rgba(148,163,184,0.15); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.stat-info { flex: 1; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.admin-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.admin-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.admin-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-section-header h3 { margin-bottom: 0; }

.chart-container { max-height: 300px; margin-top: 8px; }
.chart-container canvas { width: 100% !important; }

.table-wrapper { overflow-x: auto; margin: 0 -1px; }
.table-wrapper table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-wrapper thead th { background: var(--bg); padding: 10px 14px; text-align: left; font-weight: 600; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.table-wrapper tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.table-wrapper tbody tr:nth-child(even) { background: rgba(248,250,252,0.6); }
.table-wrapper tbody tr:hover { background: var(--primary-bg); }

/* ============================================
 *   FORM STYLES
 * ============================================ */
.form-row { display: flex; gap: 16px; align-items: flex-end; }
.form-row .form-group { flex: 1; }
.form-textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; color: var(--text); resize: vertical; min-height: 100px; transition: var(--transition); background: var(--surface); }
.form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-textarea::placeholder { color: var(--text-muted); }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }

.file-upload { display: flex; align-items: center; gap: 10px; }
.file-upload input[type="file"] { display: none; }
.file-upload-label { padding: 8px 16px; background: var(--primary-bg); color: var(--primary); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); white-space: nowrap; border: 1px solid rgba(124,58,237,0.2); }
.file-upload-label:hover { background: rgba(124,58,237,0.15); }
.file-upload-preview { font-size: 12px; color: var(--text-secondary); }

.add-page { max-width: 700px; margin: 0 auto; }
.add-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }

/* Admin tables have actions column colors */
.table-wrapper .btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }

/* ============================================
 *   DASHBOARD STYLES
 * ============================================ */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
.dash-card { background: var(--surface); border-radius: 16px; padding: 24px; display: flex; align-items: center; gap: 20px; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03); transition: all 0.25s ease; }
.dash-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.04); }
.dash-card-left { flex-shrink: 0; }
.dash-card-icon-wrap { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; }
.dash-card-right { flex: 1; min-width: 0; }
.dash-card-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.2; }
.dash-card-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-top: 2px; }
.dash-card-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.dash-card-purple .dash-card-icon-wrap { background: linear-gradient(135deg, #7C3AED, #a78bfa); }
.dash-card-blue .dash-card-icon-wrap { background: linear-gradient(135deg, #3B82F6, #60a5fa); }
.dash-card-cyan .dash-card-icon-wrap { background: linear-gradient(135deg, #06B6D4, #22d3ee); }
.dash-card-green .dash-card-icon-wrap { background: linear-gradient(135deg, #10B981, #34d399); }
.dash-card-orange .dash-card-icon-wrap { background: linear-gradient(135deg, #F59E0B, #fbbf24); }
.dash-card-red .dash-card-icon-wrap { background: linear-gradient(135deg, #EF4444, #f87171); }

.dash-chart-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.dash-chart-section .admin-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dash-chart-section .admin-section-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.chart-period-label { font-size: 12px; color: var(--text-muted); background: var(--bg-secondary); padding: 4px 12px; border-radius: 20px; }
.dash-chart-section .chart-container { height: 320px; position: relative; }
.dash-chart-section .chart-container canvas { width: 100% !important; }

.dash-rank-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.dash-rank-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.rank-list { margin-top: 16px; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.rank-item:last-child { border-bottom: none; }
.rank-num { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--text-secondary); background: var(--bg-secondary); flex-shrink: 0; }
.rank-top1 { background: linear-gradient(135deg, #F59E0B, #FBBF24); color: #fff; }
.rank-top2 { background: linear-gradient(135deg, #94A3B8, #CBD5E1); color: #fff; }
.rank-top3 { background: linear-gradient(135deg, #CD853F, #DEB887); color: #fff; }
.rank-gold { background: linear-gradient(135deg, #F59E0B, #FBBF24); color: #fff; }
.rank-silver { background: linear-gradient(135deg, #94A3B8, #CBD5E1); color: #fff; }
.rank-bronze { background: linear-gradient(135deg, #CD853F, #DEB887); color: #fff; }
.rank-title { flex: 1; font-size: 14px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-extra { font-size: 12px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.rank-empty { text-align: center; color: var(--text-muted); padding: 24px 0; font-size: 14px; }

@media (max-width: 1200px) { .dashboard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .dashboard-grid { grid-template-columns: 1fr; } .dash-rank-row { grid-template-columns: 1fr; } }

/* 激活提示 Toast */
.activation-toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-120px); z-index: 99999; transition: transform 0.3s ease; }
.activation-toast.show { transform: translateX(-50%) translateY(0); }
.activation-toast-inner { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid rgba(245,158,11,0.3); border-radius: 12px; padding: 14px 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); min-width: 320px; }
.activation-toast-inner div { display: flex; flex-direction: column; }
.activation-toast-inner strong { color: #b45309; font-size: 14px; }
.activation-toast-inner small { color: #7C3AED; font-size: 12px; margin-top: 2px; }

/* ============================================
 *   热门标签区 Hot Tags
 * ============================================ */
.hot-tags-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid #F1F5F9;
}
.hot-tags-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.hot-tags-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.hot-tags-title::before {
    content: '#';
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: var(--primary);
    color: #fff;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}
.hot-tags-more {
    font-size: 13px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 2px;
}
.hot-tags-more::after {
    content: '→';
    font-size: 14px;
}
.hot-tags-more:hover {
    color: var(--primary);
}
.hot-tags-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}
.hot-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #F5F7FA;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    user-select: none;
    position: relative;
}
.hot-tag-pill:hover {
    background: #EEF0F4;
    border-color: #E2E8F0;
}
.hot-tag-pill .tag-icon {
    color: #7C3AED;
    flex-shrink: 0;
    transition: color 0.2s ease;
}
.hot-tag-pill .tag-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
.hot-tag-pill .tag-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    background: #E2E8F0;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #94A3B8;
    flex-shrink: 0;
}
/* 全部标签 — 选中态 */
.hot-tag-pill.tag-all {
    background: #7C3AED;
    color: #fff;
    border-color: #7C3AED;
}
.hot-tag-pill.tag-all .tag-icon {
    color: #fff;
}
.hot-tag-pill.tag-all:hover {
    background: #6D28D9;
    border-color: #6D28D9;
}
/* 普通标签选中态 */
.hot-tag-pill.active {
    background: #EDE9FE;
    color: #7C3AED;
    border-color: #C4B5FD;
}
.hot-tag-pill.active .tag-count {
    background: #C4B5FD;
    color: #7C3AED;
}
.hot-tag-pill.active:hover {
    background: #DDD6FE;
    border-color: #A78BFA;
}

@media (max-width: 1200px) {
    .hot-tags-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 900px) {
    .hot-tags-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
    .hot-tags-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .hot-tag-pill { padding: 6px 8px; font-size: 12px; }
    .hot-tags-section { padding: 14px 12px; }
}
