/* 定义字体变量 */
:root {
    --font-sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    --font-serif: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "宋体", SimSun, serif;
    --primary-color: #4A4A4A;
    --accent-color: #8B4513;
    --bg-color: #F7F3EE;
    --paper-color: #FFFBF6;
    --ink-color: #2C1810;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局样式 */
body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--primary-color);
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Ccircle cx='50' cy='50' r='2' stroke='rgba(139, 69, 19, 0.1)' /%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100 0C44.8 0 0 44.8 0 100s44.8 100 100 100 100-44.8 100-100S155.2 0 100 0zm0 180c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z' fill='rgba(139, 69, 19, 0.03)' /%3E%3C/svg%3E");
    background-position: center;
    z-index: -1;
    opacity: 0.6;
}

/* 布局容器 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem 1.5rem;
    border: none;
    background-color: var(--paper-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    width: 100%;
    position: relative;
    overflow: hidden;
}

header::before, header::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20,50 Q50,20 80,50 T140,50' stroke='rgba(139, 69, 19, 0.15)' fill='none' /%3E%3C/svg%3E");
    opacity: 0.3;
}

header::before {
    top: 10px;
    left: 10px;
    transform: rotate(-45deg);
}

header::after {
    bottom: 10px;
    right: 10px;
    transform: rotate(135deg);
}

.site-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--ink-color);
    margin-bottom: 1rem;
    letter-spacing: 0.12em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.08);
    position: relative;
    display: inline-block;
    font-weight: normal;
}

.site-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.6;
}

.site-subtitle {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--primary-color);
    opacity: 0.75;
    margin-top: 0.8rem;
    font-weight: normal;
    letter-spacing: 0.08em;
}

/* 导航样式 */
.navigation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    width: 100%;
    margin: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: var(--paper-color);
    border: 1px solid rgba(139, 69, 19, 0.1);
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0C9 0 0 9 0 20s9 20 20 20 20-9 20-20S31 0 20 0zm0 36c-8.8 0-16-7.2-16-16S11.2 4 20 4s16 7.2 16 16-7.2 16-16 16z' fill='rgba(139, 69, 19, 0.03)' /%3E%3C/svg%3E");
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(139, 69, 19, 0.1);
    border-color: var(--accent-color);
}

.nav-item:hover::before {
    opacity: 1;
}

.icon {
    margin-right: 1.2rem;
    font-size: 1.3rem;
}

/* 页脚样式 */
footer {
    margin-top: auto;
    text-align: center;
    padding: 1.5rem;
    color: var(--primary-color);
    opacity: 0.8;
    font-size: 0.9rem;
    position: relative;
    font-family: var(--font-sans);
}

footer::before {
    content: '❖';
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    opacity: 0.5;
}

footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
    line-height: 1.6;
}

footer a {
    color: #999;
    text-decoration: none;
    font-size: 0.8rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
    border-bottom: none;
}

/* 404页面样式 */
.error-page .container {
    padding: 1rem;
    justify-content: flex-start;
}

.error-page header {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.error-page .site-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.error-page .site-subtitle {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.error-container {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--paper-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin: 0 0 1.5rem 0;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.error-code {
    font-family: var(--font-serif);
    font-size: 5rem;
    color: var(--ink-color);
    opacity: 0.15;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    line-height: 1;
}

.error-message {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--ink-color);
    margin-bottom: 1.5rem;
}

.error-description {
    font-size: 1rem;
    color: var(--primary-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.back-home {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--paper-color);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.back-home:hover {
    background-color: var(--accent-color);
    color: var(--paper-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(139, 69, 19, 0.1);
}

.error-page footer {
    padding: 1rem;
    margin-top: 0;
}

/* 响应式样式 */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .navigation {
        grid-template-columns: 1fr;
    }
    
    .site-title {
        font-size: 2.2rem;
    }
    
    .site-subtitle {
        font-size: 1rem;
    }
    
    footer {
        padding: 1rem;
    }

    footer p, 
    footer a {
        font-size: 0.75rem;
    }

    /* 404页面响应式 */
    .error-page .container {
        padding: 0.5rem;
    }

    .error-page header {
        padding: 1rem;
    }

    .error-code {
        font-size: 4rem;
    }

    .error-message {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .error-description {
        font-size: 0.95rem;
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }

    .error-page footer {
        padding: 0.75rem;
    }
} 