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

/* 暗色主题 */
body {
    transition: all 0.5s ease;
    background-color: #1a1a1a; /* 深灰背景 */
    color: #e0e0e0; /* 浅灰文字 */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* 浅色主题 */
body.light-theme {
    background-color: aliceblue;
    color: #333333;
}

/* 头部样式 */
header {
    background: #2c3e50; /* 更深的蓝色 */
    color: #ecf0f1;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header h1 {
    margin-bottom: 10px;
    color: #3498db; /* 亮蓝色标题 */
}

nav ul {
    list-style: none;
    padding: 10px 0;
}

nav ul li {
    display: inline;
    margin: 0 20px;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover {
    color: #e74c3c; /* 红色悬停 */
    background-color: rgba(255, 255, 255, 0.1);
}

/* 主内容区样式 */
main {
    padding: 30px;
    max-width: 1100px;
    margin: 30px auto;
    background: #2d2d2d; /* 深灰色背景 */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid #404040;
}

/* 浅色主题下的main */
body.light-theme main {
    background: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

main h2 {
    color: #3498db; /* 亮蓝色 */
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

h2:not(:first-of-type) {
    margin-top: 20px;
}

main p {
    color: #bdc3c7; /* 浅灰色文字 */
    font-size: 16px;
    line-height: 1.8;
}

/* 浅色主题下的文字 */
body.light-theme main p {
    color: #666666;
}

/* 页脚样式 */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 3px solid #3498db;
}

/* 浅色主题下的页脚 */
body.light-theme footer {
    background: #34495e;
    color: #ecf0f1;
}

/* 链接样式 */
a {
    color: #3498db;
    transition: color 0.3s ease;
}

a:hover {
    color: #e74c3c;
}

/* 浅色主题链接 */
body.light-theme a {
    color: #2980b9;
}

body.light-theme a:hover {
    color: #c0392b;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,0.3);
    margin-bottom: 20px;
}