/* 现代全屏设计 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: #0a0a0a;
    color: #ffffff;
    line-height: 1.7;
    overflow-x: hidden;
}

/* 全屏导航 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem;
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
}

.site-logo {
    position: absolute;
    left: 2rem;
    top: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    transition: all 0.3s ease;
}

.site-logo:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .site-logo {
        left: 1rem;
        font-size: 1.2rem;
    }
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 内容容器 */
#content-container {
    min-height: calc(100vh - 10.5rem); /* 精确减去footer高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    position: relative;
}

.home-page #content-container {
    padding-bottom: 6rem; /* 为备案信息留出空间 */
}

/* 页面内容区域 */
.page-section {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* 导航活动状态 */
.nav-links a.active {
    color: #818cf8;
}

.nav-links a.active::after {
    width: 100%;
}

/* 页面过渡动画 */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease-out;
}

/* 错误消息样式 */
.error-message {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
}

.hero {
    max-width: 1200px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: #d1d5db;
    max-width: 600px;
    margin-bottom: 3rem;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 3rem;
    background: rgba(10, 10, 10, 0.8);
}

footer p {
    margin: 0.5rem 0;
}

.beian {
    font-size: 0.8rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center
}

.beian a {
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.2s ease;
}

.beian img {
    width: 16px;
}

.beian a:hover {
    color: #818cf8;
    text-decoration: underline;
}

/* 项目页面样式 */
.projects-section {
    padding: 8rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.project-card p {
    color: #d1d5db;
}

/* 博客页面样式 */
.blog-section {
    padding: 8rem 0;
}

/* 分类标签样式 */
.category-tags {
    display: flex;
    gap: 0.8rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.tag {
    background: rgba(30, 41, 59, 0.5);
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    color: #d1d5db;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.tag.active, .tag:hover {
    background: #7c3aed;
    color: white;
}

/* 博客卡片布局 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.blog-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    padding: 1.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: rgba(124, 58, 237, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
}

.category-badge {
    background: #7c3aed;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.date {
    color: #9ca3af;
}

.card-title {
    margin: 0.5rem 0 1.2rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.card-title a {
    color: white;
    text-decoration: none;
}

.card-title a:hover {
    color: #a5b4fc;
}

.card-excerpt {
    color: #d1d5db;
    margin-bottom: 1.8rem;
    line-height: 1.6;
}

.read-more {
    color: #818cf8;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
}

.read-more:hover {
    color: #a5b4fc;
    gap: 0.5rem;
}

.read-more::after {
    content: '→';
    transition: all 0.2s ease;
}

.read-more:hover::after {
    transform: translateX(3px);
}

/* 搜索框样式 */
.search-box {
    display: flex;
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.8rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px 0 0 8px;
    color: white;
}

.search-btn {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: #6d2edd;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    gap: 1rem;
}

.page-btn {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: #7c3aed;
    border-color: #7c3aed;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: #9ca3af;
    font-size: 0.9rem;
    margin: 0 1rem;
}

/* 联系页面样式 */
.contact-section {
    padding: 8rem 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: white;
}

.submit-btn {
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.submit-btn:hover {
    opacity: 0.9;
}

.social-links h3 {
    margin-bottom: 1.5rem;
}

.social-links ul {
    list-style: none;
}

.social-links li {
    margin-bottom: 1rem;
}

.social-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #818cf8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }
    
    .site-logo {
        left: 1rem;
        top: 1.5rem;
        font-size: 1.2rem;
    }
    
    .nav-links {
        justify-content: space-around;
        gap: 0;
        width: 100%;
        padding: 0.5rem 0;
    }
    
    .nav-links a {
        font-size: 1rem;
        padding: 0.8rem 0.5rem;
        margin: 0 0.2rem;
    }
    
    main {
        padding: 0 5%;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-wrap: wrap;
    }
    
    .nav-links a {
        font-size: 0.9rem;
        padding: 0.6rem 0.3rem;
        margin: 0.2rem;
        flex: 1 0 calc(50% - 0.4rem);
        text-align: center;
    }
    
    .site-logo {
        position: static;
        margin-bottom: 0.5rem;
        text-align: center;
        width: 100%;
    }
}