:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* 导航栏样式 */
nav {
    position: relative;
    z-index: 10;
    margin-top: 1rem;
}

/* 添加标题居中样式 */
header {
    text-align: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-family: 'Ma Shan Zheng', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
}

nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap; /* 禁用换行 */
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    max-width: 100%; /* 调整最大宽度以适应页面 */
    margin: 1rem auto;
    padding: 0.3rem 1rem; /* 增加左右内边距 */
    overflow-x: auto; /* 添加水平滚动 */
}

nav li {
    margin: 0.2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem; /* 稍微放大字体 */
    padding: 0.6rem 1.2rem; /* 调整内边距 */
    border-radius: 50px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    white-space: nowrap; /* 防止文本换行 */
}

nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

nav a.active {
    background: var(--secondary-color);
    color: white;
    font-weight: bold;
}

nav a i {
    font-size: 1.2rem;
}

/* 欢迎区域美化 */
.welcome-section {
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    text-align: center;
}

.welcome-card {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #3498db, #e74c3c);
}

.welcome-divider {
    width: 100px;
    height: 3px;
    background: #3498db;
    margin: 1.5rem auto;
}

.welcome-text {
    font-size: 1.2rem;
    color: #495057;
    margin: 1rem 0;
    line-height: 1.8;
}

.welcome-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.welcome-icons i {
    font-size: 2.5rem;
    color: #e74c3c;
    transition: transform 0.3s;
}

.welcome-icons i:hover {
    transform: translateY(-5px);
}

/* 页脚美化 */
footer {
    background: linear-gradient(135deg, #2c3e50, #1a2530);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.3rem;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: #3498db;
    transform: translateY(-3px);
}

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 1rem 1rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-family: 'Ma Shan Zheng', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero {
    padding: 4rem 1rem;
    background-color: #fff;
    text-align: center;
}

.quote {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--light-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

blockquote {
    font-size: 1.8rem;
    font-style: italic;
    color: var(--dark-color);
    position: relative;
}

blockquote::before,
blockquote::after {
    content: '"';
    font-size: 3rem;
    color: var(--accent-color);
    position: absolute;
}

blockquote::before {
    top: -1rem;
    left: -2rem;
}

blockquote::after {
    bottom: -2rem;
    right: -2rem;
}

.memories {
    padding: 4rem 1rem;
    background: linear-gradient(to bottom, #ffffff, #f0f7ff);
}

.memories h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2.5rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.photo {
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.photo:hover {
    transform: scale(1.03);
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

.message-board {
    padding: 4rem 1rem;
    background-color: #fff;
}

.message-board h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2.5rem;
}

.messages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.message {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--accent-color);
}

.message h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

#message-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#message-form input,
#message-form textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

#message-form textarea {
    height: 150px;
    resize: vertical;
}

#message-form button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

#message-form button:hover {
    background: #c0392b;
}

.card-maker {
    padding: 4rem 1rem;
    background: linear-gradient(to bottom, #f0f7ff, #e6f7ff);
}

.card-maker h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2.5rem;
}

.card-preview {
    max-width: 500px;
    height: 300px;
    margin: 0 auto 2rem;
    perspective: 1000px;
}

.card-front {
    width: 100%;
    height: 100%;
    background: #f8d7da;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s, background 0.3s;
}

#card-title {
    font-size: 2.5rem;
    color: #721c24;
    margin-bottom: 1rem;
    text-align: center;
}

#card-content {
    font-size: 1.3rem;
    color: #721c24;
    text-align: center;
    max-width: 80%;
}

.card-controls {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-controls label {
    font-weight: bold;
    color: var(--primary-color);
}

.card-controls textarea,
.card-controls select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

#download-card {
    background: var(--secondary-color);
    color: white;
}

/* 视频区域样式 */
.video-section {
    padding: 4rem 1rem;
    background-color: #f0f2f5;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.video-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    padding-top: 177.77%; /* 9:16 比例 (16 / 9 * 100) */
}

.video-card iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav li {
        margin: 0.5rem 0;
    }

    nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .welcome-card {
        padding: 2rem 1rem;
    }

    .welcome-text {
        font-size: 1rem;
    }

    .welcome-icons i {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    footer p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    nav a {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .welcome-card {
        padding: 1.5rem 0.8rem;
    }

    .welcome-text {
        font-size: 0.9rem;
    }

    .welcome-icons {
        gap: 1rem;
    }

    .welcome-icons i {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    footer p {
        font-size: 0.9rem;
    }
}
