/* css/base.css */

/* --- 根变量定义 --- */
:root {
    --bg-color: #f8f5f2;
    --card-bg-color: #ffffff;
    --heading-color: #1a1a1a;
    --text-color: #4a4a4a;
    --accent-color: #c0392b;
    --accent-hover-color: #a93226;
    --white: #ffffff;
    --font-sans: 'Microsoft YaHei', 'SimSun', sans-serif;
    --font-serif: 'Georgia', 'serif';
    --border-radius: 6px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    --transition: all 0.3s ease-in-out;
}

/* --- 全局样式 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

main {
    width: 100%;
    overflow-x: hidden;
}

/* --- 头部与导航栏 --- */
header {
    background-color: var(--card-bg-color);
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* --- 页脚 --- */
footer {
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    padding: 30px 5%;
    font-size: 14px;
    margin-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
} 