:root {
    --primary-color: #333333;
    --text-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 添加自定义字体 */
@font-face {
    font-family: 'SourceHanSansSC';
    src: url('../fonts/SourceHanSansSC-Light-2.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: block;
}

/* 添加字体预加载 */
html {
    opacity: 0;
    transition: opacity 0.3s ease;
}

html.fonts-loaded {
    opacity: 1;
}

/* 添加字体加载时的默认样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    opacity: 0;
    animation: simpleFadeIn 0.3s ease-out forwards;
}

/* 简化淡入动画 */
@keyframes simpleFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 字体加载完成后应用自定义字体 */
.fonts-loaded body,
.fonts-loaded .nav-links a,
.fonts-loaded h1,
.fonts-loaded h2,
.fonts-loaded h3,
.fonts-loaded h4,
.fonts-loaded h5,
.fonts-loaded h6,
.fonts-loaded p,
.fonts-loaded button,
.fonts-loaded input,
.fonts-loaded textarea {
    font-family: 'SourceHanSansSC', sans-serif;
    font-weight: 300;
}

/* 导航栏样式优化 */
.header {
    position: absolute;
    width: 100%;
    top: 2rem;
    background-color: transparent;
    z-index: 1000;
    padding: 0 2rem;
}

.nav {
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    margin: 0;
    border-radius: 50px;
    opacity: 1;
    animation: none;
    transition: background-color 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.square-logo {
    height: 40px;
    width: 40px;
}

.text-logo {
    height: 30px;
    /* 根据实际文字logo比例调整 */
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

/* 添加新的悬停效果 */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 80%;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Contact 按钮样式 */
.nav-links .contact-btn {
    border: 1px solid var(--text-color);
    background: transparent;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    border-radius: 25px;
}

/* 移除下划线动画 */
.nav-links .contact-btn::after {
    display: none;
}

/* 移除所有可能影响 contact 按钮的激活状态样式 */
.nav-links .contact-btn:hover,
.nav-links .contact-btn.active,
.nav-links a.contact-btn.active {
    background: transparent;
    color: var(--text-color);
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--text-color);
}

/* 移除其他页面链接的激活样式对 contact 按钮的影响 */
.nav-links a.active:not(.contact-btn) {
    background-color: rgba(0, 0, 0, 0.03);
}

/* 点击效果 */
.nav-links .contact-btn:active {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(1px);
}

/* 主要内���区域样式 */
.hero {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    margin-top: 0;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    animation: none;
}

.hero-content {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    opacity: 1;
    animation: none;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .hero p {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 1200px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
    }
}

/* 添加内容页面的通用样式 */
.content {
    position: relative;
    z-index: 1;
    padding-top: 100px;
    min-height: 100vh;
    opacity: 1;
    animation: none;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 音频控制器样式 */
.audio-controller {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.audio-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.audio-toggle.playing {
    animation: rotate 8s linear infinite;
}

.audio-toggle.loading {
    animation: none;
}

.audio-toggle.error {
    background: rgba(255, 0, 0, 0.1);
    animation: shake 0.5s ease-in-out;
}

.loading-indicator {
    display: none;
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    border: 2px solid transparent;
    border-top-color: #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 音乐播放器样式 */
.music-player {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    opacity: 1;
    animation: none;
}

.music-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.music-toggle.playing {
    border-color: #666;
}

.music-toggle.playing .music-icon {
    animation: rotate 3s linear infinite;
    color: #333;
}

/* 添加通用背景样式 */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    opacity: 1;
    animation: none;
}

/* 调整玻璃遮罩效果 */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    z-index: -1;
    opacity: 1;
    animation: none;
}

/* 添加页面过渡动画样式 */
body {
    opacity: 0;
    animation: simpleFadeIn 0.3s ease-out forwards;
}

/* 优化内容区域的过渡 */
.content {
    position: relative;
    padding-top: 100px;
    min-height: 100vh;
    z-index: 1;
    opacity: 1;
    animation: none;
}

/* 优化背景和遮罩的过渡 */
.page-background,
.page-overlay {
    opacity: 1;
    animation: none;
}

/* 优化导航栏的过渡 */
.nav {
    opacity: 1;
    animation: none;
}

/* 优化音乐播放器的过渡 */
.music-player {
    opacity: 1;
    animation: none;
}

/* 主页特殊处理 */
.hero {
    opacity: 1;
    animation: none;
}

.hero-content {
    opacity: 1;
    animation: none;
}

/* 文本展示 */
.content-box {
    background-color: #F7F0E6;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 4rem;
}

/* 自定义滚动条样式 */
.content-box::-webkit-scrollbar {
    width: 8px;
}

.content-box::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.content-box::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.content-box::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 文本内容样式 */
.content-box h1 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
    padding-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.content-box h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.2);
}

.content-box p {
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* 添加教义页面的特殊样式 */
.content-box .section {
    margin-bottom: 2rem;
}

.content-box .subsection {
    margin: 1.5rem 0;
}

.content-box h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.content-box h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #444;
}

.content-box ul {
    list-style: none;
    padding-left: 1.5rem;
}

.content-box li {
    margin-bottom: 0.8rem;
    line-height: 1.8;
    position: relative;
}

.content-box li::before {
    content: '•';
    position: absolute;
    left: -1.2rem;
    color: #666;
}

.content-box strong {
    color: #333;
    font-weight: 500;
}

/* 更新教职人员页面的样式 */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.staff-member {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.staff-member:hover {
    transform: translateY(-5px);
}

.avatar-placeholder {
    width: 180px;
    height: 180px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.staff-member:hover .avatar-placeholder {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.staff-member h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-top: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .staff-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .staff-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1.5rem;
        padding: 2rem 1rem;
    }

    .avatar-placeholder {
        width: 140px;
        height: 140px;
    }

    .staff-member h3 {
        font-size: 1.2rem;
    }
}

/* 协会信息页面特殊样式 */
.intro {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #444;
}

.content-box ol {
    list-style-position: inside;
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.content-box ol li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.content-box .section {
    margin-bottom: 3rem;
}

.content-box .section:last-child {
    margin-bottom: 0;
}

.content-box h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.content-box h3 {
    color: #444;
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

/* 移动端导航栏样式 */
@media (max-width: 768px) {
    .nav {
        border-radius: 15px;
        padding: 0.8rem;
    }

    .logo {
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .nav-links {
        display: none; /* 默认隐藏菜单 */
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-links.active {
        display: flex; /* 菜单展开时显示 */
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.8rem;
        text-align: center;
        border-radius: 4px;
    }

    /* 汉堡菜单按钮 */
    .menu-toggle {
        display: block;
        position: absolute;
        right: 1rem;
        top: 1rem;
        width: 30px;
        height: 30px;
        cursor: pointer;
        z-index: 1001;
    }

    /* Contact 按钮特殊处理 */
    .nav-links .contact-btn {
        margin: 0.5rem auto;
        width: 90%;
        max-width: 200px;
    }
}

/* 内容区域响应式调整 */
@media (max-width: 768px) {
    .content-box {
        margin: 1rem;
        padding: 1.5rem;
        max-height: none; /* 移动端不限制高度 */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    /* 调整页面内容的边距 */
    .container {
        padding: 0 1rem;
    }

    /* 调整音乐播放器位置 */
    .music-player {
        bottom: 1rem;
        right: 1rem;
    }

    .music-toggle {
        width: 35px;
        height: 35px;
    }
}

/* 平板设备适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav {
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 汉堡菜单样式 */
.menu-toggle {
    display: none; /* 默认隐藏 */
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 汉堡菜单动画效果 */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
} 