/* =====================================================
   🎨 猫叔AIA — 双主题系统 (CyberTech)
   暗夜机械 (Dark) / 白昼极光 (Light)
   ===================================================== */

/* ========== 主题变量 ========== */
:root,
[data-theme="dark"] {
    --bg: #0b0f1a;
    --bg-card: #111827;
    --bg-nav: rgba(11, 15, 26, 0.88);
    --bg-sidebar: #0d1117;
    --border: #1e293b;
    --border-light: #334155;
    --text: #e2e8f0;
    --text-muted: #64748b;
    --primary: #818cf8;
    --primary-glow: rgba(129, 140, 248, 0.12);
    --accent: #22d3ee;
    --accent-glow: rgba(34, 211, 238, 0.08);
    --success: #34d399;
    --warning: #fbbf24;
    --error: #f87171;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 220px;
    --grid-color: rgba(129, 140, 248, 0.04);
    --glow-primary: 0 0 24px rgba(129, 140, 248, 0.15);
    --glow-accent: 0 0 24px rgba(34, 211, 238, 0.1);
    --btn-theme-bg: rgba(129, 140, 248, 0.1);
    --btn-theme-border: rgba(129, 140, 248, 0.25);
    --code-bg: #0d1117;
    --scrollbar-thumb: #1e293b;
    --scrollbar-track: #0b0f1a;
}

[data-theme="light"] {
    --bg: #f0f4f8;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.9);
    --bg-sidebar: #ffffff;
    --border: #d1d9e6;
    --border-light: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.07);
    --accent: #0891b2;
    --accent-glow: rgba(8, 145, 178, 0.05);
    --success: #059669;
    --warning: #d97706;
    --error: #dc2626;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 220px;
    --grid-color: rgba(99, 102, 241, 0.03);
    --glow-primary: 0 0 20px rgba(99, 102, 241, 0.1);
    --glow-accent: 0 0 20px rgba(8, 145, 178, 0.06);
    --btn-theme-bg: rgba(99, 102, 241, 0.06);
    --btn-theme-border: rgba(99, 102, 241, 0.15);
    --code-bg: #f8fafc;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-track: #f1f5f9;
}

/* ========== 主题四：飞书蓝 (Feishu Blue) ========== */
[data-theme="feishu"] {
    --bg: #f5f6f7;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.92);
    --bg-sidebar: #ffffff;
    --border: #d0d3d6;
    --border-light: #e5e6e8;
    --text: #1f2329;
    --text-muted: #646a73;
    --primary: #4e83fd;
    --primary-glow: rgba(78, 131, 253, 0.08);
    --accent: #4954e6;
    --accent-glow: rgba(73, 84, 230, 0.06);
    --success: #35bd4b;
    --warning: #ffc60a;
    --error: #f54a45;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 220px;
    --grid-color: rgba(78, 131, 253, 0.03);
    --glow-primary: 0 0 20px rgba(78, 131, 253, 0.1);
    --glow-accent: 0 0 20px rgba(73, 84, 230, 0.07);
    --btn-theme-bg: rgba(78, 131, 253, 0.06);
    --btn-theme-border: rgba(78, 131, 253, 0.2);
    --code-bg: #f8f9fa;
    --scrollbar-thumb: #c8cbce;
    --scrollbar-track: #f5f6f7;
}
/* ========== 主题三：汇川工业蓝 (Inovance Blue) ========== */
[data-theme="inovance"] {
    --bg: #16181a;
    --bg-card: #222426;
    --bg-nav: rgba(22, 24, 26, 0.92);
    --bg-sidebar: #1a1c1e;
    --border: #2e3034;
    --border-light: #454e66;
    --text: #e8eaed;
    --text-muted: #8a9bb5;
    --primary: #0099f2;
    --primary-glow: rgba(0, 153, 242, 0.15);
    --accent: #00bcd4;
    --accent-glow: rgba(0, 188, 212, 0.1);
    --success: #43a047;
    --warning: #ff9800;
    --error: #e53935;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 220px;
    --grid-color: rgba(0, 153, 242, 0.04);
    --glow-primary: 0 0 28px rgba(0, 153, 242, 0.18);
    --glow-accent: 0 0 24px rgba(0, 188, 212, 0.12);
    --btn-theme-bg: rgba(0, 153, 242, 0.1);
    --btn-theme-border: rgba(0, 153, 242, 0.3);
    --code-bg: #1e2022;
    --scrollbar-thumb: #454e66;
    --scrollbar-track: #16181a;
}

/* ========== 科技感背景网格 ========== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 48px 48px;
}

.main-content,
.admin-main,
.auth-page,
.about-page,
.post-detail,
.posts-section,
.hero {
    position: relative;
    z-index: 1;
}

/* ========== 自定义滚动条 ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ========== 主题切换按钮 ========== */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--btn-theme-border);
    background: var(--btn-theme-bg);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    line-height: 1;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-glow);
    transform: rotate(15deg);
}

.theme-toggle:active {
    transform: scale(0.9);
}

.theme-toggle .theme-icon {
    transition: transform 0.4s ease;
    display: inline-block;
}

.theme-toggle:hover .theme-icon {
    animation: themeSpin 0.6s ease;
}

@keyframes themeSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== 科技感卡片装饰 ========== */
.post-card,
.stat-card,
.auth-card,
.post-form,
.table-container {
    position: relative;
    overflow: hidden;
}

/* 左上角科技感小装饰 */
.post-card::before,
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover::before,
.stat-card:hover::before {
    opacity: 1;
}

/* ========== 按钮科技感增强 ========== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.08) 50%, transparent 60%);
    background-size: 200% 200%;
    transition: background-position 0.5s ease;
}

.btn-primary:hover::after {
    background-position: 100% 100%;
}

/* ========== 导航栏玻璃效果增强 ========== */
.navbar {
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}

/* ========== 代码块科技感 ========== */
.markdown-body pre {
    background: var(--code-bg) !important;
    border: 1px solid var(--border);
    position: relative;
}

/* 代码块顶部文件栏装饰 */
.markdown-body pre::before {
    content: '';
    display: block;
    height: 12px;
    padding: 0;
    margin-bottom: 16px;
    background: repeating-linear-gradient(
        90deg,
        var(--error) 0px, var(--error) 6px,
        transparent 6px, transparent 10px,
        var(--warning) 10px, var(--warning) 16px,
        transparent 16px, transparent 20px,
        var(--success) 20px, var(--success) 26px,
        transparent 26px, transparent 30px
    );
    border-radius: 4px;
}

/* ========== Hero 区域科技感增强 ========== */
.hero {
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-title {
    letter-spacing: -0.5px;
    position: relative;
}

.hero-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    margin: 16px auto 0;
}

/* ========== 文章内容科技感 ========== */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    letter-spacing: -0.3px;
}

.markdown-body h2 {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.markdown-body blockquote {
    border-left: 3px solid var(--primary);
    background: linear-gradient(135deg, var(--primary-glow), transparent);
}

/* ========== 侧栏增强 ========== */
.admin-sidebar {
    border-right: 1px solid var(--border);
    background: var(--bg-sidebar);
}

.sidebar-link.active {
    border: 1px solid var(--border-light);
    background: var(--primary-glow);
}

/* ========== 输入框聚焦效果增强 ========== */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), var(--glow-primary);
}

/* ========== 分页 ========== */
.page-link {
    position: relative;
}

.page-link:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

/* ========== 导航链接 ========== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ========== 移动端适配 ========== */
@media (max-width: 640px) {
    body::before {
        background-size: 32px 32px;
    }
}

/* ========== 淡入加载动画 ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.post-card {
    animation: fadeInUp 0.4s ease both;
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }

/* ========== 标签徽章科技风 ========== */
.post-tag {
    border: 1px solid rgba(129, 140, 248, 0.2);
    backdrop-filter: blur(4px);
}

.post-tag:hover {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.2);
}

/* ========== 分割线科技感 ========== */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 24px 0;
}

/* ========== 加载进度条（微博风格头部渐变） ========== */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: loadingBar 2s ease infinite;
    z-index: 9999;
    opacity: 0.6;
    pointer-events: none;
}

@keyframes loadingBar {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== 飞书蓝主题专属样式覆盖 (Feishu) ========== */
[data-theme="feishu"] .btn-primary {
    border-radius: 9999px;
    background: linear-gradient(90deg, #4e83fd, #3370ff);
    border: none;
    box-shadow: 0 2px 8px rgba(78, 131, 253, 0.25);
}
[data-theme="feishu"] .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(78, 131, 253, 0.35);
    transform: translateY(-1px);
}
[data-theme="feishu"] .btn-primary::after {
    display: none;
}
[data-theme="feishu"] .btn-secondary {
    border-radius: 9999px;
    border: 1px solid #d0d3d6;
    background: #ffffff;
    color: #1f2329;
}
[data-theme="feishu"] .btn-secondary:hover {
    border-color: #4e83fd;
    color: #4e83fd;
}
[data-theme="feishu"] .btn-outline {
    border-radius: 9999px;
    border: 1px solid #d0d3d6;
    background: transparent;
}
[data-theme="feishu"] .btn-outline:hover {
    border-color: #4e83fd;
    color: #4e83fd;
}

[data-theme="feishu"] .post-card {
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid #e5e6e8;
    background: #ffffff;
}
[data-theme="feishu"] .post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    border-color: #d0d3d6;
}
[data-theme="feishu"] .post-card::before {
    display: none;
}
[data-theme="feishu"] .stat-card {
    border-radius: 14px;
    border: 1px solid #e5e6e8;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
[data-theme="feishu"] .stat-card::before {
    display: none;
}
[data-theme="feishu"] .stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-color: #d0d3d6;
}
[data-theme="feishu"] body::before {
    display: none;
}
[data-theme="feishu"] .hero::after {
    background: radial-gradient(circle, rgba(78,131,253,0.06) 0%, transparent 70%);
}
[data-theme="feishu"] .hero-title::after {
    background: linear-gradient(90deg, #4e83fd, #3370ff);
}
[data-theme="feishu"] .navbar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: rgba(208, 211, 214, 0.5);
}
[data-theme="feishu"] .auth-card {
    border-radius: 16px;
    border: 1px solid #e5e6e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
[data-theme="feishu"] .form-group input:focus,
[data-theme="feishu"] .form-group textarea:focus,
[data-theme="feishu"] .form-group select:focus {
    border-color: #4e83fd;
    box-shadow: 0 0 0 3px rgba(78, 131, 253, 0.12);
}
[data-theme="feishu"] .admin-sidebar {
    border-right: 1px solid #e5e6e8;
}
[data-theme="feishu"] .sidebar-link.active {
    background: rgba(78, 131, 253, 0.06);
    border-color: rgba(78, 131, 253, 0.15);
}
[data-theme="feishu"] .post-tag {
    border-radius: 9999px;
    border: 1px solid rgba(78, 131, 253, 0.15);
    background: rgba(78, 131, 253, 0.05);
    color: #4e83fd;
}
[data-theme="feishu"] .post-tag:hover {
    border-color: #4e83fd;
    background: rgba(78, 131, 253, 0.08);
}
[data-theme="feishu"] .page-link:hover {
    border-color: #4e83fd;
    box-shadow: 0 0 0 3px rgba(78, 131, 253, 0.1);
}
[data-theme="feishu"] .markdown-body blockquote {
    border-left-color: #4e83fd;
    background: rgba(78, 131, 253, 0.04);
}
[data-theme="feishu"] .table-container {
    border-radius: 14px;
    border: 1px solid #e5e6e8;
}
[data-theme="feishu"] .theme-toggle {
    border-radius: 9999px;
    width: 38px;
    height: 38px;
}
[data-theme="feishu"] .post-form {
    border-radius: 16px;
    border: 1px solid #e5e6e8;
}
[data-theme="feishu"] .markdown-body pre {
    border-radius: 12px;
    border: 1px solid #e5e6e8;
}
[data-theme="feishu"] .markdown-body pre::before {
    display: none;
}
[data-theme="feishu"] .admin-header {
    border-bottom: 1px solid #e5e6e8;
}
[data-theme="feishu"] .flash-message {
    border-radius: 12px;
    border: 1px solid #e5e6e8;
}
[data-theme="feishu"] .sidebar-section-label {
    color: #646a73;
}
[data-theme="feishu"] .section-items .sidebar-link {
    border-radius: 8px;
}

/* ========== 通用广告牌 Hero ========== */

/* 默认隐藏，JS 加载后根据主题显示 */
.site-hero {
    display: none;
}
[data-theme="dark"] .site-hero,
[data-theme="light"] .site-hero,
[data-theme="feishu"] .site-hero {
    display: block;
}

/* 隐藏旧版 Banner */
[data-theme="dark"] .home-banner,
[data-theme="light"] .home-banner,
[data-theme="feishu"] .home-banner {
    display: none !important;
}

/* Hero 容器 */
.site-hero {
    position: relative;
    width: 100%;
    height: 92vh;
    min-height: 560px;
    max-height: 900px;
    overflow: hidden;
    margin-bottom: 56px;
}

/* 背景图 */
.site-hero-bg {
    position: absolute;
    inset: -60px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    animation: heroZoom 12s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.20); }
}

/* ===== 暗夜机械 — 科技感遮罩 ===== */
[data-theme="dark"] .site-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(5, 8, 22, 0.70) 0%,
        rgba(5, 8, 22, 0.35) 45%,
        rgba(5, 8, 22, 0.10) 100%
    );
}

/* 暗夜机械：科技网格装饰 */
[data-theme="dark"] .site-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(78, 131, 253, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(78, 131, 253, 0.015) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
}

/* 暗夜机械：蓝色光晕 */
[data-theme="dark"] .site-hero-bg::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(78, 131, 253, 0.12), transparent 70%);
    top: -80px;
    right: -80px;
    pointer-events: none;
    animation: heroGlow 6s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.5; transform: translate(0, 0); }
    100% { opacity: 1; transform: translate(-40px, 30px); }
}

/* ===== 飞书蓝 — 渐变遮罩 ===== */
[data-theme="feishu"] .site-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 15, 35, 0.72) 0%,
        rgba(10, 15, 35, 0.35) 50%,
        rgba(10, 15, 35, 0.10) 100%
    );
}

/* ===== 白昼极光 — 柔和遮罩 ===== */
[data-theme="light"] .site-hero-bg {
    background-color: #e8edf4;
}

[data-theme="dark"] .site-hero-bg {
    background-color: #050816;
}

[data-theme="light"] .site-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(240, 245, 250, 0.75) 0%,
        rgba(240, 245, 250, 0.30) 45%,
        rgba(240, 245, 250, 0.05) 100%
    );
}

/* 底部渐变过渡 */
.site-hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    z-index: 1;
}
[data-theme="dark"] .site-hero-gradient {
    background: linear-gradient(to top, #0b0f1a 0%, transparent 100%);
}
[data-theme="light"] .site-hero-gradient {
    background: linear-gradient(to top, #f0f4f8 0%, transparent 100%);
}
[data-theme="feishu"] .site-hero-gradient {
    background: linear-gradient(to top, #f5f6f7 0%, transparent 100%);
}

/* 内容布局 */
.site-hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    z-index: 2;
}

.site-hero-inner {
    max-width: 680px;
    padding: 0 40px;
    margin-left: 6%;
    animation: heroContentIn 0.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroContentIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Badge */
.site-hero-badge {
    display: inline-block;
    padding: 7px 20px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}
[data-theme="dark"] .site-hero-badge {
    background: rgba(78, 131, 253, 0.12);
    border: 1px solid rgba(78, 131, 253, 0.25);
    color: #8ab4ff;
}
[data-theme="light"] .site-hero-badge {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    color: #6366f1;
}
[data-theme="feishu"] .site-hero-badge {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
}

/* 标题 */
.site-hero-title {
    font-size: 3.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}
[data-theme="dark"] .site-hero-title {
    text-shadow: 0 0 40px rgba(78, 131, 253, 0.15), 0 2px 30px rgba(0,0,0,0.3);
}

/* 白昼极光 — 标题深色 */
[data-theme="light"] .site-hero-title {
    color: #1a1a2e;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 副标题 */
.site-hero-sub {
    font-size: 1.15rem;
    margin: 0 0 36px;
    line-height: 1.6;
    max-width: 500px;
    font-weight: 400;
}
[data-theme="dark"] .site-hero-sub {
    color: rgba(255,255,255,0.6);
}
[data-theme="light"] .site-hero-sub {
    color: rgba(15, 23, 42, 0.6);
}
[data-theme="feishu"] .site-hero-sub {
    color: rgba(255,255,255,0.7);
}

.site-hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.site-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 36px;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* 主按钮 */
[data-theme="dark"] .site-hero-btn-primary {
    background: linear-gradient(90deg, #4e83fd, #3370ff);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 20px rgba(78, 131, 253, 0.35);
}
[data-theme="dark"] .site-hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(78, 131, 253, 0.5);
}

[data-theme="feishu"] .site-hero-btn-primary {
    background: linear-gradient(90deg, #4e83fd, #3370ff);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 20px rgba(78, 131, 253, 0.35);
}
[data-theme="feishu"] .site-hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(78, 131, 253, 0.5);
}

/* 白昼极光 — 主按钮 */
[data-theme="light"] .site-hero-btn-primary {
    background: linear-gradient(90deg, #6366f1, #4f46e5);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}
[data-theme="light"] .site-hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.45);
}

/* 幽灵按钮 */
[data-theme="dark"] .site-hero-btn-ghost {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.8) !important;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
}
[data-theme="dark"] .site-hero-btn-ghost:hover {
    background: rgba(78, 131, 253, 0.1);
    border-color: rgba(78, 131, 253, 0.35);
    transform: translateY(-2px);
}

[data-theme="feishu"] .site-hero-btn-ghost {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85) !important;
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
}
[data-theme="feishu"] .site-hero-btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(78, 131, 253, 0.4);
    transform: translateY(-2px);
}

/* 白昼极光 — 幽灵按钮 */
[data-theme="light"] .site-hero-btn-ghost {
    background: rgba(15, 23, 42, 0.04);
    color: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
}
[data-theme="light"] .site-hero-btn-ghost:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

/* 统计数据 */
.site-hero-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.site-stat-num {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}
[data-theme="dark"] .site-stat-num {
    text-shadow: 0 0 20px rgba(78, 131, 253, 0.2);
}
[data-theme="light"] .site-stat-num {
    color: #1a1a2e;
}

.site-stat-label {
    font-size: 0.78rem;
    font-weight: 400;
}
[data-theme="dark"] .site-stat-label {
    color: rgba(255,255,255,0.4);
}
[data-theme="light"] .site-stat-label {
    color: rgba(15, 23, 42, 0.45);
}
[data-theme="feishu"] .site-stat-label {
    color: rgba(255,255,255,0.5);
}

.site-stat-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
}

/* ========== Hero 移动端响应式 ========== */
@media (max-width: 640px) {
    .site-hero {
        height: 78vh;
        min-height: 380px;
        max-height: 600px;
        margin-bottom: 32px;
    }
    .site-hero-bg {
        inset: 0;
        transform: none;
        animation: none;
    }
    .site-hero-inner {
        max-width: 100%;
        padding: 0 24px;
        margin-left: 0;
    }
    .site-hero-badge {
        padding: 5px 14px;
        font-size: 0.72rem;
        margin-bottom: 16px;
    }
    .site-hero-title {
        font-size: 2rem;
        letter-spacing: -0.5px;
    }
    .site-hero-sub {
        font-size: 0.95rem;
        max-width: 100%;
        margin-bottom: 24px;
    }
    .site-hero-actions {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 32px;
    }
    .site-hero-btn {
        padding: 13px 28px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
    .site-hero-stats {
        gap: 14px;
    }
    .site-stat-num {
        font-size: 1.3rem;
    }
    .site-stat-label {
        font-size: 0.7rem;
    }
    .site-stat-dot {
        width: 3px;
        height: 3px;
    }
    /* 暗色主题课程/文章网格手机适配 */
    [data-theme="dark"] .homepage-courses {
        grid-template-columns: 1fr;
    }
    [data-theme="dark"] .posts-grid {
        grid-template-columns: 1fr;
    }
    [data-theme="dark"] .homepage-courses .course-card-image {
        height: 160px;
    }
}

/* ========== 暗夜机械主题卡片样式（飞书风格改造） ========== */
[data-theme="dark"] .section-header {
    border-bottom: none;
    margin-bottom: 24px;
    padding-bottom: 0;
}

[data-theme="dark"] .section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: -0.3px;
}

[data-theme="dark"] .section-more {
    font-size: 0.9rem;
    color: #818cf8;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 9999px;
    border: 1px solid rgba(129, 140, 248, 0.2);
    transition: all 0.25s ease;
}
[data-theme="dark"] .section-more:hover {
    background: rgba(129, 140, 248, 0.08);
    border-color: rgba(129, 140, 248, 0.4);
}

/* 课程卡片 */
[data-theme="dark"] .homepage-courses {
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

[data-theme="dark"] .homepage-courses .course-card {
    border-radius: 20px;
    border: 1px solid #1e293b;
    background: #111827;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="dark"] .homepage-courses .course-card:hover {
    transform: translateY(-6px);
    border-color: rgba(129, 140, 248, 0.25);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 30px rgba(129, 140, 248, 0.05);
}

[data-theme="dark"] .homepage-courses .course-card-image {
    height: 200px;
}

[data-theme="dark"] .homepage-courses .course-card-body {
    padding: 20px;
}

[data-theme="dark"] .homepage-courses .course-card-category {
    font-size: 0.7rem;
    color: #818cf8;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

[data-theme="dark"] .homepage-courses .course-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 6px;
    line-height: 1.4;
}

[data-theme="dark"] .homepage-courses .course-card-summary {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 12px;
}

[data-theme="dark"] .homepage-courses .course-card-meta {
    padding-top: 12px;
    border-top: 1px solid #1e293b;
}

[data-theme="dark"] .homepage-courses .course-lessons,
[data-theme="dark"] .homepage-courses .course-duration {
    font-size: 0.8rem;
    color: #64748b;
}

/* 文章卡片 */
[data-theme="dark"] .posts-section {
    margin-bottom: 60px;
}

[data-theme="dark"] .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

[data-theme="dark"] .post-card {
    border-radius: 20px;
    border: 1px solid #1e293b;
    background: #111827;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="dark"] .post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(129, 140, 248, 0.2);
    box-shadow: 0 12px 36px rgba(0,0,0,0.25), 0 0 20px rgba(129, 140, 248, 0.04);
}

[data-theme="dark"] .post-card-body {
    padding: 0;
}

[data-theme="dark"] .post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

[data-theme="dark"] .post-date {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 400;
}

[data-theme="dark"] .post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

[data-theme="dark"] .post-tag {
    border-radius: 9999px;
    padding: 3px 12px;
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid rgba(129, 140, 248, 0.15);
    background: rgba(129, 140, 248, 0.06);
    color: #818cf8;
    text-decoration: none;
    transition: all 0.2s ease;
}
[data-theme="dark"] .post-tag:hover {
    background: rgba(129, 140, 248, 0.12);
    border-color: #818cf8;
}

[data-theme="dark"] .post-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}

[data-theme="dark"] .post-title a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.2s;
}
[data-theme="dark"] .post-title a:hover {
    color: #818cf8;
}

[data-theme="dark"] .post-summary {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 12px;
}

[data-theme="dark"] .read-more {
    font-size: 0.85rem;
    font-weight: 500;
    color: #818cf8;
    text-decoration: none;
    transition: opacity 0.2s;
}
[data-theme="dark"] .read-more:hover {
    opacity: 0.75;
}

/* 暗夜机械分页 */
[data-theme="dark"] .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

[data-theme="dark"] .page-link {
    padding: 10px 22px;
    border-radius: 9999px;
    border: 1px solid #1e293b;
    background: #111827;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
[data-theme="dark"] .page-link:hover {
    border-color: #818cf8;
    color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

[data-theme="dark"] .page-info {
    font-size: 0.85rem;
    color: #64748b;
}

/* ========== 飞书蓝主题卡片样式 ========== */
[data-theme="feishu"] .featured-courses {
    margin-bottom: 48px;
}

[data-theme="feishu"] .section-header {
    border-bottom: none;
    margin-bottom: 24px;
    padding-bottom: 0;
}

[data-theme="feishu"] .section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f2329;
    letter-spacing: -0.3px;
}

[data-theme="feishu"] .section-more {
    font-size: 0.9rem;
    color: #4e83fd;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 9999px;
    border: 1px solid rgba(78, 131, 253, 0.2);
    transition: all 0.25s ease;
}
[data-theme="feishu"] .section-more:hover {
    background: rgba(78, 131, 253, 0.06);
    border-color: rgba(78, 131, 253, 0.4);
}

/* 课程卡片 — 广告牌风格 */
[data-theme="feishu"] .homepage-courses {
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

[data-theme="feishu"] .homepage-courses .course-card {
    border-radius: 20px;
    border: 1px solid #e5e6e8;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="feishu"] .homepage-courses .course-card:hover {
    transform: translateY(-6px);
    border-color: #d0d3d6;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}

[data-theme="feishu"] .homepage-courses .course-card-image {
    height: 200px;
}

[data-theme="feishu"] .homepage-courses .course-card-body {
    padding: 20px;
}

[data-theme="feishu"] .homepage-courses .course-card-category {
    font-size: 0.7rem;
    color: #4e83fd;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

[data-theme="feishu"] .homepage-courses .course-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2329;
    margin: 0 0 6px;
    line-height: 1.4;
}

[data-theme="feishu"] .homepage-courses .course-card-summary {
    font-size: 0.85rem;
    color: #646a73;
    line-height: 1.6;
    margin: 0 0 12px;
}

[data-theme="feishu"] .homepage-courses .course-card-meta {
    padding-top: 12px;
    border-top: 1px solid #f0f1f2;
}

[data-theme="feishu"] .homepage-courses .course-lessons,
[data-theme="feishu"] .homepage-courses .course-duration {
    font-size: 0.8rem;
    color: #8a8f99;
}

/* 文章卡片 — 广告公司大卡片样式 */
[data-theme="feishu"] .posts-section {
    margin-bottom: 60px;
}

[data-theme="feishu"] .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

[data-theme="feishu"] .post-card {
    border-radius: 20px;
    border: 1px solid #e5e6e8;
    background: #ffffff;
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="feishu"] .post-card:hover {
    transform: translateY(-4px);
    border-color: #d0d3d6;
    box-shadow: 0 12px 36px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.04);
}

[data-theme="feishu"] .post-card::before {
    display: none;
}

[data-theme="feishu"] .post-card-body {
    padding: 0;
}

[data-theme="feishu"] .post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

[data-theme="feishu"] .post-date {
    font-size: 0.8rem;
    color: #8a8f99;
    font-weight: 400;
}

[data-theme="feishu"] .post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

[data-theme="feishu"] .post-tag {
    border-radius: 9999px;
    padding: 3px 12px;
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid rgba(78, 131, 253, 0.15);
    background: rgba(78, 131, 253, 0.05);
    color: #4e83fd;
    text-decoration: none;
    transition: all 0.2s ease;
}
[data-theme="feishu"] .post-tag:hover {
    background: rgba(78, 131, 253, 0.1);
    border-color: #4e83fd;
}

[data-theme="feishu"] .post-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}

[data-theme="feishu"] .post-title a {
    color: #1f2329;
    text-decoration: none;
    transition: color 0.2s;
}
[data-theme="feishu"] .post-title a:hover {
    color: #4e83fd;
}

[data-theme="feishu"] .post-summary {
    font-size: 0.88rem;
    color: #646a73;
    line-height: 1.6;
    margin: 0 0 12px;
}

[data-theme="feishu"] .read-more {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4e83fd;
    text-decoration: none;
    transition: opacity 0.2s;
}
[data-theme="feishu"] .read-more:hover {
    opacity: 0.75;
}

/* 分页 */
[data-theme="feishu"] .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

[data-theme="feishu"] .page-link {
    padding: 10px 22px;
    border-radius: 9999px;
    border: 1px solid #d0d3d6;
    background: #ffffff;
    color: #1f2329;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
[data-theme="feishu"] .page-link:hover {
    border-color: #4e83fd;
    color: #4e83fd;
    box-shadow: 0 0 0 3px rgba(78, 131, 253, 0.1);
}

[data-theme="feishu"] .page-info {
    font-size: 0.85rem;
    color: #646a73;
}

/* 空状态 */
[data-theme="feishu"] .empty-state {
    text-align: center;
    padding: 60px 20px;
}

[data-theme="feishu"] .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

[data-theme="feishu"] .empty-state h3 {
    font-size: 1.1rem;
    color: #1f2329;
    margin: 0 0 6px;
}

[data-theme="feishu"] .empty-state p {
    font-size: 0.9rem;
    color: #646a73;
}

/* ========== 飞书蓝页脚 ========== */
[data-theme="feishu"] .footer {
    background: #1f2329;
    color: #bbbdc4;
    padding: 32px 0;
    margin-top: 48px;
}

[data-theme="feishu"] .footer p {
    font-size: 0.85rem;
}

[data-theme="feishu"] .footer a {
    color: #8ab4ff;
}

/* ========== 响应式：飞书蓝轮播 ========== */
@media (max-width: 768px) {
    .feishu-hero-carousel {
        height: 60vh;
        min-height: 380px;
    }
    .carousel-title {
        font-size: 2rem;
    }
    .carousel-content {
        bottom: 12%;
        left: 5%;
        right: 5%;
    }
    .carousel-subtitle {
        font-size: 0.95rem;
    }
    .carousel-btn {
        padding: 12px 24px;
        font-size: 0.88rem;
    }
    [data-theme="feishu"] .homepage-courses {
        grid-template-columns: 1fr;
    }
    [data-theme="feishu"] .posts-grid {
        grid-template-columns: 1fr;
    }
    [data-theme="feishu"] .homepage-courses .course-card-image {
        height: 160px;
    }
}
