/*
Theme Name: Video Glass Portfolio Pro
Theme URI: https://your-theme-uri.com
Author: Your Name
Author URI: https://your-website.com
Description: 全屏视频/图片背景主题，支持毛玻璃效果、社交平台、网格卡片布局
Version: 2.2.0
License: GPL v2 or later
Text Domain: video-glass-portfolio
*/

/* ===== 重置样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: #0b0e14;
    color: #ffffff;
}

/* ===== 主容器 ===== */
.site-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* ===== 背景容器 ===== */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#bg-video, #bg-image {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
}

#bg-video.loaded, #bg-image.loaded {
    opacity: 1;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 25, 0.35);
    backdrop-filter: blur(3px);
    z-index: 1;
}

.background-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(circle at 30% 40%, #1a1f2a, #05070a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== 头部导航 ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 2rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
    transition: background 0.3s ease, backdrop-filter 0.3s ease, padding 0.3s ease;
    pointer-events: none;
}

.site-header.scrolled {
    background: rgba(10, 15, 25, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 2rem;
}

.site-header * {
    pointer-events: auto;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.custom-logo-link {
    display: block;
    line-height: 0;
}

.custom-logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: height 0.3s ease;
}

.site-header.scrolled .custom-logo {
    height: 40px;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: font-size 0.3s ease;
}

.site-header.scrolled .site-title {
    font-size: 1.5rem;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-description {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.main-navigation {
    flex-grow: 1;
    text-align: right;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.primary-menu {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    justify-content: flex-end;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
}

.primary-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.primary-menu a:hover::after,
.primary-menu .current-menu-item a::after {
    width: 100%;
}

.primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(20,30,45,0.85);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 101;
}

.primary-menu li:hover > .sub-menu {
    display: block;
}

.primary-menu .sub-menu a {
    padding: 0.8rem 1.5rem;
    display: block;
    white-space: nowrap;
}

.primary-menu .sub-menu a::after {
    display: none;
}

/* ===== 主内容区域 ===== */
.site-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
}

.home .content-area {
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 毛玻璃卡片 */
.glass-card {
    width: min(90%, 680px);
    padding: 3rem 2.5rem;
    border-radius: 3rem;
    background: rgba(20, 30, 45, 0.28);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.45);
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.4s;
    color: white;
    text-align: center;
}

.glass-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 32px 55px -10px rgba(0, 0, 0, 0.6);
}

.glass-card h1 {
    font-size: clamp(2.8rem, 10vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0e9ff 45%, #d4e0ff 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glass-card .subtitle {
    font-size: clamp(1.1rem, 4vw, 1.6rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
}

.divider {
    width: 80px;
    height: 2px;
    margin: 1.5rem auto;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
}

/* ===== 首页卡片散开交互样式 ===== */

/* 首页内容区 */
.home-content {
    position: relative;
    z-index: 10;
}

/* 首页卡片 */
.home-card {
    position: relative;
    width: min(90%, 680px);
    min-height: 400px;
    border-radius: 3rem;
    background: rgba(20, 30, 45, 0.28);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.45);
    overflow: visible;
    cursor: pointer;
    transition: all 0.5s ease;
    margin: 0 auto;
}

/* 展开时卡片背景淡化缩小 */
.home-card.expanded {
    background: rgba(20, 30, 45, 0.1);
    backdrop-filter: blur(6px) saturate(100%);
    -webkit-backdrop-filter: blur(6px) saturate(100%);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
}

.home-card.expanded:hover {
    transform: scale(0.9);
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.2);
}

.home-card:not(.expanded):hover {
    transform: translateY(-6px);
    box-shadow: 0 32px 55px -10px rgba(0, 0, 0, 0.6);
}

/* 正面内容 */
.card-front {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    box-sizing: border-box;
    z-index: 2;
    transition: opacity 0.35s ease, transform 0.4s ease;
}

.card-front.fading-out {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.card-content-inner {
    text-align: center;
    transition: opacity 0.3s ease;
    width: 100%;
}

/* 点击提示 */
.click-hint {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: all 0.3s ease;
    animation: hintPulse 2.5s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    50% {
        opacity: 0.75;
        transform: translateY(-5px);
    }
}

.home-card:not(.expanded):hover .click-hint {
    opacity: 0.9;
    animation: none;
}

.hint-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

.hint-icon {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.3s ease;
}

.home-card:not(.expanded):hover .hint-icon {
    transform: translate(3px, -3px);
}

/* 散开状态容器 */
.card-expanded {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* 关闭按钮 - 居中突出显示 */
.close-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(30, 40, 60, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.35s ease,
                background 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
}

/* 关闭按钮显示 */
.close-btn.visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
    box-shadow: 0 0 40px 8px rgba(255, 255, 255, 0.2),
                0 8px 35px rgba(0, 0, 0, 0.5);
}

/* 关闭按钮脉冲光环 */
.close-btn.visible::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    animation: btnRingPulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes btnRingPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 0 50px 10px rgba(255, 255, 255, 0.25),
                0 10px 40px rgba(0, 0, 0, 0.5);
}

.close-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
    transition: transform 0.1s ease;
}

.close-icon {
    line-height: 1;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

/* 散开容器 - 覆盖整个屏幕 */
.scattered-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 150;
}

/* 散开项基础样式 */
.scattered-item {
    position: fixed;
    text-decoration: none;
    white-space: nowrap;
    pointer-events: auto;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    transition: opacity 0.4s ease, 
                transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                z-index 0.25s ease,
                background 0.25s ease,
                border-color 0.25s ease;
    will-change: transform, opacity;
}

/* 散开项可见 */
.scattered-item.visible {
    opacity: 1;
}

/* 分类样式 */
.scattered-item.category-item {
    padding: 0.5rem 1.3rem;
    background: rgba(20, 30, 45, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 标签样式 */
.scattered-item.tag-item {
    padding: 0.35rem 1rem;
    background: rgba(20, 30, 45, 0.38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* ===== 关键修复：悬停时在当前位置放大 ===== */
.scattered-item:hover {
    z-index: 250 !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55) !important;
    /* 不改变 translate，只改变 scale */
}

.scattered-item.category-item:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #ffffff !important;
}

.scattered-item.tag-item:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

/* 收缩返回动画 */
.scattered-item.retracting {
    transition: opacity 0.3s ease, 
                transform 0.4s cubic-bezier(0.6, 0, 1, 1),
                z-index 0.3s ease !important;
    z-index: 140 !important;
    pointer-events: none !important;
}

/* ===== 网格卡片布局 ===== */
.archive-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 0;
}

.archive-header {
    margin-bottom: 3rem;
    text-align: center;
}

.archive-title {
    font-size: 3rem;
    color: white;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
    margin-bottom: 1rem;
}

.archive-description {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.post-card {
    background: rgba(20, 30, 45, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.post-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.no-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 3rem;
    height: 100%;
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.post-title a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: rgba(255,255,255,0.8);
}

.post-excerpt {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
}

.pagination {
    margin-top: 3rem;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.3rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.pagination .current {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.3);
}

/* ===== 底部社交区域 ===== */
.site-footer-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    padding: 1.5rem 2rem;
    pointer-events: none;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

.social-links {
    display: flex;
    gap: 0.8rem;
    pointer-events: auto;
}

.social-link {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 30, 45, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    z-index: 0;
}

.social-link:hover::before {
    width: 100%;
    height: 100%;
}

.social-link:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-link i,
.social-link .custom-icon {
    position: relative;
    z-index: 1;
}

.social-link .custom-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.social-link:hover .custom-icon {
    transform: scale(1.1);
}

.copyright-info {
    text-align: right;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 社交信息弹窗 */
.social-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.popup-content {
    position: relative;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(30, 40, 60, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.popup-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s;
}

.popup-close:hover {
    color: white;
}

.popup-body {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    word-wrap: break-word;
}

.popup-body a {
    color: #64b5f6;
    text-decoration: none;
}

.popup-body a:hover {
    text-decoration: underline;
}

/* ===== 单篇文章页面样式 ===== */
.single-area {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px 0 0px;
    width: 100%;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

.single-container {
    width: 90%;
  
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.single-card {
    width: 100%;
    padding: 2.5rem;
    text-align: left;
    overflow-y: auto;
    max-height: calc(80vh - 100px);
    margin: 0 auto;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    padding-right: calc(2.5rem - 8px);
}

.single-card > * {
    max-width: 100%;
}

.single-card::-webkit-scrollbar {
    width: 4px;
    background: transparent;
}

.single-card::-webkit-scrollbar-track {
    background: transparent;
    margin: 20px 0;
}

.single-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}

.single-card::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.single-card .post-thumbnail-full {
    display: none;
}

.single-card .entry-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0e9ff 45%, #d4e0ff 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.entry-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.entry-meta i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.entry-meta a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.entry-meta a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.single-card .entry-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 1.05rem;
}

.single-card .entry-content h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
    color: #ffffff;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
    padding-left: 1.5rem;
}

.single-card .entry-content h3 {
    font-size: 1.6rem;
    margin: 1.8rem 0 1rem;
    color: #ffffff;
}

.single-card .entry-content h4 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.8rem;
    color: #ffffff;
}

.single-card .entry-content p {
    margin-bottom: 1.2rem;
}

.single-card .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.single-card .entry-content a {
    color: #64b5f6;
    text-decoration: none;
    border-bottom: 1px dashed rgba(100, 181, 246, 0.5);
    transition: all 0.3s;
}

.single-card .entry-content a:hover {
    color: #90caf9;
    border-bottom-color: #90caf9;
}

.single-card .entry-content blockquote {
    margin: 1.5rem 0;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.single-card .entry-content ul,
.single-card .entry-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.single-card .entry-content li {
    margin-bottom: 0.5rem;
}

.single-card .entry-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.single-card .entry-content pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.single-card .entry-content pre code {
    background: none;
    padding: 0;
}

.entry-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.author-bio {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.author-avatar img {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.author-name a {
    color: #ffffff;
    text-decoration: none;
}

.author-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.95rem;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    flex: 1;
    max-width: 48%;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.prev-post {
    text-align: left;
}

.next-post {
    text-align: right;
    justify-content: flex-end;
}

.nav-icon {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    transition: transform 0.3s;
}

.nav-link:hover .nav-icon {
    transform: translateX(-3px);
}

.next-post:hover .nav-icon {
    transform: translateX(3px);
}

.nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.nav-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    line-height: 1.4;
}

.edit-link {
    margin-bottom: 1rem;
}

.edit-link a {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(100, 181, 246, 0.2);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 20px;
    color: #64b5f6;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.edit-link a:hover {
    background: rgba(100, 181, 246, 0.3);
    border-color: rgba(100, 181, 246, 0.5);
}

.page-links {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-links a {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    margin: 0 0.2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.page-links > span {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    margin: 0 0.2rem;
    background: rgba(100, 181, 246, 0.3);
    border-radius: 4px;
    color: #ffffff;
    border: 1px solid rgba(100, 181, 246, 0.5);
}

/* 评论区样式 */
.comments-area {
    width: 100%;
    padding: 2rem;
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    padding-right: calc(2rem - 8px);
}

.comments-area::-webkit-scrollbar {
    width: 4px;
    background: transparent;
}

.comments-area::-webkit-scrollbar-track {
    background: transparent;
    margin: 20px 0;
}

.comments-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}

.comments-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.comments-area .comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comments-area .comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-area .comment:last-child {
    border-bottom: none;
}

.comments-area .comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.comments-area .comment-author img {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.comments-area .comment-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.comments-area .comment-content {
    margin-left: 3.5rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.comments-area .comment-reply-link {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.comments-area .comment-reply-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.comments-area .comment-respond {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.comments-area .comment-reply-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.comments-area .comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comments-area .comment-form-comment,
.comments-area .comment-form-author,
.comments-area .comment-form-email,
.comments-area .comment-form-url {
    margin-bottom: 0.5rem;
}

.comments-area .comment-form label {
    display: block;
    margin-bottom: 0.25rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.comments-area .comment-form input,
.comments-area .comment-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    box-sizing: border-box;
}

.comments-area .comment-form input::placeholder,
.comments-area .comment-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.comments-area .comment-form input:focus,
.comments-area .comment-form textarea:focus {
    outline: none;
    border-color: rgba(100, 181, 246, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.comments-area .form-submit {
    margin-top: 1rem;
}

.comments-area .submit {
    background: rgba(100, 181, 246, 0.3);
    border: 1px solid rgba(100, 181, 246, 0.5);
    border-radius: 30px;
    padding: 0.8rem 2rem;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.comments-area .submit:hover {
    background: rgba(100, 181, 246, 0.5);
    transform: translateY(-2px);
}

.comments-area .comment-notes {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.comments-area .logged-in-as {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.comments-area .logged-in-as a {
    color: #64b5f6;
    text-decoration: none;
}

.comments-area .logged-in-as a:hover {
    text-decoration: underline;
}

/* ===== 响应式调整 ===== */
@media (max-width: 1024px) {
    .single-container {
        width: 90%;
    }
    
    .single-card {
        padding: 2rem;
        padding-right: calc(2rem - 8px);
    }
    
    .home-card {
        width: 90%;
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 1rem;
    }
    
    .site-header.scrolled {
        padding: 0.8rem 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 1rem;
        background: rgba(20,30,45,0.95);
        backdrop-filter: blur(20px);
        border-radius: 16px;
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        min-width: 200px;
    }
    
    .primary-menu.active {
        display: flex;
    }
    
    .primary-menu .sub-menu {
        position: static;
        background: rgba(255,255,255,0.05);
        margin-left: 1rem;
        box-shadow: none;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .copyright-info {
        text-align: center;
    }
    
    .content-area {
        padding: 5rem 1rem 6rem;
    }
    
    .single-area {
        padding: 80px 0 100px;
    }
    
    .single-card {
        padding: 1.5rem;
        padding-right: calc(1.5rem - 8px);
        max-height: calc(85vh - 60px);
    }
    
    .comments-area {
        padding: 1.5rem;
        padding-right: calc(1.5rem - 8px);
    }
    
    .entry-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .nav-link {
        max-width: 100%;
    }
    
    .single-card .entry-content h2 {
        font-size: 1.6rem;
    }
    
    .single-card .entry-content h3 {
        font-size: 1.4rem;
    }
    
    .comments-area .comment-content {
        margin-left: 2.5rem;
    }
    
    /* 首页卡片 */
    .home-card {
        width: 90%;
        min-height: 340px;
        border-radius: 2rem;
    }
    
    .home-card.expanded {
        transform: scale(0.88);
    }
    
    .card-front {
        padding: 1.5rem;
        min-height: 340px;
    }
    
    .close-btn {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .scattered-item.category-item {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
        border-radius: 20px;
    }
    
    .scattered-item.tag-item {
        padding: 0.3rem 0.75rem;
        font-size: 0.7rem;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .single-container {
        width: 94%;
    }
    
    .single-card {
        padding: 1.2rem;
        padding-right: calc(1.2rem - 8px);
    }
    
    .single-card .entry-title {
        font-size: 1.8rem;
    }
    
    .glass-card {
        padding: 2rem 1.5rem;
        border-radius: 2rem;
    }
    
    .comments-area {
        padding: 1.2rem;
        padding-right: calc(1.2rem - 8px);
    }
    
    .comments-area .comment-author {
        flex-wrap: wrap;
    }
    
    .comments-area .comment-content {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    /* 首页卡片 */
    .home-card {
        width: 94%;
        min-height: 300px;
        border-radius: 1.8rem;
    }
    
    .home-card.expanded {
        transform: scale(0.85);
    }
    
    .card-front {
        padding: 1.2rem;
        min-height: 300px;
    }
    
    .close-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .click-hint {
        margin-top: 1rem;
    }
    
    .scattered-item.category-item {
        padding: 0.35rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .scattered-item.tag-item {
        padding: 0.25rem 0.65rem;
        font-size: 0.68rem;
    }
}

/* ===== Firefox 滚动条兼容 ===== */
@-moz-document url-prefix() {
    .single-card,
    .comments-area {
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    }
}