body {
    font-family: Verdana, sans-serif;
    background-color: #CCCCCC;
}

a {
    color: #000;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: #37a83c;
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: right;
}

a:hover {
    color: #37a83c;
    transform: scale(1.05);
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

button {
    background-color: #3a7bd5;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2859a8;
}

h1 {
    font-family: Georgia, serif;
    color: #37a83c;
    text-align: center;
    transition: color 0.5s;
}

h1:hover {
    color: #1e6b22;
}

h2 {
    border-top: solid 2px #290a0a;
    padding-top: 1em;
    font-family: "Times New Roman", serif;
}

h3 {
    border-top: solid 2px #290a0a;
    padding-top: 1em;
    font-family: "Times New Roman", serif;
    transition: color 0.5s;
}

h3:hover {
    color: #1e6b22;
}

blockquote {
    background: #F0ECEC;
    margin: 1em;
    font-style: italic;
}

.firstLetter {
    font-size: 200%;
    font-family: Georgia, serif;
    color: #030000;
}

.firstWord {
    text-transform: uppercase;
    margin-top: 0.5em;
}

#firstStory {
    color: #010005;
}

#content {
    width: 75%;
    margin: 10px auto;
    background: white;
    padding: 1em 3em;
}

.link-group {
    text-align: center;
    display: flex;
    list-style: none;
    justify-content: center;
}

.link-group a {
    margin: 0 10px;
    color: #000;
}

.center-title {
    text-align: center;
}

p {
    font-size: 16px;
    font-family: "Times New Roman", serif;
    opacity: 1;
    transform: translateY(20px);
    transition: opacity 0.8s, transform 0.8s;
}

p.visible {
    opacity: 1;
    transform: translateY(0);
}

#content>div,
#content>h3 {
    opacity: 1;
    transform: translateY(30px);
    transition: opacity 0.8s, transform 0.8s;
}

#content>div.visible,
#content>h3.visible {
    opacity: 1;
    transform: translateY(0);
}

.link-group a:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 淡入动画 */
#content>h3,
#content>div,
p {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

/* 设置延迟 */
nav {
    animation-delay: 0.1s;
}

h1 {
    animation-delay: 0.2s;
}

#Cities-Memory-1 {
    animation-delay: 0.35s;
}

h3:nth-of-type(1) {
    animation-delay: 0.5s;
}

p:nth-of-type(1) {
    animation-delay: 0.65s;
}

h3:nth-of-type(2) {
    animation-delay: 0.8s;
}

p:nth-of-type(2) {
    animation-delay: 0.95s;
}

p:nth-of-type(3) {
    animation-delay: 1.1s;
}

h3:nth-of-type(3) {
    animation-delay: 1.25s;
}

p:nth-of-type(4) {
    animation-delay: 1.4s;
}

p:nth-of-type(5) {
    animation-delay: 1.55s;
}

h3:nth-of-type(4) {
    animation-delay: 1.7s;
}

p:nth-of-type(6) {
    animation-delay: 1.85s;
}

p:nth-of-type(7) {
    animation-delay: 2s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 暗模式切换按钮 */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #3a7bd5;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.dark-mode-toggle:hover {
    background-color: #2859a8;
    transform: scale(1.05);
}

/* 暗模式样式 */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode #content {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode h1 {
    color: #4ca54f;
}

body.dark-mode h1:hover {
    color: #6bc46e;
}

body.dark-mode h3 {
    border-top: solid 2px #555;
    color: #e0e0e0;
}

body.dark-mode h3:hover {
    color: #6bc46e;
}

body.dark-mode a {
    color: #87ceeb;
}

body.dark-mode a:hover {
    color: #4ca54f;
}

body.dark-mode a::after {
    background: #4ca54f;
}

body.dark-mode blockquote {
    background: #3d3d3d;
    color: #ccc;
}

body.dark-mode .firstLetter {
    color: #e0e0e0;
}

body.dark-mode #firstStory {
    color: #e0e0e0;
}

body.dark-mode .dark-mode-toggle {
    background-color: #4ca54f;
}

body.dark-mode .dark-mode-toggle:hover {
    background-color: #6bc46e;
}