/* 基础样式 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: #0a0a0a;
    font-family: 'Noto Serif SC', serif;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* 通用链接样式 - 白色字体 */
a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: rgba(255, 255, 255, 1);
}

/* 首页专用样式 */
.homepage {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 动态粒子背景 */
#canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    touch-action: none;
}

/* 主文案区 */
.content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 30px;
    pointer-events: none;
    margin-bottom: 50px;
}

.main-text {
    font-size: 1.6rem;
    line-height: 1.8;
    letter-spacing: 0.3rem;
    font-weight: 200;
    opacity: 0;
    animation: fadeInOut 5s infinite;
}

/* 计时器区 */
.footer-home {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
}

.footer-line {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: fit-content;
    margin: 0 auto;
}

#timer {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 1px;
    font-size: 1.1rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* 磨砂质感按钮区 */
.nav-links-home {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    margin-right: 6px;
}

/* 交互漂浮文字 */
.click-text {
    position: absolute;
    z-index: 3;
    font-size: 0.9rem;
    pointer-events: none;
    animation: floatUp 3s ease-out forwards;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

/* 动画定义 */
@keyframes fadeInOut {
    0%, 15% { opacity: 0; filter: blur(8px); transform: translateY(10px); }
    40%, 60% { opacity: 1; filter: blur(0); transform: translateY(0); }
    85%, 100% { opacity: 0; filter: blur(8px); transform: translateY(-10px); }
}

@keyframes floatUp {
    0% { transform: translate(-50%, 0); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translate(-50%, -100px); opacity: 0; }
}

/* 容器 */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.site-title {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 0.1rem;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: rgba(255, 255, 255, 0.95);
}

/* 主要内容区 */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 120px);
}

/* 卡片样式 - 模仿微博 */
.post-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.post-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.post-title {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.05rem;
    margin: 0 0 10px 0;
    color: rgba(255, 255, 255, 0.95);
}

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

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

.post-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-summary {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.read-more {
    display: inline-block;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: rgba(255, 255, 255, 1);
}

/* 分页 - 美化样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pagination a {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.pagination a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.pagination a:active {
    transform: translateY(0);
}

.pagination .current {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.12));
    color: rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.15);
}

/* 特殊样式：上一页/下一页按钮 */
.pagination a[href*="prev"],
.pagination a[href*="next"] {
    padding: 0 16px;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* 响应式分页 */
@media (max-width: 480px) {
    .pagination {
        gap: 6px;
        margin-top: 30px;
    }
    
    .pagination a, .pagination span {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 0.8rem;
    }
    
    .pagination a[href*="prev"],
    .pagination a[href*="next"] {
        padding: 0 12px;
        font-size: 0.75rem;
    }
}

/* 文章页面 */
.article-header {
    text-align: center;
    margin-bottom: 30px;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.1rem;
    margin: 0 0 15px 0;
    color: rgba(255, 255, 255, 0.95);
}

.article-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.article-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.article-content p {
    margin-bottom: 1.2rem;
}

.article-content h1, .article-content h2, .article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 0.05rem;
}

.article-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
}

.article-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* 图片样式修复 - 防止溢出 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 图片容器 - 确保响应式 */
.article-content .figure {
    margin: 1.5rem 0;
    text-align: center;
}

.article-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.article-content figcaption {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* 图片放大功能样式 */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: fadeIn 0.3s ease-out;
}

.image-overlay.active {
    display: flex;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    animation: scaleIn 0.3s ease-out forwards;
    cursor: zoom-out;
}

.image-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* 图片点击提示 */
.article-content img {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.article-content img:hover {
    transform: scale(1.02);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    to { transform: scale(1); }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .image-overlay img {
        max-width: 95%;
        max-height: 95%;
    }
    
    .image-close-btn {
        top: 20px;
        right: 20px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* 返回按钮 */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
}

/* 手机端细节微调 */
@media (max-width: 480px) {
    .main-text { font-size: 1.4rem; }
    #timer { font-size: 0.95rem; }
    .nav-btn { padding: 10px 16px; font-size: 0.8rem; }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .post-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .nav-container {
        padding: 12px 0;
    }
    
    .site-title {
        font-size: 1.2rem;
    }
}