/* 
 * 轻语博客 - Antigravity 极简高端重构版
 */

:root {
    /* --- 极昼梦境 (Light Theme) --- */
    --primary-color: #6366f1;
    --primary-light: #a5b4fc;
    --accent-color: #ec4899;
    --bg-white: #ffffff;
    --bg-soft: #fbfbfe;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    --border-color: rgba(226, 232, 240, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-premium: 0 25px 50px -12px rgba(99, 102, 241, 0.12);
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03);
    --article-accent: rgba(99, 102, 241, 0.05);
    /* 阅读区装饰色 */
}

[data-theme="dark"] {
    /* --- 星渊深邃 (Dark Theme) --- */
    --bg-white: #0a0a0f;
    --bg-soft: #020617;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.75);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --article-accent: rgba(165, 180, 252, 0.1);
    --accent-color: #f472b6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-soft);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* --- 自定义艺术滚动条 --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

h1,
h2,
h3,
h4,
.brand,
.btn {
    font-family: 'Outfit', sans-serif;
}

/* --- 艺术背景系统 --- */
.mesh-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: var(--bg-white);
    overflow: hidden;
    transition: background 0.5s ease;
}

[data-theme="dark"] .mesh-gradient::before {
    opacity: 0.15;
}

[data-theme="dark"] .mesh-gradient::after {
    opacity: 0.15;
}

.mesh-gradient::before,
.mesh-gradient::after {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    z-index: -2;
    animation: float-bg 30s ease-in-out infinite alternate;
}

.mesh-gradient::before {
    background: radial-gradient(circle, var(--primary-color), transparent);
    top: -200px;
    right: -200px;
}

.mesh-gradient::after {
    background: radial-gradient(circle, var(--accent-color), transparent);
    bottom: -200px;
    left: -200px;
    animation-delay: -15s;
}

@keyframes float-bg {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-100px, 100px) scale(1.2);
    }
}

/* 装饰性浮动气泡 */
.decor-blob {
    position: fixed;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0.05;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 20s ease-in-out infinite;
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    34% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }

    67% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 40%;
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* --- 容器 --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm {
    max-width: 700px;
}

/* --- 导航栏 (Glassmorphism) --- */
.navbar {
    position: sticky;
    top: 20px;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin: 20px auto;
    width: calc(100% - 40px);
    max-width: 1100px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 30px;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li {
    list-style: none;
}

/* 手机端汉堡菜单按钮 - PC端隐藏 */
.navbar-toggle {
    display: none;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* --- 鼠标跟随特效 (Antigravity Cursor) --- */
.cursor-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s, background 0.3s, opacity 0.3s;
    transform: translate(-50%, -50%);
    opacity: 0.5;
    filter: blur(4px);
}

.cursor-follower.expanding {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    opacity: 0.3;
}

/* --- 按钮 --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-soft);
}

/* --- 文章卡片 (Antigravity Style) --- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    padding: 40px 0;
}

.article-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-light);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-soft);
}

.card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.5rem;
    /* 固定两行高度保持整齐 */
}

.card-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s;
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2rem;
    /* 保持摘要对齐 */
}

.card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* --- 侧边栏布局 (Admin) --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 40px 60px;
}

/* --- 日夜切换按钮 --- */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.2rem;
    color: var(--text-main);
    box-shadow: var(--glass-shadow);
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    background: var(--primary-color);
    color: #fff;
}

/* --- 阅读页艺术侧翼装饰 --- */
.article-decor-left {
    position: fixed;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--primary-color);
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

.article-decor-right {
    position: fixed;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    height: 200px;
    width: 1px;
    background: var(--border-color);
    z-index: 1;
}

.read-progress-bar {
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    position: absolute;
    top: 0;
    left: -1.5px;
    border-radius: 2px;
    transition: height 0.1s ease;
    box-shadow: 0 0 10px var(--primary-light);
}

@media (max-width: 1400px) {

    .article-decor-left,
    .article-decor-right {
        display: none;
    }
}

.admin-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* --- 统计卡片 --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* --- 数据表格 --- */
.data-table {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--bg-soft);
    padding: 16px 20px;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

td {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
}

/* --- 表单系统 (Antigravity High-End) --- */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: #fff;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 6px;
}

/* --- 编辑器容器 --- */
.editor-container {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    min-height: 300px;
    box-shadow: var(--shadow-soft);
}

.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    background: var(--bg-soft);
    padding: 12px !important;
    position: relative;
    z-index: 10;
}

/* 修复编辑器按钮点击问题 */
.ql-toolbar.ql-snow button,
.ql-toolbar.ql-snow .ql-picker {
    position: relative;
    z-index: 11;
    pointer-events: auto !important;
}

.ql-container.ql-snow {
    border: none !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1.05rem !important;
    position: relative;
    z-index: 5;
}


/* --- 文章正文样式增强 (核心限宽与排版) --- */
.article-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.article-content img {
    max-width: 100% !important;
    /* 强制自适应，防止霸屏 */
    height: auto !important;
    display: block;
    margin: 32px auto;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
}

.article-content img:hover {
    transform: scale(1.01);
}

.article-content p {
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

/* 链接样式 - 自动换行 + 可点击效果 */
.article-content a,
.article-content .auto-link {
    color: var(--primary-color);
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    transition: all 0.2s ease;
    border-bottom: 1px dashed var(--primary-light);
    padding-bottom: 1px;
}

.article-content a:hover,
.article-content .auto-link:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* --- 响应式深度优化 (Antigravity 终极适配版) --- */

@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
}

@media (max-width: 768px) {

    /* 导航栏重构：解决挤压堆叠 */
    .navbar-inner {
        padding: 0 20px;
        height: 70px;
    }

    .brand {
        font-size: 1.2rem;
    }

    /* 移动端：导航菜单默认隐藏 */
    .nav-links {
        display: none !important;
        position: fixed;
        top: 100px;
        left: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid var(--glass-border);
        border-radius: 24px;
        flex-direction: column;
        padding: 24px 20px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        gap: 8px;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }

    /* 移动端：导航菜单激活时显示 */
    .nav-links.active {
        display: flex !important;
        animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes slideDownFade {
        from {
            opacity: 0;
            transform: translateY(-20px) scale(0.95);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .nav-links li {
        width: 100%;
        margin: 0;
    }

    .nav-links a {
        display: block;
        padding: 12px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
    }

    .navbar-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
    }

    .navbar-toggle span {
        width: 100%;
        height: 2px;
        background: var(--text-main);
        border-radius: 2px;
        transition: all 0.3s;
    }

    .navbar-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .navbar-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .navbar-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* 内容区适配 */
    .main-content {
        padding-top: 90px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* 详情页优化 */
    .article-header h1 {
        font-size: 1.6rem;
        line-height: 1.4;
    }

    .article-detail {
        padding: 30px 20px;
        border-radius: 24px;
    }

    /* 侧边栏移动端隐藏 */
    .sidebar {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* 后台管理深度适配 */
@media (max-width: 992px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        background: var(--bg-soft);
        border-right: 1px solid var(--border-color);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0 !important;
        padding: 20px;
        width: 100%;
    }

    .data-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px;
    }

    .data-table table {
        min-width: 700px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .card-content {
        padding: 20px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* 移动端固定按钮调整位置 */
    .fixed-submit-btn {
        right: 15px !important;
        bottom: 15px !important;
    }

    .fixed-submit-btn .btn {
        width: auto !important;
        padding: 14px 24px !important;
        font-size: 0.9rem !important;
    }
}

/* --- 固定发布按钮样式 --- */
.fixed-submit-btn {
    animation: floatIn 0.5s ease-out;
}

.fixed-submit-btn .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5) !important;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   前端美化组件 v2.0
   =================================== */

/* --- Alert 提示消息 --- */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-soft);
    animation: alertSlide 0.3s ease;
    border-left: 4px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: #065f46;
    border-left-color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    color: #92400e;
    border-left-color: #f59e0b;
}

[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

[data-theme="dark"] .alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
}

@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 导航栏美化 --- */
.brand-emoji {
    font-size: 1.3rem;
}

.nav-write-icon {
    font-size: 0.9rem;
}

.nav-admin-link {
    font-size: 0.85rem !important;
}

.nav-register-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color)) !important;
    color: #fff !important;
    padding: 6px 18px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: all 0.3s !important;
}

.nav-register-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
}

.nav-logout {
    color: var(--text-light) !important;
    font-size: 0.85rem !important;
}

/* --- 前端分页 --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a {
    color: var(--text-muted);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.pagination span.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    border: none;
}

.pagination span.disabled {
    color: var(--text-light);
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- 页脚 --- */
.site-footer {
    margin-top: 80px;
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.footer-logo {
    font-size: 1.2rem;
}

.footer-name {
    font-size: 1rem;
}

.footer-copy {
    color: var(--text-light);
    font-size: 0.82rem;
}

/* --- Hero 区域 --- */
.hero-section {
    text-align: center;
    padding: 80px 0 50px;
    position: relative;
}

.hero-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.03;
    pointer-events: none;
    white-space: nowrap;
    text-transform: uppercase;
    z-index: -1;
    letter-spacing: 15px;
    font-family: 'Outfit', sans-serif;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -3px;
    margin-bottom: 16px;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text-main), var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Outfit', sans-serif;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
    font-family: 'Noto Serif SC', serif;
    line-height: 1.8;
    opacity: 0.7;
}

.hero-divider {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 32px auto 0;
    border-radius: 3px;
}

/* --- 文章卡片动画增强 --- */
.article-card {
    animation: cardFadeIn 0.5s ease both;
}

.article-card:nth-child(1) {
    animation-delay: 0.05s;
}

.article-card:nth-child(2) {
    animation-delay: 0.1s;
}

.article-card:nth-child(3) {
    animation-delay: 0.15s;
}

.article-card:nth-child(4) {
    animation-delay: 0.2s;
}

.article-card:nth-child(5) {
    animation-delay: 0.25s;
}

.article-card:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card:hover .card-image {
    transform: scale(1.05);
}

/* --- 表单卡片 (登录/注册/撰写) --- */
.form-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-premium);
    max-width: 500px;
    margin: 40px auto;
}

.form-card-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

.form-card-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* --- 侧边栏热点美化 --- */
.sidebar-card {
    padding: 24px;
    border-radius: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
}

.sidebar-card-title {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
}

.hot-item {
    transition: all 0.2s ease;
    padding: 6px 0;
    border-radius: 8px;
}

.hot-item:hover {
    background: rgba(99, 102, 241, 0.04);
}

/* --- Toast 通知 --- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 500;
    z-index: 10000;
    animation: toastIn 0.3s ease;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    max-width: 360px;
}

.toast-success {
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
}

.toast-error {
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
}

.toast-info {
    background: rgba(99, 102, 241, 0.95);
    color: #fff;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- 评论区美化 --- */
.comment-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.comment-card:hover {
    box-shadow: var(--shadow-soft);
}

/* --- 移动端页脚 --- */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: -2px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-watermark {
        font-size: 4rem;
    }

    .hero-section {
        padding: 50px 0 30px;
    }

    .form-card {
        padding: 28px 20px;
        margin: 20px auto;
        border-radius: 20px;
    }

    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.82rem;
    }

    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* ===================================
   登录 / 注册页 (Auth)
   =================================== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    padding: 40px 16px;
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-premium);
    animation: cardFadeIn 0.5s ease;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 6px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-main), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 1.5rem;
    }
}

/* ===================================
   主题切换按钮
   =================================== */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(30deg) scale(1.1);
}

/* ===================================
   Dashboard (用户中心)
   =================================== */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 统计网格 */
.stats-grid {
    display: grid;
    gap: 16px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* 数据表格 */
.data-table {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: rgba(99, 102, 241, 0.04);
    padding: 14px 20px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.data-table a:hover {
    text-decoration: underline;
}

/* 状态标签 */
.status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-approved {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 头像 */
.avatar {
    border-radius: 50%;
    object-fit: cover;
}

.avatar-xl {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 1.8rem;
}

/* 通用卡片 */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.card-body {
    padding: 28px;
}

/* 表单提示 */
.form-hint {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 6px;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .sep {
    color: var(--text-light);
    opacity: 0.5;
}

/* ===================================
   移动端 Dashboard 适配
   =================================== */
@media (max-width: 768px) {
    .data-table {
        overflow-x: auto;
    }

    .data-table table {
        min-width: 500px;
    }

    .card-body {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .avatar-xl {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
    }

    .stat-card {
        padding: 16px 12px;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}