/* 全站共用样式：基础排版、导航栏、页脚。
   各页面独有样式仍保留在各自 <style> 中，视觉风格不变。 */

/* 引入本地字体文件 */
@font-face {
  font-family: '方正宋刻本秀楷';
  src: url('../media/songkeben.ttf') format('truetype');
  font-display: swap;
}

body {
    font-family: 'Lora', 'Noto Serif SC', serif;
    margin: 0;
    padding: 20px;
    line-height: 1.8;
    background-color: #fdfaf3;
    color: #4a3b31;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
    justify-content: flex-start;
}

/* --- 导航栏 (全站统一) --- */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 0;
    text-align: center;
    z-index: 10;
}
.nav-link {
    text-decoration: none;
    color: #5c4a3e;
    font-family: 'Lora', 'Noto Serif SC', serif;
    font-weight: 600;
    font-size: 1.1em;
    margin: 0 15px;
    padding-bottom: 5px;
    transition: all 0.3s ease;
    position: relative;
}
.nav-link:hover, .nav-link.active { color: #8a6d3b; }
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: 0; left: 50%; background-color: #8a6d3b; transition: all 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; left: 0; }

/* --- 页脚 (全站统一) --- */
.footer {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    color: #888888;
    width: 100%;
}

/* --- 移动端导航栏 (全站统一) --- */
@media (max-width: 768px) {
    body { padding: 0; }
    .navbar {
        position: relative;
        padding: 20px 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        background-color: #fdfaf3;
    }
    .nav-link { margin: 5px 10px; font-size: 1em; }
}
