:root {
    --primary-color: #8B4513;  /* 深棕色 */
    --text-color: #333;
    --background-color: #F5E8C7;  /* 米黄色 */
    --secondary-color: #DEB887;  /* 浅棕色 */
    --accent-color: #B22222;  /* 深红色 */
}

body {
    font-family: 'Noto Serif SC', serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    background-image: url('path/to/rice-paper-texture.png');  /* 添加宣纸纹理背景 */
}

header {
    background-color: var(--secondary-color);
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: 'Ma Shan Zheng', cursive;  /* 使用中国风字体 */
    font-size: 2rem;
    color: var(--accent-color);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-color);
}

main {
    padding-top: 100px;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.1);
    margin-bottom: 2rem;
    padding: 2rem;
}

h1, h2, h3 {
    font-family: 'Ma Shan Zheng', cursive;
    color: var(--primary-color);
}

.btn {
    background-color: var(--accent-color);
    border: none;
    color: var(--background-color);
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.carousel {
    margin-bottom: 2rem;
}

footer {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.social-links a {
    color: var(--primary-color);
    margin: 0 0.5rem;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    
    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

/* 在文件末尾添加以下样式 */

#ai-chat {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    background-image: url('path/to/chinese-landscape.jpg');
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.ai-chat-card {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.2);
}

.ai-chat-body {
    height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    background-image: url('path/to/rice-paper-texture.png');
    background-repeat: repeat;
}

.message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    max-width: 80%;
    line-height: 1.6;
}

.message.user {
    background-color: var(--secondary-color);
    align-self: flex-end;
    margin-left: auto;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.message.ai {
    background-color: var(--background-color);
    border-left: 3px solid var(--accent-color);
    padding-left: 1.5rem;
    font-style: italic;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.1);
}

.message.ai .signature {
    display: block;
    text-align: right;
    font-style: normal;
    color: var(--accent-color);
    margin-top: 0.5rem;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.1em;
}

.ai-chat-input {
    display: flex;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid var(--primary-color);
}

.ai-chat-input input {
    flex-grow: 1;
    padding: 0.8rem;
    border: 1px solid var(--primary-color);
    border-radius: 5px 0 0 5px;
    font-family: 'Noto Serif SC', serif;
    font-size: 1em;
}

.ai-chat-input button {
    padding: 0.8rem 1.2rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ai-chat-input button:hover {
    background-color: var(--primary-color);
}

.ai-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.8);
}

.ai-chat-suggestions button {
    margin: 0.5rem;
    padding: 0.8rem 1.2rem;
    background-color: var(--background-color);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1em;
}

.ai-chat-suggestions button:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    transform: translateY(-2px);
}

/* 添加滚动条样式 */
.ai-chat-body::-webkit-scrollbar {
    width: 8px;
}

.ai-chat-body::-webkit-scrollbar-track {
    background: var(--background-color);
}

.ai-chat-body::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}

.ai-chat-body::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color);
}

@keyframes thinking {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.message.ai.loading {
    animation: thinking 1.5s infinite;
}