/* ============================================
   Aeolusx — 全局样式 v3
   修复:
   1. 首页壁纸21-vmake.png可见（降低叠加层透明度）
   2. 标题紫色渐变可用（!important 覆盖主题样式）
   3. 猫咪底图可见（降低暗色覆盖层）
   4. 滚屏过渡渐变可见（降低内容区透明度）
   5. 文章卡片半透明磨砂（降低卡片背景透明度）
   ============================================ */

/* ==========================================
   0. 重置 WordPress 默认背景
   ========================================== */
body.custom-background {
    background-image: none !important;
    background-color: #0a0a0b !important;
}

/* ==========================================
   1. 全屏背景层系统
   ========================================== */

/* 底层：猫咪图（全局底图，所有页面可见） */
.aeolusx-bg-fixed {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    background-image: url('/tupian/cat-slider.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    will-change: transform;
}
/* 大幅降低暗色覆盖，让猫咪背景清晰可见 */
.aeolusx-bg-fixed::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    z-index: 0;
}

/* 顶层：21-vmake.png 人物图（首页 hero 专属） */
.aeolusx-hero-figure {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    background-image: url('/tupian/21-vmake.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 1;
    transition: opacity 0.6s ease-out;
    will-change: opacity;
}
/* 轻盈渐变：保留图片可见度，仅底部稍暗过渡到内容区 */
.aeolusx-hero-figure::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.4) 80%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 0;
}
.aeolusx-hero-figure.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ==========================================
   1a. 移除旧版 header/hero 背景（避免非首页污染）
   ========================================== */
.site-header,
.hero-section,
#masthead,
[class*="hero"],
[class*="welcome"] {
    background-image: none !important;
}

/* 仅首页 hero 区域保留透明背景 */
.home .site-header,
.home #masthead {
    background: transparent !important;
}

/* ==========================================
   2. 内容层结构
   ========================================== */
.aeolusx-content-layer {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    pointer-events: none;
}
.aeolusx-content-layer .site-main {
    pointer-events: auto;
}

/* ==========================================
   3. Hero 文字区域 + 紫色渐变标题
   ========================================== */
.aeolusx-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 80px 20px;
    position: relative;
    z-index: 2;
}

/* 主标题：淡紫 → 深紫渐变 — !important 全覆盖主题样式 */
.aeolusx-hero-title {
    font-size: clamp(2.8rem, 7vw, 5rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.1 !important;
    margin-bottom: 16px !important;
    color: transparent !important;
    background: linear-gradient(135deg, #E8D3FF 0%, #A066FF 50%, #4B0082 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    display: inline-block !important;
}

/* 副标题 */
.aeolusx-hero-sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #f5f5f5;
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.6;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* CTA 按钮 */
.aeolusx-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff !important;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 3;
}
.aeolusx-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.5);
    color: #fff !important;
}
.aeolusx-hero-cta::after {
    content: '\2193';
    font-size: 1.1rem;
    transition: transform 0.3s;
}
.aeolusx-hero-cta:hover::after {
    transform: translateY(3px);
}

/* ==========================================
   4. 文章内容区（半透明磨砂玻璃）
   ========================================== */
.aeolusx-scroll-trigger {
    height: 1px;
}

.aeolusx-content-body {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 80px;
    /* 半透明暗色背景 + 磨砂玻璃 — 大幅降低透明度让背景可见 */
    background: rgba(12, 12, 18, 0.4) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px 16px 0 0;
    min-height: 80vh;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

/* 顶部渐变遮罩：从暗色平滑过渡到透明，让滚屏过渡可见 */
.aeolusx-content-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(
        to bottom,
        rgba(8, 8, 12, 0.85) 0%,
        rgba(8, 8, 12, 0.5) 40%,
        rgba(8, 8, 12, 0.15) 70%,
        rgba(8, 8, 12, 0) 100%
    );
    pointer-events: none;
    z-index: 5;
    border-radius: 16px 16px 0 0;
}

.aeolusx-content-body .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #fafafa;
    position: relative;
    padding-bottom: 12px;
    z-index: 6;
}
.aeolusx-content-body .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #E8D3FF, #A066FF);
    border-radius: 2px;
}
.aeolusx-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ==========================================
   5. 文章卡片网格（半透明 + 磨砂）
   ========================================== */
.aeolusx-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin: 32px 0;
    position: relative;
    z-index: 6;
}

/* 卡片半透明 — 降低背景透明度让cat-slider.jpg透过 */
.aeolusx-post-card {
    background: rgba(18, 18, 24, 0.4) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}
.aeolusx-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(160, 102, 255, 0.45);
    background: rgba(26, 26, 34, 0.55) !important;
}
.aeolusx-post-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

/* 缩略图 */
.aeolusx-post-thumb {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(160, 102, 255, 0.08), rgba(75, 0, 130, 0.04));
    min-height: 160px;
}
.aeolusx-post-thumb img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0 !important;
    font-size: 0;
    transition: transform 0.5s ease;
}
.aeolusx-post-card:hover .aeolusx-post-thumb img {
    transform: scale(1.05);
}

/* 无缩略图卡片 */
.aeolusx-post-card:not(:has(.aeolusx-post-thumb)) .aeolusx-post-card-body {
    padding-top: 32px;
}

/* 卡片文字 */
.aeolusx-post-card-body {
    padding: 20px;
}
.aeolusx-post-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
    color: #fafafa;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.aeolusx-post-meta {
    margin-bottom: 10px;
}
.aeolusx-post-date {
    font-size: 0.8rem;
    color: #a1a1aa;
}
.aeolusx-post-excerpt {
    font-size: 0.9rem;
    color: #d4d4d8;
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.aeolusx-post-readmore {
    font-size: 0.85rem;
    color: #A066FF;
    font-weight: 600;
    transition: color 0.2s;
}
.aeolusx-post-card:hover .aeolusx-post-readmore {
    color: #C9A0FF;
}

/* ==========================================
   6. 分页
   ========================================== */
.aeolusx-pagination {
    text-align: center;
    margin: 40px 0 20px;
}
.aeolusx-pagination a,
.aeolusx-pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: #d4d4d8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.aeolusx-pagination a:hover {
    background: rgba(160, 102, 255, 0.2);
    color: #fafafa;
}
.aeolusx-pagination .current {
    background: rgba(160, 102, 255, 0.3);
    color: #fafafa;
    font-weight: 700;
}

/* ==========================================
   7. 导航栏（毛玻璃）
   ========================================== */
.site-header {
    z-index: 100 !important;
    position: relative;
}
.main-navigation-container {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.main-navigation-container.fixed-header {
    background-color: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@media (min-width: 40em) {
    .site-menu a {
        color: #d4d4d8;
        font-weight: 500;
        transition: color 0.2s;
    }
    .site-menu a:hover {
        color: #fafafa;
    }
    .fixed-header .site-menu a {
        color: #a1a1aa;
    }
    .fixed-header .site-menu a:hover {
        color: #fafafa;
    }
    .main-navigation .search-item .search-icon {
        fill: #d4d4d8;
    }
    .main-navigation .search-item .search-icon:hover {
        fill: #fafafa;
    }
}

/* ==========================================
   8. 修复 #blank 无效颜色（主题 bug）
   ========================================== */
.no-header-image .site-title a,
.no-header-image .site-description,
.fixed-header .site-title a,
.fixed-header p.site-description,
.site-title a,
.site-description {
    color: #fafafa;
}
.site-branding {
    display: flex;
    align-items: center;
    padding-top: 0.4em;
}
.site-branding .site-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ==========================================
   9. 全局文字颜色修正 — !important 确保覆盖主题
   ========================================== */
body.dark-mode {
    color: #d4d4d8 !important;
}
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #fafafa !important;
}
h1, h2, h3, h4, h5, h6,
.entry-title a,
.entry-title a:hover,
.entry-title a:focus {
    color: #fafafa !important;
}
a {
    color: #A066FF;
}
a:hover, a:active, a:focus {
    color: #C9A0FF;
}
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    background: #6366f1;
    border-color: #6366f1;
}

/* ==========================================
   10. 页脚
   ========================================== */
.site-footer {
    background: rgba(6, 6, 10, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #71717a;
}
.site-footer a {
    color: #a1a1aa;
}
.site-footer a:hover {
    color: #fafafa !important;
    opacity: 1;
}
.site-footer .site-info {
    padding: 2em 15px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.8;
}
.footer-sep {
    margin: 0 8px;
    color: #3f3f46;
}

/* ==========================================
   11. 返回顶部按钮
   ========================================== */
#back-to-top {
    display: none;
    padding: 0;
    min-height: auto;
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 44px;
    height: 44px;
    line-height: 44px;
    border-radius: 50%;
    font-size: 1.55em;
    z-index: 99;
    background: #A066FF;
    border: none;
    box-shadow: 0 4px 16px rgba(160, 102, 255, 0.3);
    transition: all 0.3s ease;
}
#back-to-top:hover {
    background: #4B0082;
    box-shadow: 0 6px 24px rgba(160, 102, 255, 0.5);
    transform: translateY(-2px);
}

/* ==========================================
   12. 搜索弹窗 & 暗色模式切换
   ========================================== */
@media (min-width: 40em) {
    #search-open {
        background-color: rgba(10, 10, 15, 0.97);
        backdrop-filter: blur(20px);
    }
    .header-search-form .search-field {
        color: #fafafa;
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }
}
.dark-mode-widget {
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.dark-mode-widget:hover {
    opacity: 1;
}

/* ==========================================
   13. Preloader 加速
   ========================================== */
.preloader {
    animation: preloader-hide 1.5s 0.3s ease-out forwards;
}

/* ==========================================
   14. 暗色模式下内容区透明覆盖（确保背景不被覆盖）
   ========================================== */
body.dark-mode .aeolusx-content-body {
    background: rgba(12, 12, 18, 0.4) !important;
}
body.dark-mode .aeolusx-post-card {
    background: rgba(18, 18, 24, 0.4) !important;
}
body.dark-mode .aeolusx-post-card:hover {
    background: rgba(26, 26, 34, 0.55) !important;
}

/* ==========================================
   15. 响应式适配
   ========================================== */
@media (max-width: 768px) {
    .aeolusx-hero-content {
        min-height: 85vh;
        padding: 60px 16px;
    }
    .aeolusx-hero-title {
        font-size: 2.2rem !important;
    }
    .aeolusx-content-body {
        padding: 32px 16px 60px;
        border-radius: 12px 12px 0 0;
    }
    .aeolusx-content-body::before {
        height: 100px;
    }
    .aeolusx-post-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .aeolusx-hero-figure {
        background-attachment: scroll;
    }
    .aeolusx-bg-fixed {
        background-attachment: scroll;
    }
}

@media (max-width: 480px) {
    .aeolusx-hero-title {
        font-size: 1.9rem !important;
    }
    .aeolusx-content-body .section-title {
        font-size: 1.25rem;
    }
    .aeolusx-hero-cta {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

@media (max-width: 40em) {
    .slide-menu {
        background-color: rgba(10, 10, 16, 0.98);
        backdrop-filter: blur(20px);
    }
    .main-navigation-container {
        background: rgba(0, 0, 0, 0.5);
    }
}

/* ==========================================
   16. 非首页：彻底移除 21-vmake.png 残留
   ========================================== */
body:not(.home) .aeolusx-hero-figure {
    display: none !important;
    background-image: none !important;
}
body:not(.home) .aeolusx-bg-fixed {
    background-image: url('/tupian/cat-slider.jpg');
}
