/*
Theme Name: YIS3D
Theme URI: https://www.yis3d.com
Author: YIS3D Team
Description: YIS3D 创意3D解决方案 - 现代化暗色主题，支持登录注册功能
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
License: GPL v2 or later
Text Domain: yis3d
*/

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --accent: #00cec9;
    --dark: #0a0a1a;
    --dark-2: #12122a;
    --text: #e0e0f0;
    --text-muted: #8888aa;
    --gradient-1: linear-gradient(135deg, #6c5ce7, #00cec9);
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--dark) !important;
    color: var(--text);
    overflow-x: hidden;
}

/* ===== 强制覆盖 WordPress 默认样式 ===== */
html, body {
    background-color: #0a0a1a !important;
    color-scheme: dark !important;
}

/* 覆盖 WordPress 块编辑器默认白色背景 */
.wp-site-blocks,
.site-content,
.content-area,
.entry-content,
.post-content,
.page-content,
article,
main,
#main,
.yis3d-content {
    background-color: transparent !important;
    background: transparent !important;
    color: var(--text) !important;
}

/* 覆盖 WordPress 段落/标题默认颜色 */
p, h1, h2, h3, h4, h5, h6, li, span, a:not(.btn-primary):not(.btn-outline):not(.btn-admin):not(.btn-logout) {
    color: inherit;
}

/* 移除 WordPress 默认的白色块背景 */
.wp-block-group__inner-container,
.wp-block-cover,
.wp-block-columns,
.wp-block-column {
    background-color: transparent !important;
}

/* --- 导航栏 --- */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 3rem;
    background: rgba(10,10,26,0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(108,92,231,0.15);
    transition: background 0.3s;
}
.logo {
    font-size: 1.6rem; font-weight: 800;
    background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
    color: var(--text-muted); text-decoration: none; font-size: 0.95rem;
    transition: color 0.3s; position: relative;
}
.nav-links a:hover { color: #fff; }
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--gradient-1); transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
    padding: 0.55rem 1.5rem; border-radius: 50px; border: none;
    background: var(--gradient-1); color: #fff; font-weight: 600;
    cursor: pointer; font-size: 0.9rem; transition: transform 0.2s, box-shadow 0.3s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,92,231,0.4); }

/* --- Hero --- */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 8rem 2rem 4rem; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(108,92,231,0.15), transparent 70%);
    top: -100px; right: -100px; border-radius: 50%; animation: float 8s ease-in-out infinite;
}
.hero::after {
    content: ''; position: absolute; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0,206,201,0.12), transparent 70%);
    bottom: -80px; left: -80px; border-radius: 50%; animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.hero-badge {
    display: inline-block; padding: 0.4rem 1.2rem; border-radius: 50px;
    border: 1px solid rgba(108,92,231,0.4); color: var(--accent);
    font-size: 0.85rem; margin-bottom: 1.5rem;
    background: rgba(108,92,231,0.08);
}
.hero h1 {
    font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.2rem;
}
.hero h1 span {
    background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.15rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 2.5rem; max-width: 600px; margin-inline: auto;
}
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
    padding: 0.85rem 2.2rem; border-radius: 50px; border: none;
    background: var(--gradient-1); color: #fff; font-weight: 700;
    font-size: 1rem; cursor: pointer; transition: transform 0.2s, box-shadow 0.3s;
    text-decoration: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(108,92,231,0.4); }
.btn-outline {
    padding: 0.85rem 2.2rem; border-radius: 50px;
    border: 1.5px solid rgba(108,92,231,0.5); background: transparent;
    color: var(--text); font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: all 0.3s; text-decoration: none;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* --- 3D 装饰网格 --- */
.grid-decoration {
    position: absolute; inset: 0; z-index: 0;
    background-image:
        linear-gradient(rgba(108,92,231,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108,92,231,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* --- 特性区 --- */
.features {
    padding: 6rem 2rem; max-width: 1200px; margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 {
    font-size: 2.2rem; font-weight: 700; margin-bottom: 0.8rem;
}
.section-header p { color: var(--text-muted); font-size: 1.05rem; }
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: var(--dark-2); border: 1px solid rgba(108,92,231,0.1);
    border-radius: 16px; padding: 2.5rem 2rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(108,92,231,0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.feature-icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: rgba(108,92,231,0.1); display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 1.2rem;
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.feature-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }

/* --- 展示区 --- */
.showcase {
    padding: 6rem 2rem; text-align: center;
    background: linear-gradient(180deg, transparent, rgba(108,92,231,0.03), transparent);
}
.showcase-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem; max-width: 1100px; margin: 0 auto;
}
.showcase-item {
    border-radius: 16px; overflow: hidden; position: relative;
    aspect-ratio: 4/3; background: var(--dark-2);
    border: 1px solid rgba(108,92,231,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; transition: transform 0.3s;
}
.showcase-item:hover { transform: scale(1.03); }
.showcase-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 1rem; background: linear-gradient(transparent, rgba(10,10,26,0.9));
    text-align: left;
}
.showcase-label h4 { font-size: 1rem; }
.showcase-label span { color: var(--text-muted); font-size: 0.82rem; }

/* --- 数据统计 --- */
.stats {
    padding: 5rem 2rem; max-width: 1000px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem; text-align: center;
}
.stat-item h3 {
    font-size: 2.5rem; font-weight: 800;
    background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-item p { color: var(--text-muted); margin-top: 0.3rem; }

/* --- CTA --- */
.cta {
    padding: 6rem 2rem; text-align: center;
}
.cta-box {
    max-width: 700px; margin: 0 auto; padding: 4rem 3rem;
    background: var(--dark-2); border-radius: 24px;
    border: 1px solid rgba(108,92,231,0.15);
}
.cta-box h2 { font-size: 2rem; margin-bottom: 1rem; }
.cta-box p { color: var(--text-muted); margin-bottom: 2rem; line-height: 1.7; }

/* --- Footer --- */
footer {
    padding: 2rem 2rem; text-align: center;
    border-top: 1px solid rgba(108,92,231,0.1);
    color: var(--text-muted); font-size: 0.85rem;
}
.footer-beian { margin-top: 0.5rem; }
.footer-beian a {
    color: var(--text-muted); text-decoration: none;
    transition: color 0.3s;
}
.footer-beian a:hover { color: #fff; }
.beian-sep { margin: 0 0.4rem; opacity: 0.5; }
.footer-beian .admin-link {
    color: var(--accent);
}
.footer-beian .admin-link:hover {
    color: #fff;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    nav { padding: 0.8rem 1.5rem; }
    .nav-links { display: none; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .section-header h2 { font-size: 1.7rem; }
}

/* ===== 登录注册弹窗 ===== */
.auth-btns { display: flex; gap: 0.8rem; align-items: center; }
.btn-login, .btn-register-nav {
    padding: 0.45rem 1.3rem; border-radius: 50px;
    border: none; cursor: pointer; font-size: 0.85rem;
    transition: all 0.3s; white-space: nowrap;
}
.btn-login {
    background: transparent; color: var(--text);
    border: 1.5px solid rgba(108,92,231,0.4); font-weight: 500;
}
.btn-login:hover { background: rgba(108,92,231,0.1); color: #fff; border-color: var(--primary); }
.btn-register-nav {
    background: var(--gradient-1); color: #fff; font-weight: 600;
}
.btn-register-nav:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,92,231,0.4); }

/* 用户已登录状态 */
.user-area { display: flex; align-items: center; gap: 0.6rem; }
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--gradient-1); display: flex; align-items: center;
    justify-content: center; font-size: 0.85rem; font-weight: 700; color: #fff;
}
.user-name { font-size: 0.85rem; color: var(--text); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout {
    padding: 0.35rem 0.9rem; border-radius: 50px;
    border: 1.5px solid rgba(255,100,100,0.4);
    background: transparent; color: #ff8888; font-size: 0.78rem;
    cursor: pointer; transition: all 0.3s;
}
.btn-logout:hover { background: rgba(255,100,100,0.15); color: #ff6666; }

/* 后台管理按钮（仅管理员可见） */
.btn-admin {
    padding: 0.35rem 1rem; border-radius: 50px;
    border: 1.5px solid rgba(0,206,201,0.4);
    background: transparent; color: var(--accent); font-size: 0.78rem;
    cursor: pointer; transition: all 0.3s; text-decoration: none;
}
.btn-admin:hover { background: rgba(0,206,201,0.15); color: #fff; }

/* 遮罩层 */
.modal-overlay {
    position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

/* 弹窗容器 */
.auth-modal {
    width: 420px; max-width: 90vw;
    background: var(--dark-2);
    border: 1px solid rgba(108,92,231,0.2);
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s ease;
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
}
.modal-overlay.active .auth-modal {
    transform: translateY(0) scale(1);
}

/* 弹窗头部 */
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.modal-title { font-size: 1.5rem; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.06); color: var(--text-muted);
    font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}
.modal-close:hover { background: rgba(255,100,100,0.15); color: #ff6666; }

/* Tab 切换 */
.auth-tabs {
    display: flex; gap: 0;
    background: rgba(108,92,231,0.08);
    border-radius: 12px; padding: 4px; margin-bottom: 1.8rem;
}
.auth-tab {
    flex: 1; padding: 0.55rem; border: none; border-radius: 10px;
    background: transparent; color: var(--text-muted);
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: all 0.3s;
}
.auth-tab.active {
    background: var(--gradient-1); color: #fff; box-shadow: 0 4px 16px rgba(108,92,231,0.3);
}

/* 表单 */
.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block; font-size: 0.82rem; color: var(--text-muted);
    margin-bottom: 0.4rem; font-weight: 500;
}
.form-group input {
    width: 100%; padding: 0.75rem 1rem;
    border: 1.5px solid rgba(108,92,231,0.2);
    border-radius: 10px;
    background: rgba(10,10,26,0.6);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}
.form-group input::placeholder { color: rgba(136,138,170,0.6); }
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,0.12); }
.form-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.3rem;
}
.form-row label { font-size: 0.82rem; color: var(--text-muted); cursor: pointer; }
.form-row a { font-size: 0.82rem; color: var(--accent); text-decoration: none; }
.form-row a:hover { text-decoration: underline; }

.btn-submit {
    width: 100%; padding: 0.8rem; border: none; border-radius: 12px;
    background: var(--gradient-1); color: #fff;
    font-size: 0.95rem; font-weight: 700; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(108,92,231,0.4); }

/* 提示消息 */
.form-msg {
    text-align: center; font-size: 0.84rem;
    margin-top: 1rem; min-height: 1.2em;
}
.form-msg.error { color: #ff6666; }
.form-msg.success { color: var(--accent); }

/* 移动端适配 */
@media (max-width: 480px) {
    .auth-modal { width: 94vw; padding: 2rem 1.5rem 1.5rem; }
}

/* ===== 内容页面通用样式 ===== */
.yis3d-content {
    max-width: 1100px;
    margin: 8rem auto 4rem;
    padding: 3rem 2rem;
    min-height: 60vh;
    position: relative;
}

/* 内容区背景装饰 - 与首页保持一致的暗色风格 */
.yis3d-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        linear-gradient(180deg, rgba(108,92,231,0.04) 0%, transparent 30%),
        radial-gradient(ellipse at 20% 20%, rgba(108,92,231,0.06), transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0,206,201,0.04), transparent 50%);
    border-radius: 24px;
    z-index: -1;
}

.yis3d-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(108,92,231,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108,92,231,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    border-radius: 24px;
    z-index: -1;
}

/* --- 单篇文章 (single.php) --- */
.single-post {
    margin-bottom: 3rem;
    background: var(--dark-2);
    border-radius: 20px;
    border: 1px solid rgba(108,92,231,0.1);
    padding: 2.5rem;
}
.post-header { text-align: center; margin-bottom: 2.5rem; }
.post-meta {
    color: var(--accent); font-size: 0.88rem; margin-bottom: 1rem;
}
.post-sep { margin: 0 0.6rem; opacity: 0.4; }
.post-title {
    font-size: 2.2rem; font-weight: 800; line-height: 1.3;
    background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.post-categories { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.8rem; }
.post-categories a { color: var(--accent); text-decoration: none; }
.post-thumbnail {
    border-radius: 16px; overflow: hidden; margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.post-thumbnail img { width: 100%; height: auto; display: block; }
.post-content {
    font-size: 1.05rem; line-height: 1.9; color: var(--text);
}
.post-content h2, .post-content h3, .post-content h4 {
    margin: 2rem 0 0.8rem; color: #fff;
}
.post-content img { max-width: 100%; height: auto; border-radius: 12px; }
.post-content blockquote {
    border-left: 3px solid var(--primary); padding-left: 1.5rem;
    margin: 1.5rem 0; color: var(--text-muted); font-style: italic;
}
.post-tags { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(108,92,231,0.15); }
.tags-label { color: var(--text-muted); font-size: 0.85rem; }
.post-tags a {
    display: inline-block; padding: 0.25rem 0.75rem; margin: 0.25rem;
    background: rgba(108,92,231,0.15); border-radius: 20px;
    color: var(--accent); font-size: 0.82rem; text-decoration: none; transition: background 0.3s;
}
.post-tags a:hover { background: rgba(108,92,231,0.3); }

/* 文章导航 */
.post-navigation {
    display: flex; justify-content: space-between; gap: 1rem;
    margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(108,92,231,0.15);
}
.nav-prev a, .nav-next a {
    color: var(--text-muted); text-decoration: none; transition: color 0.3s;
}
.nav-prev a:hover, .nav-next a:hover { color: var(--accent); }

/* --- 单页 (page.php) --- */
.single-page {
    background: var(--dark-2);
    border-radius: 20px;
    border: 1px solid rgba(108,92,231,0.1);
    padding: 2.5rem;
}
.page-header { text-align: center; margin-bottom: 2.5rem; }
.page-title {
    font-size: 2.2rem; font-weight: 800;
    background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.page-thumbnail {
    border-radius: 16px; overflow: hidden; margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.page-thumbnail img { width: 100%; height: auto; display: block; }
.page-content { font-size: 1.05rem; line-height: 1.9; color: var(--text); }
.page-children { margin-top: 3rem; padding: 2rem; background: var(--dark-2); border-radius: 16px; border: 1px solid rgba(108,92,231,0.1); }
.page-children h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.page-children ul { list-style: none; padding: 0; }
.page-children li { padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.page-children li:last-child { border: none; }
.page-children a { color: var(--text); text-decoration: none; transition: color 0.3s; }
.page-children a:hover { color: var(--accent); }

/* --- 归档页 (archive.php) --- */
.archive-header { text-align: center; margin-bottom: 3rem; }
.archive-title {
    font-size: 2rem; font-weight: 700;
    background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.archive-description { color: var(--text-muted); margin-top: 0.5rem; font-size: 1rem; }
.archive-list {
    background: var(--dark-2);
    border-radius: 20px;
    border: 1px solid rgba(108,92,231,0.1);
    padding: 2rem;
}
.archive-item {
    display: flex; gap: 1.5rem; padding: 1.5rem 0;
    border-bottom: 1px solid rgba(108,92,231,0.08); align-items: flex-start;
}
.archive-thumb {
    flex-shrink: 0; width: 200px; border-radius: 12px; overflow: hidden;
    display: block; transition: transform 0.3s;
}
.archive-thumb:hover { transform: scale(1.03); }
.archive-thumb img { width: 100%; height: auto; display: block; }
.archive-info { flex: 1; min-width: 0; }
.archive-item-title {
    font-size: 1.2rem; font-weight: 600; margin-bottom: 0.4rem;
}
.archive-item-title a { color: var(--text); text-decoration: none; }
.archive-item-title a:hover { color: var(--accent); }
.archive-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.archive-meta span { margin-right: 1rem; }
.archive-excerpt { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* --- 搜索页 (search.php) --- */
.search-header { text-align: center; margin-bottom: 2.5rem; }
.search-title { font-size: 2rem; font-weight: 700; }
.search-count { color: var(--text-muted); margin: 0.5rem 0 1.5rem; }
.search-form {
    max-width: 500px; margin: 0 auto; display: flex; gap: 0.5rem;
}
.search-form input {
    flex: 1; padding: 0.7rem 1rem; border-radius: 10px;
    border: 1.5px solid rgba(108,92,231,0.2); background: var(--dark-2);
    color: var(--text); font-size: 0.9rem; outline: none;
}
.search-form button {
    padding: 0.7rem 1.5rem; border-radius: 10px; border: none;
    background: var(--gradient-1); color: #fff; font-weight: 600; cursor: pointer;
}

.search-results {
    background: var(--dark-2);
    border-radius: 20px;
    border: 1px solid rgba(108,92,231,0.1);
    padding: 2rem;
}

.result-item {
    display: flex; gap: 1.2rem; padding: 1.5rem 0;
    border-bottom: 1px solid rgba(108,92,231,0.08);
}
.result-thumb { flex-shrink: 0; width: 120px; border-radius: 10px; overflow: hidden; }
.result-thumb img { width: 100%; height: auto; display: block; }
.result-info { flex: 1; }
.result-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.4rem; }
.result-title a { color: var(--text); text-decoration: none; }
.result-title a:hover { color: var(--accent); }
.result-excerpt { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; margin-bottom: 0.5rem; }
.read-more { color: var(--accent); font-size: 0.85rem; text-decoration: none; font-weight: 600; }
.read-more:hover { text-decoration: underline; }

/* --- 404 页面 --- */
.error-404 {
    text-align: center; padding: 4rem 2rem;
    background: var(--dark-2);
    border-radius: 20px;
    border: 1px solid rgba(108,92,231,0.1);
}
.error-code {
    font-size: 7rem; font-weight: 900; line-height: 1;
    background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    opacity: 0.8;
}
.error-title { font-size: 1.8rem; margin-bottom: 0.8rem; color: #fff; }
.error-desc { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; }
.error-actions { display: flex; gap: 1rem; justify-content: center; margin-bottom: 3rem; }
.error-search {
    max-width: 400px; margin: 0 auto; display: flex; gap: 0.5rem;
}
.error-search input {
    flex: 1; padding: 0.7rem 1rem; border-radius: 10px;
    border: 1.5px solid rgba(108,92,231,0.2); background: var(--dark-2);
    color: var(--text); font-size: 0.9rem; outline: none;
}
.error-search button {
    padding: 0.7rem 1.5rem; border-radius: 10px; border: none;
    background: var(--gradient-1); color: #fff; font-weight: 600; cursor: pointer;
}

.no-results {
    text-align: center; padding: 3rem;
    color: var(--text-muted);
    background: var(--dark-2);
    border-radius: 16px;
    border: 1px solid rgba(108,92,231,0.08);
}

/* 分页 */
.pagination { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 2rem; }
.pagination .nav-prev a, .pagination .nav-next a {
    padding: 0.6rem 1.5rem; border-radius: 10px; border: 1.5px solid rgba(108,92,231,0.3);
    color: var(--text); text-decoration: none; font-size: 0.9rem; transition: all 0.3s;
}
.pagination .nav-prev a:hover, .pagination .nav-next a:hover {
    border-color: var(--accent); color: var(--accent);
}

/* --- 评论区域 --- */
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(108,92,231,0.15); }
.comments-area h3 { font-size: 1.3rem; margin-bottom: 1.5rem; }
.comment-list { list-style: none; padding: 0; }
.comment-item { margin-bottom: 1.5rem; padding: 1.5rem; background: var(--dark-2); border-radius: 14px; border: 1px solid rgba(108,92,231,0.08); }
.comment-body { display: flex; gap: 1rem; }
.comment-avatar { border-radius: 50%; }
.comment-author-info { flex: 1; }
.comment-author { font-style: normal; font-weight: 700; font-size: 0.95rem; }
.comment-date { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.comment-reply-link { font-size: 0.8rem; color: var(--accent); text-decoration: none; margin-right: 1rem; }
.edit-link { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; }
.comment-content { margin-top: 0.8rem; font-size: 0.95rem; line-height: 1.7; }
.comment-awaiting-moderation { color: #f0ad4e; font-size: 0.85rem; font-style: italic; margin-top: 0.5rem; }
.comment-form { margin-top: 2rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%; padding: 0.75rem 1rem; margin-bottom: 1rem;
    border: 1.5px solid rgba(108,92,231,0.2); border-radius: 10px;
    background: var(--dark-2); color: var(--text); font-size: 0.9rem; outline: none;
    font-family: inherit;
}
.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--primary); }

/* --- 侧边栏 --- */
.sidebar { margin-top: 3rem; }
.widget { margin-bottom: 2rem; padding: 1.5rem; background: var(--dark-2); border-radius: 14px; border: 1px solid rgba(108,92,231,0.08); }
.widget-title {
    font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem;
    padding-bottom: 0.5rem; border-bottom: 1px solid rgba(108,92,231,0.15); color: #fff;
}
.widget ul { list-style: none; padding: 0; }
.widget li { padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.widget li:last-child { border: none; }
.widget a { color: var(--text-muted); text-decoration: none; font-size: 0.88rem; transition: color 0.3s; }
.widget a:hover { color: var(--accent); }
.widget-search form { display: flex; gap: 0.4rem; }
.widget-search input {
    flex: 1; padding: 0.55rem 0.8rem; border-radius: 8px;
    border: 1.5px solid rgba(108,92,231,0.2); background: rgba(10,10,26,0.6);
    color: var(--text); font-size: 0.85rem; outline: none;
}
.widget-search button {
    padding: 0.55rem 0.8rem; border-radius: 8px; border: none;
    background: var(--gradient-1); color: #fff; font-weight: 600; cursor: pointer; font-size: 0.85rem;
}
.tag-cloud a {
    display: inline-block; padding: 0.2rem 0.6rem; margin: 0.15rem;
    background: rgba(108,92,231,0.12); border-radius: 16px;
    color: var(--text-muted); font-size: 0.78rem; text-decoration: none; transition: all 0.3s;
}
.tag-cloud a:hover { background: rgba(108,92,231,0.3); color: var(--accent); }

/* ===== 博客列表 (home.php) ===== */
.home-header { text-align: center; margin-bottom: 3rem; }
.home-title {
    font-size: 2.2rem; font-weight: 800;
    background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.home-desc { color: var(--text-muted); margin-top: 0.5rem; font-size: 1.05rem; }
.blog-grid-wrapper {
    background: var(--dark-2);
    border-radius: 20px;
    border: 1px solid rgba(108,92,231,0.1);
    padding: 2rem;
}
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.blog-card {
    background: var(--dark-2); border-radius: 16px;
    border: 1px solid rgba(108,92,231,0.08);
    overflow: hidden; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.blog-card:hover {
    transform: translateY(-6px); border-color: rgba(108,92,231,0.25);
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.blog-card-thumb {
    display: block; height: 200px; overflow: hidden;
}
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.blog-card:hover .blog-card-thumb img { transform: scale(1.05); }
.blog-card-nothumb {
    width: 100%; height: 200px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(0,206,201,0.1));
    font-size: 4rem; font-weight: 800;
    background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.blog-card-body { padding: 1.5rem; }
.blog-card-cats { font-size: 0.78rem; margin-bottom: 0.6rem; }
.blog-card-cats a {
    color: var(--accent); text-decoration: none; margin-right: 0.4rem;
}
.blog-card-cats a:hover { text-decoration: underline; }
.blog-card-title {
    font-size: 1.2rem; font-weight: 700; line-height: 1.4; margin-bottom: 0.6rem;
}
.blog-card-title a { color: #fff; text-decoration: none; transition: color 0.3s; }
.blog-card-title a:hover { color: var(--accent); }
.blog-card-excerpt { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; margin-bottom: 0.8rem; }
.blog-card-meta {
    display: flex; gap: 0.8rem; flex-wrap: wrap;
    font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.8rem;
}
.blog-card-link {
    color: var(--accent); font-size: 0.88rem; font-weight: 600;
    text-decoration: none; transition: all 0.3s;
}
.blog-card-link:hover { color: #fff; }

/* 分类页专用 */
.cat-header .archive-count,
.tag-header .archive-count { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.5rem; }
.highlight-accent { color: var(--accent); font-weight: 700; }
.sub-categories {
    margin-top: 1rem; display: flex; gap: 0.5rem; justify-content: center; align-items: center; flex-wrap: wrap;
}
.sub-cat-label { color: var(--text-muted); font-size: 0.85rem; }
.sub-cat-tag {
    padding: 0.2rem 0.7rem; border-radius: 14px;
    background: rgba(108,92,231,0.12); color: var(--text-muted);
    font-size: 0.82rem; text-decoration: none; transition: all 0.3s;
}
.sub-cat-tag:hover { background: rgba(108,92,231,0.25); color: var(--accent); }

/* 作者页 */
.author-header {
    text-align: center; margin-bottom: 3rem; padding: 2.5rem;
    background: var(--dark-2); border-radius: 20px;
    border: 1px solid rgba(108,92,231,0.1);
}
.author-avatar-lg {
    width: 120px; height: 120px; margin: 0 auto 1rem; border-radius: 50%;
    overflow: hidden; border: 3px solid rgba(108,92,231,0.4);
}
.author-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.5rem; }
.author-bio { color: var(--text-muted); max-width: 600px; margin: 0.5rem auto 0; line-height: 1.7; font-size: 0.95rem; }
.author-stats { color: var(--accent); font-size: 0.88rem; margin-top: 0.8rem; }
.author-posts {
    background: var(--dark-2); border-radius: 20px;
    border: 1px solid rgba(108,92,231,0.1); padding: 2rem;
}

/* 附件页 */
.attachment-page { text-align: center; }
.attachment-page > article {
    background: var(--dark-2);
    border-radius: 20px;
    border: 1px solid rgba(108,92,231,0.1);
    padding: 2.5rem;
}
.attachment-header { text-align: center; margin-bottom: 2.5rem; }
.attachment-title { font-size: 2rem; font-weight: 700; color: #fff; }
.attachment-meta { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.88rem; }
.attachment-body { text-align: left; margin-bottom: 2rem; }
.attachment-figure { margin: 0 0 2rem; }
.attachment-figure img {
    max-width: 100%; height: auto; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.attachment-caption {
    text-align: center; color: var(--text-muted); font-style: italic;
    font-size: 0.88rem; margin-top: 0.8rem;
}
.attachment-media { max-width: 100%; border-radius: 12px; }
.attachment-other {
    padding: 3rem; background: var(--dark-2); border-radius: 16px;
    border: 1px solid rgba(108,92,231,0.08); text-align: center;
}
.file-icon { font-size: 4rem; margin-bottom: 1rem; }
.attachment-other p { margin: 0.5rem 0; font-size: 0.95rem; color: var(--text-muted); }
.attachment-other strong { color: var(--text); }
.attachment-details { margin-top: 2rem; padding: 1.5rem; background: var(--dark-2); border-radius: 12px; border: 1px solid rgba(108,92,231,0.08); }
.attachment-details dt { float: left; clear: both; width: 80px; color: var(--text-muted); font-size: 0.85rem; }
.attachment-details dd { overflow: hidden; margin-bottom: 0.5rem; }
.attachment-details input {
    width: 100%; padding: 0.55rem 0.8rem; border-radius: 8px;
    border: 1.5px solid rgba(108,92,231,0.15); background: rgba(10,10,26,0.5);
    color: var(--text-muted); font-size: 0.82rem; outline: none;
}
.attachment-parent { text-align: center; padding-top: 1.5rem; border-top: 1px solid rgba(108,92,231,0.1); }
.attachment-parent span { color: var(--text-muted); font-size: 0.88rem; }
.attachment-parent a { color: var(--accent); text-decoration: none; font-weight: 600; }
.attachment-parent a:hover { text-decoration: underline; }

/* 博客卡片响应式 */
@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-card-thumb { height: 180px; }
}