/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(-45deg, #2c0f47, #3a1c5c, #4a2a7a, #2c0f47);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    color: #f0f0f0;
    line-height: 1.6;
    min-height: 100vh;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: rgba(44, 15, 71, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #d8b4fe;
    text-decoration: none;
    font-family: 'Times New Roman', Times, serif;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 25px;
    position: relative;
}

.nav-menu a {
    color: #f0f0f0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 0;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.1rem;
}

.nav-menu a:hover {
    color: #c084fc;
}

/* 当前页面导航项样式 */
.nav-menu a.current-page {
    color: #c084fc;
    border-bottom: 2px solid #c084fc;
    pointer-events: none;
    cursor: default;
}

/* Hero Section */
.hero {
    padding: 80px 0 50px;
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #d8b4fe;
    font-family: 'Comic Neue', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounce 2s infinite;
}

.chinese-welcome {
    font-family: 'Ma Shan Zheng', 'ZCOOL QingKe HuangYou', cursive;
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: #f0abfc;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.intro-section {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 打字机效果样式 - 在intro-section内部 */
.typewriter-text {
    font-size: 1.1rem;
    color: #f0f0f0;
    font-family: 'Times New Roman', Times, serif;
    min-height: 1.5em; /* 确保有足够的高度 */
    display: inline-block;
}

.typewriter-text.active {
    border-right: 2px solid #d8b4fe;
    padding-right: 3px;
    animation: blink-caret 0.75s step-end infinite;
}

.typewriter-text.finished {
    border-right: none;
    animation: none;
    padding-right: 0;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #d8b4fe; }
}

.intro-section p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-family: 'Times New Roman', Times, serif;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #d8b4fe;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #c084fc;
    transform: translateY(-3px);
}

/* Content Sections */
.content-section {
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    scroll-margin-top: 80px; /* 为锚点跳转添加偏移，避免被导航栏遮挡 */
}

.section-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: #d8b4fe;
    font-size: 1.5rem;
    position: relative;
}

/* 添加可点击的章节标题链接 */
.section-title a {
    color: #d8b4fe;
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
    padding-right: 25px;
}

.section-title a:hover {
    color: #c084fc;
}

.section-title a::after {
    content: "🔗";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.section-title a:hover::after {
    opacity: 1;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.content-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.content-card h3 {
    margin-bottom: 15px;
    color: #d8b4fe;
}

.content-card ul {
    list-style-type: none;
}

.content-card li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.content-card li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #c084fc;
}

.content-card a {
    color: #f0f0f0;
    text-decoration: none;
    transition: color 0.3s;
}

.content-card a:hover {
    color: #c084fc;
    text-decoration: underline;
}

/* Contact Section */
.contact-section {
    background: rgba(44, 15, 71, 0.8);
    padding: 50px 0;
    margin-top: 50px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-title {
    text-align: center;
    margin-bottom: 30px;
    color: #d8b4fe;
    font-size: 1.8rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: #d8b4fe;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #f0f0f0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c084fc;
    background: rgba(255, 255, 255, 0.15);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    background: linear-gradient(135deg, #7e22ce, #c084fc);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.contact-note {
    text-align: center;
    margin-top: 20px;
    color: #d8b4fe;
    font-style: italic;
}

/* Footer */
footer {
    background: rgba(44, 15, 71, 0.9);
    color: #d8b4fe;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-icons {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.footer-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #d8b4fe;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #c084fc;
    transform: translateY(-3px);
}

.copyright {
    margin-top: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 15px 0;
    }
    
    .nav-menu {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu li {
        margin: 5px 10px;
    }
    
    .hero {
        padding: 60px 0 30px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .chinese-welcome {
        font-size: 1.8rem;
    }
    
    .typewriter-text {
        font-size: 1rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title a::after {
        display: none; /* 在小屏幕上隐藏链接图标 */
    }
}

/* Background decorations */
.decoration {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(126, 34, 206, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.decoration-1 {
    top: 10%;
    left: 5%;
}

.decoration-2 {
    bottom: 10%;
    right: 5%;
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -10px) rotate(5deg); }
    50% { transform: translate(-5px, 5px) rotate(-5deg); }
    75% { transform: translate(-10px, 10px) rotate(5deg); }
}
