/* ===============================================================
   zf3d.com 新版样式表
   设计风格：暗色主题 + 大卡片布局 + 渐变色
   =============================================================== */

/* === CSS 变量 === */
:root {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d28;
    --bg-card: #1e2230;
    --bg-hover: #252a3a;
    --text-primary: #e8eaf0;
    --text-secondary: #9ba1b5;
    --text-muted: #6b7185;
    --accent: #31a2fe;
    --accent-hover: #1c80e0;
    --accent-light: rgba(49, 162, 254, 0.15);
    --gradient: linear-gradient(135deg, #055bbe 0%, #31a2fe 100%);
    --gradient-warm: linear-gradient(135deg, #31a2fe 0%, #1c80e0 100%);
    --gradient-cool: linear-gradient(135deg, #31a2fe 0%, #055bbe 100%);
    --border: #2a2e3d;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(49, 162, 254, 0.2);
    --max-width: 1280px;
    --header-height: 64px;
    --skeleton: #1e2230;
    --skeleton-shine: #2a2e3d;
}

/* === 全局滚动条 === */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
::-webkit-scrollbar-corner {
    background: var(--bg-primary);
}
html {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-primary);
}

/* === 浅色主题 === */
:root[data-theme="light"] {
    --bg-primary: #f5f6fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f0f5;
    --text-primary: #1a1d28;
    --text-secondary: #5a6075;
    --text-muted: #9ba1b5;
    --border: #e8eaf0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(49, 162, 254, 0.12);
    --skeleton: #e8eaf0;
    --skeleton-shine: #f0f0f5;
}

/* === 重置 === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[v-cloak] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
    padding-top: var(--header-height);
    transition: padding-right 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding-top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

/* === 布局容器 === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === 头部导航 === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    display: flex;
    align-items: center;
    overflow: visible;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                padding-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
:root[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.95);
}

/* 向下滚动时隐藏 */
.header.nav-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

/* 向上滚动时显示并压缩 */
.header.nav-compact {
    height: 48px;
}

body.assistant-open .header {
    padding-right: 380px;
}

/* The assistant panel reduces the available header width on desktop. Keep the
   primary navigation on one line and let it scroll instead of wrapping. */
body.assistant-open .header .container {
    gap: 12px;
}

body.assistant-open .nav-menu {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.assistant-open .nav-menu::-webkit-scrollbar {
    display: none;
}

body.assistant-open .nav-menu a {
    padding-left: 6px;
    padding-right: 6px;
}

body.assistant-open .search-box {
    width: 96px;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    cursor: pointer;
}

.logo-img, .logo-text {
    background: linear-gradient(
        90deg,
        #055bbe 0%,
        #1c80e0 20%,
        #31a2fe 40%,
        #ffffff 60%,
        #31a2fe 80%,
        #055bbe 100%
    );
    background-size: 300% 100%;
    animation: logoGradient 6s ease infinite;
    transition: filter 0.3s;
}

.logo:hover .logo-img, .logo:hover .logo-text {
    animation-duration: 1.2s;
    filter: brightness(1.3);
}

.logo-img {
    height: 36px;
    width: 36px;
    display: block;
    background-size: 300% 100%;
    animation: logoGradient 6s ease infinite;
    -webkit-mask: url('/assets/images/logo-transparent.png') center / contain no-repeat;
    mask: url('/assets/images/logo-transparent.png') center / contain no-repeat;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    white-space: nowrap;
    background-size: 300% 100%;
    animation: logoGradient 6s ease infinite;
}

@keyframes logoGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
    color: var(--text-primary);
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: hidden;
}

/* 平板端菜单横向滚动，避免裁剪 */
@media (max-width: 900px) and (min-width: 769px) {
    .nav-menu {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
}

.nav-menu a {
    color: var(--text-secondary);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.admin-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-sep {
    color: var(--border);
    font-size: 12px;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 0 12px;
    height: 34px;
    width: 120px;
    transition: border-color 0.2s, width 0.2s;
}

.search-box:focus-within {
    border-color: var(--accent);
}

.search-box input {
    background: transparent;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    border-radius: 24px;
    outline: none;
    padding: 0 16px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* 用户头像 */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    cursor: pointer;
}

.avatar-wrap { position: relative; display: inline-flex; align-items: center; }
.notif-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #f44336;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    border: 2px solid var(--bg-primary, #0f1117);
    z-index: 101;
}

.admin-dropdown {
    position: fixed;
    top: var(--header-height, 64px);
    right: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    padding: 8px 0;
    min-width: 180px;
    z-index: 10001;
    display: none;
}
body.assistant-open .admin-dropdown {
    right: 396px;
}
.admin-dropdown.show { display: block; }
.admin-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s;
}
.admin-dropdown a:hover { background: var(--bg-secondary); }
.admin-dropdown a .dropdown-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #f44336;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.user-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    line-height: 1.4;
}

.user-badge.vip {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #000;
}

.user-badge.svip {
    background: rgba(253, 201, 110, 0.2);
    color: #fdc96e;
}

.user-badge.admin {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* === Hero 区域 === */
.hero {
    position: relative;
    padding: 60px 0 40px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, var(--accent-light) 0%, transparent 60%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* === 区块标题 === */
.section {
    padding: 12px 0 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient);
    border-radius: 2px;
}

.section-more {
    font-size: 14px;
    color: var(--text-muted);
}

/* === 教程卡片网格 === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 8 / 5;
    background: var(--bg-hover);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.card:hover .card-cover img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.card-badge.free {
    background: rgba(0, 206, 201, 0.9);
    color: #fff !important;
}

.card-badge.vip {
    background: rgba(253, 201, 110, 0.9);
    color: #fff !important;
}

.card-badge.share {
    background: rgba(99, 102, 241, 0.9);
    color: #fff !important;
}

.card-badge.comment {
    background: rgba(236, 72, 153, 0.9);
    color: #fff !important;
}

.card-badge.paid {
    background: rgba(239, 68, 68, 0.9);
    color: #fff !important;
}

.card-badge.series {
    background: rgba(99, 102, 241, 0.9);
    color: #fff !important;
    z-index: 10 !important;
}
.card-delete-btn {
    position: absolute; top: 8px; right: 8px;
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(244,67,54,0.85); color: #fff; border: none;
    cursor: pointer; font-size: 14px; line-height: 26px;
    z-index: 5; transition: all 0.15s; opacity: 0;
}
.card:hover .card-delete-btn { opacity: 1; }
.card-delete-btn:hover { background: #f44336; transform: scale(1.1); }
.card-admin-actions {
    display: none; gap: 4px; flex-shrink: 0;
}
.card-admin-actions.show { display: flex; }
.card-admin-btn {
    width: 26px; height: 26px; border-radius: 6px;
    border: none; cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.card-admin-btn.edit-btn { background: rgba(0,122,255,0.15); color: var(--accent); }
.card-admin-btn.edit-btn:hover { background: var(--accent); color: #fff; }
.card-admin-btn.delete-btn { background: rgba(244,67,54,0.15); color: #f44336; }
.card-admin-btn.delete-btn:hover { background: #f44336; color: #fff; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-title-row .card-title { flex: 1; min-width: 0; }

/* === 维度Tab === */
/* === 筛选栏容器（统一sticky + 不透明背景） === */
.filter-bar {
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    background: var(--bg-primary, #0f1117);
    border-bottom: 1px solid var(--border, #30363d);
    padding: 4px 0 8px;
    margin-bottom: 12px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-bar.bar-show {
    top: 48px;
    transform: translateY(0);
    opacity: 1;
}

.filter-bar.bar-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.dim-tabs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border, #30363d);
}

.dim-tabs {
    display: flex;
    gap: 0;
}

.dim-tab {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #8b949e);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    user-select: none;
}

.dim-tab:hover {
    color: var(--text-primary, #c9d1d9);
}

.dim-tab.active {
    color: var(--accent, #58a6ff);
    border-bottom-color: var(--accent, #58a6ff);
}

/* === 两级分类树 === */
.filter-tree {
    margin-top: 8px;
}

.tree-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.tree-subs {
    padding-left: 12px;
    border-left: 2px solid var(--border, #30363d);
    margin-left: 4px;
    margin-bottom: 8px;
}

.tree-item {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary, #8b949e);
    cursor: pointer;
    background: var(--bg-secondary, #21262d);
    transition: all 0.15s;
    user-select: none;
    white-space: nowrap;
}

.tree-item:hover {
    color: var(--text-primary, #c9d1d9);
    background: var(--bg-tertiary, #30363d);
}

.tree-item.active {
    color: #fff;
    background: var(--accent, #58a6ff);
}

.tree-item.sub {
    font-size: 12px;
    padding: 3px 10px;
    background: transparent;
    border: 1px solid var(--border, #30363d);
}

.tree-item.sub:hover {
    border-color: var(--accent, #58a6ff);
    color: var(--accent, #58a6ff);
}

.tree-item.sub.active {
    background: var(--accent, #58a6ff);
    border-color: var(--accent, #58a6ff);
    color: #fff;
}

/* === 视图切换 === */
.view-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-bottom: 6px;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 6px;
    background: var(--bg-secondary, #21262d);
    color: var(--text-muted, #8b949e);
    cursor: pointer;
    border: 1px solid var(--border, #30363d);
    transition: all 0.2s;
    text-decoration: none;
}

.view-btn:hover {
    color: var(--text-primary, #c9d1d9);
}

.view-btn.active {
    background: var(--accent, #58a6ff);
    color: #fff;
    border-color: var(--accent, #58a6ff);
}

/* === 按职业学习页 === */
.career-page {
    padding-top: 12px;
}

.career-filter {
    margin-bottom: 20px;
}

.career-sub-count {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 9px;
    background: rgba(255,255,255,0.08);
    color: inherit;
    font-size: 11px;
}

.career-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    padding: 12px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.career-eyebrow {
    color: #7dd3fc;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.career-heading h1 {
    font-size: 30px;
    line-height: 1.22;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.career-heading p {
    max-width: 760px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.career-stat-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 8px;
    min-width: 300px;
}

.career-stat-strip span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 12px;
}

.career-stat-strip strong {
    color: var(--text-primary);
    font-size: 20px;
}

.career-main {
    min-width: 0;
}

.career-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 26px;
}

.career-summary h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.career-summary p {
    color: var(--text-secondary);
    line-height: 1.75;
}

.career-primary-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 6px;
    background: #14b8a6;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.career-roadmap,
.career-recommend-block {
    margin-bottom: 34px;
}

.career-stage {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
}

.career-stage-index {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f59e0b;
    color: #111827;
    font-weight: 800;
    font-size: 13px;
}

.career-stage-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.career-stage-body p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 12px;
}

.career-mini-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.career-mini-course {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    min-height: 64px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    text-decoration: none;
}

.career-mini-course img,
.career-mini-thumb {
    grid-row: 1 / 3;
    width: 78px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    background: #111827;
}

.career-mini-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
}

.career-mini-title {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.career-mini-meta {
    align-self: end;
    color: var(--text-muted);
    font-size: 11px;
}

.career-series-grid,
.career-tutorial-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.career-series-card,
.career-tutorial-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 92px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}

.career-series-card:hover,
.career-tutorial-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.career-series-card img,
.career-tutorial-card img,
.career-series-placeholder,
.career-tutorial-placeholder {
    width: 116px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    background: #111827;
}

.career-series-placeholder,
.career-tutorial-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.career-series-info,
.career-tutorial-card span {
    min-width: 0;
}

.career-series-card strong,
.career-tutorial-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.career-series-card em,
.career-tutorial-card em {
    display: block;
    color: var(--text-muted);
    font-style: normal;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.career-empty {
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.career-empty.inline {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    min-height: 38px;
}

/* === 排序栏 === */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    padding: 8px 0;
    border-top: 1px solid var(--border, #30363d);
}

.sort-label {
    font-size: 12px;
    color: var(--text-muted, #8b949e);
    margin-right: 4px;
}

.sort-item {
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 4px;
    color: var(--text-muted, #8b949e);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.sort-item:hover {
    color: var(--text-primary, #c9d1d9);
    background: var(--bg-secondary, #21262d);
}

.sort-item.active {
    color: var(--accent, #58a6ff);
    background: rgba(88, 166, 255, 0.1);
    font-weight: 600;
}

.card-body {
    padding: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.card-tag {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.card-tag.sw {
    background: var(--accent-light);
    color: var(--accent);
}

.card-tag.series {
    background: rgba(0, 206, 201, 0.12);
    color: #00cec9;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* === 封面占位符 === */
.card-cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.card-cover-placeholder .ph-icon {
    font-size: 48px;
    margin-bottom: 6px;
    opacity: 0.95;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    z-index: 2;
    will-change: transform;
}

.card-cover-placeholder .ph-cat {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    letter-spacing: 1px;
    z-index: 2;
}

.card-cover-placeholder .ph-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card-cover-placeholder .ph-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    opacity: 0.15;
    pointer-events: none;
    will-change: transform, opacity;
}

.card-cover-placeholder .ph-particle::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    filter: blur(2px);
}

.card-cover-placeholder.cat-68 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-cover-placeholder.cat-59 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.card-cover-placeholder.cat-60 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.card-cover-placeholder.cat-69 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.card-cover-placeholder.cat-61 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card-cover-placeholder.cat-54 {
    background: linear-gradient(135deg, #485563 0%, #29323c 100%);
}
.card-cover-placeholder.cat-40 {
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
}
.card-cover-placeholder.cat-70 {
    background: linear-gradient(135deg, #4a6741 0%, #2d4a2d 100%);
}

/* === 分类标签（弱化：更紧凑、隐藏滚动条+拖拽滚动） === */
.tags {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    cursor: grab;
    user-select: none;
}

.tags::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge */
}

.tags:active {
    cursor: grabbing;
}

.tag {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.tag:hover, .tag.active {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

/* === 分页 === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    border: 1px solid var(--border);
}

.pagination button:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--text-primary);
}

.pagination button.active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* === 悬浮翻页按钮 === */
.floating-nav {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200;
}

/* 热区：贴边，全高，宽140px，远距离感知鼠标。不拦截点击穿透 */
.float-nav-zone {
    position: fixed;
    top: 0;
    height: 100vh;
    width: 140px;
    pointer-events: none;
    z-index: 199;
    display: flex;
    align-items: center;
    justify-content: center;
}

.float-nav-zone.float-nav-left {
    left: 0;
}

.float-nav-zone.float-nav-right {
    right: 0;
}

.float-nav-zone.hidden {
    display: none;
}

/* 按钮：在热区内，默认隐藏且不可点击 */
.float-nav-btn {
    width: 52px;
    height: 80px;
    pointer-events: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateX(0);
    transition: opacity 0.25s, transform 0.25s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

.float-nav-btn-left {
    border-left: none;
    border-radius: 0 16px 16px 0;
    transform: translateX(-14px);
}

.float-nav-btn-right {
    border-right: none;
    border-radius: 16px 0 0 16px;
    transform: translateX(14px);
}

/* 鼠标进入热区 → 按钮滑出，且可点击 */
.float-nav-btn.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.float-nav-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    box-shadow: 0 6px 32px rgba(0,0,0,0.35);
}

.float-nav-btn:active {
    transform: translateX(0) scale(0.92);
}

.float-nav-icon {
    width: 26px;
    height: 26px;
    color: var(--text-primary);
    transition: color 0.2s;
}

.float-nav-btn:hover .float-nav-icon {
    color: var(--accent);
    animation: navNudge 0.4s ease;
}

.float-nav-btn.float-nav-left:hover .float-nav-icon {
    animation-name: navNudgeLeft;
}

@keyframes navNudgeLeft {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-4px); }
}

@keyframes navNudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.float-nav-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.float-nav-btn.float-nav-left .float-nav-label {
    left: 56px;
}

.float-nav-btn.float-nav-right .float-nav-label {
    right: 56px;
}

.float-nav-btn:hover .float-nav-label {
    opacity: 1;
}

@media (max-width: 768px) {
    .float-nav-btn {
        width: 44px;
        height: 64px;
    }
    .float-nav-icon {
        width: 22px;
        height: 22px;
    }
    .float-nav-label {
        display: none;
    }
}

/* === 表单 === */
.form-wrapper {
    max-width: 400px;
    margin: 60px auto;
}

.form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border);
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-label {
    flex-shrink: 0;
    width: 80px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-btn {
    width: 100%;
    height: 44px;
    margin-top: 8px;
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.form-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
}

.pwd-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwd-toggle:hover {
    color: var(--accent);
}

.form-input.has-toggle {
    padding-right: 40px !important;
}

.field-error-msg {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 4px;
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid rgba(255, 71, 87, 0.4);
    color: #ff4757;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: normal;
    max-width: 100%;
    word-break: break-word;
    z-index: 10;
}

.field-error-enter-active {
    transition: opacity 0.2s, transform 0.2s;
}

.field-error-enter-from {
    opacity: 0;
    transform: translateY(4px);
}

.form-error {
    display: none;
}

/* === 用户中心 === */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    object-fit: cover;
}

.profile-info h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.profile-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.profile-badge.vip {
    background: var(--gradient-warm);
    color: #000;
}

.profile-badge.normal {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* === 教程详情 === */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-top: 24px;
}

.video-player {
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.video-player video {
    width: 100%;
    height: 100%;
}

.detail-info {
    padding: 24px 0;
}

.detail-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.detail-desc {
    color: var(--text-secondary);
    line-height: 1.8;
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.episode-list {
    max-height: 400px;
    overflow-y: auto;
}

.episode-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    gap: 10px;
}

.episode-item:hover {
    background: var(--bg-hover);
}

.episode-item.active {
    background: var(--accent-light);
    color: var(--accent);
}

.episode-num {
    font-size: 13px;
    color: var(--text-muted);
    width: 30px;
    flex-shrink: 0;
}

.episode-title {
    font-size: 14px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === 底部 === */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 60px;
    background: var(--bg-secondary);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand {
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-col h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-col-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}
.footer-col-links a {
    white-space: nowrap;
    margin-bottom: 0;
}
.footer-col-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px 12px;
}
.footer-col-4 a {
    white-space: nowrap;
    margin-bottom: 0;
}

.footer-friend-links {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-friend-links h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
}

.friend-link-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
}

.friend-link-list a {
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
}

.friend-link-list a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* === 消息提示 === */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 9999;
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: rgba(0, 184, 148, 0.9);
    color: #fff;
}

.toast.error {
    background: rgba(255, 71, 87, 0.9);
    color: #fff;
}

/* === 加载动画 === */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* === 空状态 === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state p {
    margin-top: 12px;
    font-size: 15px;
}

/* === 移动端菜单按钮 === */
.menu-toggle {
    display: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}

.menu-toggle span:nth-child(2) {
    margin: 5px 0;
}

/* === 动画 === */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

/* === 懒加载图片 === */
.lazy-img {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-img.loaded {
    opacity: 1;
}

/* === 响应式 === */
@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header {
        overflow: visible;
        transition: transform 0.2s ease,
                    opacity 0.2s ease,
                    height 0.2s ease;
    }

    .header.nav-compact {
        height: 44px;
    }

    body {
        transition: padding-top 0.2s ease;
    }

    .filter-bar.bar-show {
        top: 44px;
    }

    .series-header.bar-show {
        top: 44px;
    }

    .hero {
        padding: 32px 0 24px;
    }

    .header .container {
        display: flex !important;
        align-items: center;
        justify-content: flex-start !important;
        gap: 5px !important;
        padding: 0 8px;
        max-width: 100% !important;
        width: 100%;
    }

    /* 左：菜单按钮 */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        z-index: 10001;
        flex: 0 0 auto;
        padding: 10px 2px;
        margin: 0;
        background: transparent;
        border: none;
        cursor: pointer;
    }
    .menu-toggle span {
        display: block;
        width: 19.5px;
        height: 1.4px;
        background: var(--text-primary);
        border-radius: 2px;
        margin: 2px 0;
    }

    /* Logo居中：absolute定位 */
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        flex: 0 0 auto !important;
        display: flex;
        align-items: center;
    }
    .logo-img {
        width: 39px;
        height: 39px;
    }
    .logo-text {
        display: none !important;
    }

    /* 右：搜索图标+头像 */
    .header-right {
        flex: 1 1 0 !important;
        gap: 8px;
        justify-content: flex-end;
    }

    /* 手机端隐藏购物车/主题切换（管理保留） */
    .header-right > a[title="购物车"],
    .header-right .theme-toggle {
        display: none !important;
    }

    /* 搜索框：放大镜图标，点击全屏展开 */
    .search-box {
        flex: 0 0 auto !important;
        width: 34px;
        height: 34px;
        padding: 0;
        cursor: pointer;
        border: none;
        background: transparent;
        border-radius: 50%;
    }
    .search-box input {
        display: none;
    }
    .search-box .search-icon-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        color: var(--text-primary);
    }
    .search-box .search-icon-btn svg {
        width: 19px;
        height: 19px;
    }
    .search-box.expanded {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 50px;
        border-radius: 0;
        z-index: 1001;
        padding: 0 12px;
        flex: none !important;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        gap: 8px;
    }
    /* 展开搜索时隐藏菜单和logo */
    .header.search-active .menu-toggle,
    .header.search-active .logo {
        display: none !important;
    }
    .search-box.expanded input {
        display: block;
        flex: 1;
        min-width: 0;
        font-size: 15px;
        background: var(--bg-primary);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 0 12px;
        height: 36px;
    }
    .search-box.expanded .search-icon-btn {
        flex-shrink: 0;
        width: auto;
        height: auto;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        flex: 0 0 auto;
    }

    /* 登录按钮缩小 */
    .header-right .btn-primary {
        padding: 5px 12px;
        font-size: 13px;
    }

    /* 筛选栏手机端优化 */
    .dim-tabs-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* 用户中心帖子日期手机端隐藏 */
    .post-row .post-date {
        display: none;
    }
    .dim-tab {
        padding: 6px 12px;
        font-size: 13px;
    }
    .view-toggle {
        gap: 2px;
        flex-wrap: wrap;
    }
    .view-btn {
        padding: 3px 8px;
        font-size: 11px;
    }
    .publish-btn {
        padding: 3px 8px !important;
        font-size: 11px !important;
    }
    .tree-item {
        padding: 3px 8px;
        font-size: 12px;
    }
    .tree-item.sub {
        font-size: 11px;
        padding: 2px 6px;
    }
    .tree-row {
        gap: 3px;
    }

    .career-heading {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .career-heading h1 {
        font-size: 24px;
    }

    .career-stat-strip {
        min-width: 0;
        width: 100%;
    }

    .career-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .career-mini-list,
    .career-series-grid,
    .career-tutorial-grid {
        grid-template-columns: 1fr;
    }

    .career-stage {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 10px;
    }

    .career-series-card,
    .career-tutorial-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .career-series-card img,
    .career-tutorial-card img,
    .career-series-placeholder,
    .career-tutorial-placeholder {
        width: 104px;
    }

    /* 用户中心手机端 */
    .profile-header {
        flex-direction: column !important;
        text-align: center;
        padding: 16px !important;
        gap: 12px !important;
    }
    .profile-header .profile-avatar {
        width: 60px !important;
        height: 60px !important;
    }
    .profile-header .profile-info {
        min-width: 0 !important;
    }
    .profile-header .profile-info h2 {
        font-size: 18px !important;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 8px 16px;
        border-bottom: 1px solid var(--border);
        z-index: 9999;
    }

    .header.nav-compact .nav-menu {
        top: 44px;
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu a {
        width: 100%;
        padding: 14px 16px;
        font-size: 15px;
        border-bottom: 1px solid var(--border);
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 14px;
    }

    .section-title {
        font-size: 18px;
    }

    .form-card {
        padding: 24px;
    }

    .footer-content {
        flex-direction: column;
    }
    .footer-links {
        gap: 24px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .pagination button {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* === 骨架屏 === */
.skeleton-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.skeleton-cover {
    aspect-ratio: 8 / 5;
    background: var(--skeleton);
    position: relative;
    overflow: hidden;
}

.skeleton-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent);
    animation: shimmer 1.5s infinite;
}

.skeleton-body {
    padding: 16px;
}

.skeleton-line {
    height: 16px;
    border-radius: 4px;
    background: var(--skeleton);
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.skeleton-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent);
    animation: shimmer 1.5s infinite;
}

.skeleton-line.short {
    width: 60%;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === Cookie 同意弹窗 === */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.3s ease;
}
body.assistant-open .cookie-consent {
    right: 380px;
}
@media (max-width: 768px) {
    .cookie-consent, body.assistant-open .cookie-consent { right: 0 !important; }
}

.cookie-consent p {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
    min-width: 200px;
}

.cookie-consent p a {
    color: var(--accent);
}

.cookie-consent .btn {
    flex-shrink: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === 主题切换按钮 === */
.theme-toggle {
    background: transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-hover);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    fill: var(--text-primary);
}

/* === 无障碍 === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===============================================================
   智能助手组件样式
   =============================================================== */

/* === 浮动按钮 === */
.assistant-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(108, 92, 231, 0.5), 0 0 0 3px rgba(108, 92, 231, 0.15);
    z-index: 9990;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s, box-shadow 0.3s;
    overflow: hidden;
    animation: fabPulse 2.5s ease-in-out infinite;
}

@keyframes fabPulse {
    0%, 100% {
        box-shadow: 0 4px 24px rgba(108, 92, 231, 0.5), 0 0 0 3px rgba(108, 92, 231, 0.15);
    }
    50% {
        box-shadow: 0 4px 24px rgba(108, 92, 231, 0.6), 0 0 0 8px rgba(108, 92, 231, 0.08);
    }
}

.assistant-fab:hover {
    transform: scale(1.12) rotate(5deg);
    box-shadow: 0 6px 32px rgba(108, 92, 231, 0.6), 0 0 0 6px rgba(108, 92, 231, 0.12);
}

.assistant-fab.hidden {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
    pointer-events: none;
    animation: none;
}

.assistant-fab img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

/* === 聊天面板 === */
.assistant-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 380px;
    max-width: 100vw;
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 9991;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.assistant-panel.show {
    transform: translateX(0);
}

/* 面板打开时，左侧内容区缩窄腾出空间 */
body.assistant-open {
    padding-right: 380px;
}

/* 助手面板打开时，右侧翻页按钮跟着右移 */
body.assistant-open .float-nav-zone.float-nav-right {
    right: 380px;
}

body.assistant-open .float-nav-btn.float-nav-btn-right {
    transform: translateX(14px);
}

body.assistant-open .float-nav-btn.float-nav-btn-right.visible {
    transform: translateX(0);
}

/* === 头部 === */
.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.assistant-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.assistant-avatar {
    font-size: 20px;
}

.assistant-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assistant-tts-toggle {
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.assistant-tts-toggle.active {
    color: #00cec9;
    border-color: rgba(0, 206, 201, 0.4);
    background: rgba(0, 206, 201, 0.1);
}

.assistant-tts-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.assistant-tts-toggle.active:hover {
    border-color: #00cec9;
    color: #00cec9;
}

.assistant-clear {
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border, #30363d);
    color: var(--text-muted, #8b949e);
    transition: all 0.2s;
}

.assistant-clear:hover {
    background: rgba(255, 165, 2, 0.15);
    border-color: #ffa502;
    color: #ffa502;
}

.assistant-close {
    background: rgba(255, 71, 87, 0.15);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 71, 87, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-sizing: border-box;
}

.assistant-close::before,
.assistant-close::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 2px;
    background: #ff4757;
    border-radius: 1px;
    top: 50%;
    left: 50%;
}

.assistant-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.assistant-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.assistant-close:hover {
    background: #ff4757;
    border-color: #ff4757;
    transform: rotate(90deg) scale(1.15);
    box-shadow: 0 2px 12px rgba(255, 71, 87, 0.5);
}

.assistant-close:hover::before,
.assistant-close:hover::after {
    background: #fff;
}

.assistant-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* === 文章列表 === */
.article-search {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.article-search input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

.article-search input:focus {
    border-color: var(--accent);
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
}

.article-item:hover {
    border-color: var(--accent);
    transform: translateX(2px);
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.article-summary {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 8px;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* === 详情页扁平化 === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .sep {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

.detail-video {
    margin-bottom: 20px;
}

.no-video {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 8px;
}

.detail-info-flat {
    margin-bottom: 32px;
}

.detail-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge-free, .badge-vip, .badge-share, .badge-comment, .badge-paid {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.badge-free {
    background: rgba(0, 206, 201, 0.9);
    color: #fff !important;
}

.badge-vip {
    background: rgba(253, 201, 110, 0.9);
    color: #fff !important;
}

.badge-share {
    background: rgba(99, 102, 241, 0.9);
    color: #fff !important;
}

.badge-comment {
    background: rgba(236, 72, 153, 0.9);
    color: #fff !important;
}

.badge-paid {
    background: rgba(239, 68, 68, 0.9);
    color: #fff !important;
}

.detail-meta-flat {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.detail-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.detail-desc-flat {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
}

.detail-episodes {
    margin-bottom: 24px;
}

.ep-card {
    flex-shrink: 0;
    width: 180px;
    max-width: 80vw;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ep-card:hover {
    border-color: var(--accent);
}

.ep-card.active {
    border-color: var(--accent);
    background: var(--accent-light);
}

.ep-num {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.ep-title {
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ep-free {
    font-size: 11px;
    color: #00cec9;
}

.ep-share {
    font-size: 11px;
    color: #6366f1;
}

.ep-comment {
    font-size: 11px;
    color: #ec4899;
}

.ep-paid {
    font-size: 11px;
    color: #ef4444;
}

.detail-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 12px;
}

.detail-comments {
    margin-bottom: 32px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.comment-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.comment-input-area {
    flex: 1;
}

.comment-textarea {
    width: 100%;
    min-height: 60px;
    max-height: 200px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.comment-textarea:focus {
    border-color: var(--accent);
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.comment-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-login-prompt {
    text-align: center;
    padding: 24px 0;
}

.comment-login-prompt a {
    display: inline-block;
    padding: 8px 24px;
}
    flex: 1;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.comment-date {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 评论编辑/删除按钮 */
.comment-actions { display: inline-flex; gap: 6px; margin-left: auto; }
.cmt-btn-edit, .cmt-btn-del { padding: 2px 10px; border-radius: 4px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text-muted); transition: all 0.15s; }
.cmt-btn-edit:hover { border-color: var(--accent); color: var(--accent); }
.cmt-btn-del:hover { border-color: #f44336; color: #f44336; }
.cmt-btn-save { padding: 4px 16px; border-radius: 6px; border: none; background: var(--accent); color: #fff; font-size: 13px; cursor: pointer; font-weight: 600; }
.cmt-btn-save:disabled { opacity: 0.5; cursor: not-allowed; }
.cmt-btn-cancel { padding: 4px 16px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 13px; cursor: pointer; }
.cmt-edit-input { width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-primary); font-size: 14px; font-family: inherit; resize: vertical; box-sizing: border-box; }
.cmt-edit-input:focus { outline: none; border-color: var(--accent); }
.cmt-edit-area { margin-bottom: 8px; }
.cmt-edit-actions { display: flex; gap: 8px; margin-top: 6px; }
.comment-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-item .comment-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.comment-level-tag { font-size: 11px; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.comment-level-tag.level-0 { background: #30363d; color: #8b949e; }
.comment-level-tag.level-1 { background: #1a7f3733; color: #3fb950; }
.comment-level-tag.level-2 { background: #1f6feb33; color: #58a6ff; }
.comment-level-tag.level-3 { background: #a371f733; color: #d2a8ff; }
.comment-level-tag.level-4 { background: #f0883e33; color: #ffa657; }
.comment-level-tag.level-5 { background: #e3b34133; color: #e3b341; }
.comment-level-tag.level-6 { background: #f8514933; color: #ff7b72; }
.comment-level-tag.level-7 { background: #bd2c0033; color: #ff6b6b; }
.comment-level-tag.level-8 { background: #8957e533; color: #bc8cff; }
.comment-level-tag.level-9 { background: #ffd70033; color: #ffd700; }

/* === 门户首页 === */
.portal-section {
    margin-bottom: 32px;
}

.scroll-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

/* 软件卡片 */
.sw-card {
    flex-shrink: 0;
    width: 110px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sw-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.sw-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.sw-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.sw-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* 分类网格 */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.cat-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.cat-card:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.cat-icon {
    font-size: 20px;
}

.cat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* 系列卡片 */
.series-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.series-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.series-cover {
    aspect-ratio: 16 / 9;
    background: var(--gradient-cool);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.series-icon {
    font-size: 36px;
}

.series-eps {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

.series-title {
    padding: 8px 10px 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.series-teacher {
    padding: 0 10px 10px;
    font-size: 12px;
    color: var(--text-muted);
}

/* 老师卡片 */
.teacher-card {
    flex-shrink: 0;
    width: 100px;
    text-align: center;
    cursor: pointer;
}

.teacher-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
}

.teacher-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.teacher-series {
    font-size: 11px;
    color: var(--text-muted);
}

/* 作品卡片 */
.work-card {
    flex-shrink: 0;
    width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.work-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.work-cover {
    aspect-ratio: 4 / 3;
    background: var(--gradient-warm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-icon {
    font-size: 32px;
}

.work-title {
    padding: 6px 8px 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-author {
    padding: 0 8px 8px;
    font-size: 11px;
    color: var(--text-muted);
}

/* === 统一分类块 === */
.hero-search {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.hero-search input {
    flex: 1;
    height: 52px;
    padding: 0 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 16px;
    transition: border-color 0.2s;
}

.hero-search input:focus {
    border-color: var(--accent);
    outline: none;
}

.hero-search .btn {
    height: 52px;
    padding: 0 28px;
    font-size: 15px;
}

.cat-block {
    margin-bottom: 32px;
}

.cat-block-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.cat-block-icon {
    font-size: 20px;
}

.cat-block-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s;
}
a.cat-block-title:hover {
    color: var(--accent);
}

.cat-block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.cat-block-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    gap: 6px;
}

.cat-block-item:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
    transform: translateY(-1px);
}

.cat-block-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.cat-block-item-count {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.cat-block-item:hover .cat-block-item-count {
    color: var(--accent);
}

@media (max-width: 768px) {
    .cat-block-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-search input { height: 48px; font-size: 15px; }
    .hero-search .btn { height: 48px; padding: 0 20px; }
}

/* === 语音播报按钮 === */
.assistant-tts-toggle {
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.assistant-tts-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.assistant-tts-toggle.active {
    border-color: #00cec9;
    color: #00cec9;
    background: rgba(0, 206, 201, 0.1);
    animation: ttsPulse 1s ease-in-out infinite;
}

@keyframes ttsPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 206, 201, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(0, 206, 201, 0); }
}

/* === 消息列表 === */
.assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.assistant-messages::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* === 消息气泡 === */
.assistant-msg {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 90%;
    animation: fadeIn 0.3s ease;
}

.assistant-msg.user {
    align-self: flex-end;
    align-items: flex-end;
}

.assistant-msg.assistant {
    align-self: flex-start;
    align-items: flex-start;
    max-width: 95%;
}

.assistant-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.assistant-msg.user .assistant-bubble {
    background: var(--gradient);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.assistant-msg.assistant .assistant-bubble {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

/* === 打字动画 === */
.assistant-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    border-bottom-left-radius: 4px;
}

.assistant-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingBounce 1.4s infinite ease-in-out;
}

.assistant-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.assistant-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* === 筛选按钮 === */
.assistant-filter-btn {
    margin-top: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    align-self: flex-start;
}

.assistant-filter-btn:hover:not(:disabled) {
    background: var(--accent);
    color: #fff;
}

.assistant-filter-btn:disabled {
    opacity: 0.6;
    cursor: default;
    border-color: #00cec9;
    color: #00cec9;
    background: rgba(0, 206, 201, 0.1);
}

/* === 快捷问题 === */
.assistant-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.assistant-quick-btn {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: var(--accent-light);
    color: var(--accent);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.assistant-quick-btn:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

/* === 输入区 === */
.assistant-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.assistant-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    resize: none;
    min-height: 40px;
    max-height: 100px;
    line-height: 1.4;
    font-family: inherit;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.assistant-input::-webkit-scrollbar {
    width: 0;
    display: none;
}

.assistant-input:focus {
    border-color: var(--accent);
    outline: none;
}

.assistant-input::placeholder {
    color: var(--text-muted);
}

.assistant-send {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.2s;
}

.assistant-send:hover:not(:disabled) {
    transform: scale(1.05);
}

.assistant-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.assistant-send svg {
    width: 18px;
    height: 18px;
}

/* === 推荐课程卡片 === */
.assistant-rec-card {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.assistant-rec-card:hover {
    border-color: var(--accent);
    transform: translateX(2px);
}

.assistant-rec-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--gradient-cool);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.assistant-rec-icon {
    font-size: 22px;
}

.assistant-rec-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 6px;
    font-weight: 600;
}

.assistant-rec-badge.free {
    background: #00cec9;
    color: #000;
}

.assistant-rec-badge.vip {
    background: #fdcb6e;
    color: #000;
}

.assistant-rec-badge.series {
    background: #6366f1;
    color: #fff;
}

.assistant-rec-badge.share {
    background: #6366f1;
    color: #fff;
}

.assistant-rec-badge.comment {
    background: #ec4899;
    color: #fff;
}

.assistant-rec-badge.paid {
    background: #ef4444;
    color: #fff;
}

.assistant-rec-info {
    flex: 1;
    min-width: 0;
}

.assistant-rec-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-rec-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* === 移动端适配 === */
@media (max-width: 768px) {
    body.assistant-open {
        padding-right: 0;
    }

    body.assistant-open .header {
        padding-right: 0;
    }

    body.assistant-open .float-nav-zone.float-nav-right {
        right: 0;
    }

    .assistant-panel {
        width: 100vw;
        height: 70vh;
        top: auto;
        bottom: 0;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
        transform: translateY(100%);
    }

    .assistant-panel.show {
        transform: translateY(0);
    }

    .assistant-fab {
        right: 16px;
        bottom: 16px;
        width: 48px;
        height: 48px;
        z-index: 998;
    }

    .assistant-fab img {
        width: 30px;
        height: 30px;
    }

    .theme-toggle {
        display: none;
    }
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    .user-badge {
        display: none;
    }
    .admin-link {
        padding: 6px 8px !important;
        font-size: 0 !important;
        order: 3;
    }
    .admin-link .admin-link-text {
        display: none;
    }
    .admin-link::after {
        content: "⚙";
        font-size: 16px;
    }
    .admin-dropdown {
        right: 8px !important;
        min-width: 200px !important;
    }
    .admin-dropdown a {
        padding: 14px 16px !important;
        font-size: 15px !important;
    }

    /* 购物车/支付页适配 */
    .cart-item, .order-card {
        flex-wrap: wrap;
    }
    .cart-item-price, .order-amount {
        font-size: 18px;
    }
    .pay-wrap {
        padding: 0 4px;
    }
    .pay-qr-img {
        width: 180px;
    }

    /* VIP卡片网格 */
    .vip-section .card-grid {
        grid-template-columns: 1fr !important;
    }

    /* 管理员订单表格横向滚动 */
    .order-table {
        font-size: 12px;
    }
    .order-table th, .order-table td {
        padding: 6px 8px;
    }

    /* 下载栏适配 */
    .dl-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* === 翻页快捷键提示 === */
.page-shortcut-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px;
    margin-top: 8px;
}

.page-shortcut-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    font-size: 11px;
    margin: 0 2px;
}

/* === 系列详情页：系列头sticky显隐 === */
.series-header {
    position: sticky;
    top: var(--header-height);
    z-index: 88;
    background: rgba(15, 17, 23, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border, #30363d);
    padding: 12px 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
:root[data-theme="light"] .series-header {
    background: rgba(255, 255, 255, 0.92);
}

.series-header.bar-show {
    top: 48px;
    transform: translateY(0);
    opacity: 1;
}

/* 压缩状态：缩小封面，隐藏描述 */
.series-header.bar-compact {
    padding: 6px 0;
}

.series-header.bar-compact .series-cover img,
.series-header.bar-compact .series-cover > div {
    width: 64px !important;
    height: 40px !important;
    border-radius: 4px;
    font-size: 16px;
}

.series-header.bar-compact h1 {
    font-size: 15px !important;
    margin-bottom: 2px !important;
}

.series-header.bar-compact .series-meta {
    font-size: 12px !important;
}

.series-header.bar-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* === 快速滚动按钮（左右各一，同FloatingNav风格） === */
.scroll-nav {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200;
}

/* 热区：贴边，全高，宽140px */
.scroll-nav-zone {
    position: fixed;
    top: 0;
    height: 100vh;
    width: 140px;
    pointer-events: none;
    z-index: 199;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-nav-zone.scroll-nav-left {
    left: 0;
}

.scroll-nav-zone.scroll-nav-right {
    right: 0;
}

/* 助手面板打开时右移 */
body.assistant-open .scroll-nav-zone.scroll-nav-right {
    right: 380px;
}

/* 按钮：默认隐藏，hover热区时滑出 */
.scroll-nav-btn {
    width: 52px;
    height: 80px;
    pointer-events: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateX(0);
    transition: opacity 0.25s, transform 0.25s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

.scroll-nav-btn-left {
    border-left: none;
    border-radius: 0 16px 16px 0;
    transform: translateX(-14px);
}

.scroll-nav-btn-right {
    border-right: none;
    border-radius: 16px 0 0 16px;
    transform: translateX(14px);
}

.scroll-nav-btn.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.scroll-nav-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    box-shadow: 0 6px 32px rgba(0,0,0,0.35);
}

.scroll-nav-btn:active {
    transform: translateX(0) scale(0.92);
}

.scroll-nav-btn.disabled {
    opacity: 0.25 !important;
    cursor: not-allowed;
    pointer-events: none;
}

.scroll-nav-icon {
    width: 26px;
    height: 26px;
    color: var(--text-primary);
    transition: color 0.2s;
}

.scroll-nav-btn:hover .scroll-nav-icon {
    color: var(--accent);
}

@media (max-width: 768px) {
    .scroll-nav-zone {
        width: 64px;
    }
    .scroll-nav-btn {
        width: 44px;
        height: 64px;
    }
    .scroll-nav-icon {
        width: 22px;
        height: 22px;
    }
    /* 助手面板在手机端为底部弹窗，不偏移 */
    body.assistant-open .scroll-nav-zone.scroll-nav-right {
        right: 0;
    }
}

/* === Products.asp 教程详情页 === */
.detail-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    transition: gap 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-main {
    flex: 1;
    min-width: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: sticky;
    top: 60px;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-sidebar.collapsed {
    width: 0;
    border: none;
    overflow: hidden;
}

.sidebar-toggle {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--accent);
    border-color: var(--accent);
}

.detail-sidebar.collapsed .sidebar-header {
    padding: 8px 6px;
    justify-content: center;
}

.sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-episodes {
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.sidebar-episodes::-webkit-scrollbar {
    width: 6px;
}

.sidebar-episodes::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-episodes::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 3px;
}

.sidebar-episodes::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

.sidebar-ep {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    border-bottom: 1px solid rgba(48,54,61,0.3);
    transition: background 0.15s;
    cursor: pointer;
}

.sidebar-ep:hover {
    background: var(--bg-hover);
}

.sidebar-ep.active {
    background: rgba(99, 102, 241, 0.15);
    border-left: 3px solid var(--accent);
    padding-left: 13px;
}

.sidebar-ep-num {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 28px;
}

.sidebar-ep.active .sidebar-ep-num {
    color: var(--accent);
    font-weight: 700;
}

.sidebar-ep-title {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-ep.active .sidebar-ep-title {
    color: var(--text-primary);
    font-weight: 600;
}

.sidebar-ep-badge {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
}

.sidebar-ep-badge.free {
    background: rgba(0, 206, 201, 0.2);
    color: #00cec9;
}

.sidebar-ep-badge.vip {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #000;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
    box-shadow: 0 0 6px rgba(253,160,133,0.5);
}

.sidebar-ep-badge.share {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

.sidebar-ep-badge.comment {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
}

.sidebar-ep-badge.paid {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.sidebar-ep-badge.material {
    background: rgba(251, 130, 23, 0.25);
    color: #FB8417;
    font-size: 10px;
    font-weight: 700;
}

.detail-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
}

.detail-content a {
    color: var(--accent);
}

/* 视频播放器 16:9 比例适配 */
.video-player-wrap {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.no-video-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.no-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    border-radius: 8px;
}

.no-video-box > * {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@media (max-width: 900px) {
    .detail-layout {
        flex-direction: column;
    }
    .detail-sidebar {
        width: 100%;
        position: static;
        max-height: 400px;
    }
}

/* === 登录/注册浮动框 === */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.auth-close:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 24px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

/* 动画 */
.modal-enter-active {
    transition: opacity 0.25s;
}

.modal-enter-active .auth-modal {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
}

.modal-enter-from {
    opacity: 0;
}

.modal-enter-from .auth-modal {
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
}

.modal-leave-active {
    transition: opacity 0.2s;
}

.modal-leave-active .auth-modal {
    transition: transform 0.2s, opacity 0.2s;
}

.modal-leave-to {
    opacity: 0;
}

.modal-leave-to .auth-modal {
    transform: scale(0.95);
    opacity: 0;
}

/* === 悬浮上一集/下一集（同FloatingNav风格） === */
.ep-float-nav {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200;
}

.ep-float-zone {
    position: fixed;
    top: 120px;
    height: 60vh;
    width: 100px;
    pointer-events: auto;
    z-index: 199;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-float-left {
    left: 0;
    top: 180px;
}

.ep-float-right {
    right: 280px;
    top: 180px;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 侧边栏折叠后按钮贴右边缘 */
.ep-float-right.ep-float-right-collapsed {
    right: 0;
}

body.assistant-open .ep-float-right.ep-float-right-collapsed {
    right: 380px;
}

body.assistant-open .ep-float-right {
    right: 660px;
}

.ep-float-btn {
    width: 48px;
    height: 72px;
    pointer-events: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateX(0);
    transition: opacity 0.25s, transform 0.25s, background 0.2s, border-color 0.2s;
    user-select: none;
    position: relative;
}

.ep-float-left .ep-float-btn {
    border-left: none;
    border-radius: 0 14px 14px 0;
    transform: translateX(-12px);
}

.ep-float-right .ep-float-btn {
    border-right: none;
    border-radius: 14px 0 0 14px;
    transform: translateX(12px);
}

.ep-float-btn.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.ep-float-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

.ep-float-btn:active {
    transform: translateX(0) scale(0.92);
}

.ep-float-btn svg {
    color: var(--text-primary);
    transition: color 0.2s;
}

.ep-float-btn:hover svg {
    color: var(--accent);
}

.ep-float-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.ep-float-left .ep-float-label {
    left: 52px;
}

.ep-float-right .ep-float-label {
    right: 52px;
}

.ep-float-btn.visible .ep-float-label {
    opacity: 1;
}

@media (max-width: 768px) {
    .ep-float-zone {
        width: 56px;
    }
    .ep-float-btn {
        width: 40px;
        height: 56px;
    }
    .ep-float-label {
        display: none;
    }
    /* 手机端 sidebar 变 static，按钮贴右边缘 */
    .ep-float-right,
    .ep-float-right.ep-float-right-collapsed {
        right: 0;
    }
    /* 助手面板在手机端为底部弹窗，不偏移 */
    body.assistant-open .ep-float-right,
    body.assistant-open .ep-float-right.ep-float-right-collapsed {
        right: 0;
    }
}

/* ===============================================================
   帮助中心 + 用户等级标签
   =============================================================== */

/* 文章正文样式 */
.article-content {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.8;
    word-break: break-word;
}
.article-content p { margin: 0 0 12px 0; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.article-content table { max-width: 100%; border-collapse: collapse; margin: 12px 0; display: block; overflow-x: auto; }
.article-content td, .article-content th { padding: 6px 10px; border: 1px solid var(--border); }
.article-content a { color: var(--accent); text-decoration: none; }
.article-content a:hover { text-decoration: underline; }
.article-content h1, .article-content h2, .article-content h3 { color: var(--text-primary); margin: 16px 0 8px 0; }

/* 用户等级标签 */
.level-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}
.level-0 { background: var(--bg-secondary); color: var(--text-muted); }
.level-1 { background: #e8f5e9; color: #2e7d32; }
.level-2 { background: #e3f2fd; color: #1565c0; }
.level-3 { background: #fff3e0; color: #e65100; }
.level-4 { background: #fce4ec; color: #c62828; }
.level-5 { background: #f3e5f5; color: #7b1fa2; }
.level-6 { background: #ede7f6; color: #4527a0; }
.level-7 { background: #e8eaf6; color: #283593; }
.level-8 { background: #fff8e1; color: #f57f17; }
.level-9 { background: linear-gradient(135deg, #ffd700, #ff6f00); color: #fff; }

/* 发布按钮 */
.publish-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}
.publish-btn:hover { opacity: 0.85; }

/* ===============================================================
   招聘求职页面手机适配
   =============================================================== */
@media (max-width: 768px) {
    .job-grid { grid-template-columns: 1fr !important; }
    .job-card { padding: 12px !important; }
    .job-card h3 { font-size: 14px !important; }
    .job-meta { gap: 4px !important; }
    .job-tag { font-size: 11px !important; padding: 1px 6px !important; }
    .job-info { font-size: 12px !important; }
    .job-date { font-size: 11px !important; }

    .filter-bar { padding: 6px 10px !important; }
    .filter-row { gap: 4px !important; }
    .filter-row + .filter-row { margin-top: 4px !important; }
    .filter-label { font-size: 11px !important; margin-right: 2px !important; }
    .filter-item { font-size: 11px !important; padding: 2px 6px !important; }

    .dim-tabs-row { flex-wrap: wrap !important; gap: 4px !important; margin-bottom: 4px !important; }
    .dim-tab { font-size: 12px !important; padding: 3px 8px !important; }
    .publish-btn { font-size: 11px !important; padding: 3px 8px !important; }

    /* 详情页贴片区 */
    div[style*="display:flex;gap:0;margin-bottom:16px;border-radius:12px"] {
        flex-direction: column !important;
    }
    div[style*="width:160px"] {
        width: 100% !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        padding: 8px 12px !important;
    }
    div[style*="width:160px"] img {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 0 !important;
        margin-right: 8px !important;
    }
    div[style*="flex:1;min-width:120px"] {
        min-width: 100px !important;
        padding: 8px 10px !important;
    }
    div[style*="font-size:11px"] {
        font-size: 10px !important;
    }
    div[style*="font-size:14px;color:var(--text-primary)"] {
        font-size: 13px !important;
    }
    div[style*="font-size:16px;color:#f59e0b"] {
        font-size: 14px !important;
    }

    .detail-container { padding: 0 8px; }
    .detail-section { padding: 12px !important; }
    .detail-title { font-size: 16px !important; }
    .detail-content { font-size: 13px !important; }

    .post-admin-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 11px !important;
    }

    /* 筛选栏3行合并，手机端紧凑显示 */
    .filter-bar .filter-row { flex-wrap: nowrap; overflow-x: auto; }
    /* 手机端隐藏地区筛选 */
    .filter-row-city { display: none !important; }

    /* 分页手机端缩小 */
    .pagination { gap: 4px !important; margin-top: 24px !important; }
    .pagination button { min-width: 32px !important; height: 32px !important; font-size: 12px !important; padding: 0 6px !important; }
}

@media (max-width: 480px) {
    .pagination { gap: 3px !important; margin-top: 20px !important; }
    .pagination button { min-width: 28px !important; height: 28px !important; font-size: 11px !important; padding: 0 4px !important; }
}
