/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: #333;
}

/* 头部样式 */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
}

.header-container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    position: fixed;
    left: 20px;
    z-index: 1001;
}

.logo a {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-image {
    height: 76px;
    width: auto;
    object-fit: contain;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.2;
}

.logo-text-main {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
}

.logo-text-sub {
    font-family: 'Times New Roman', serif;
    font-size: 1.4rem;
    color: #2c3e50;
    white-space: nowrap;
}





.main-nav {
    display: flex;
    justify-content: center;
    flex: 1;
    height: 100%;
    margin-left: 160px;
    margin-right: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: center;
}

.main-nav li {
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.main-nav li:not(.lang-switch) {
    min-width: 120px;
}

.main-nav a {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    text-align: center;
}

.main-nav a:hover {
    color: #3498db;
}

.main-nav a.active {
    color: #3498db;
    background: #f8f9fa;
    border-radius: 6px;
    font-weight: 600;
}

/* 头部右侧容器 */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 0;
    justify-content: flex-end;
    position: absolute;
    right: 80px;
    z-index: 1002;
}

/* 语言切换按钮样式 */
.lang-switch {
    display: flex;
    align-items: center;
    position: absolute;
    right: 30px;
    z-index: 1004;
}





.qr-image {
    height: 70px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.qr-image:hover {
    transform: scale(1.05);
}

.lang-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
    width: 60px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.lang-btn:active {
    transform: translateY(1px);
}

.lang-text {
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.5px;
}



/* 主要内容区域 - 所有页面通用 */
.page-content {
    width: 100%;
    flex: 1;
    margin-top: 80px;
    display: flex;
    flex-direction: column;
}

/* 大屏幕优化 - 减少页面下方空白 */
@media (min-width: 1400px) {
    .page-content {
        min-height: auto;
    }
    
    .main-content,
    .contact-content {
        max-width: 1400px;
        padding: 40px;
    }
    
    .materials-content {
        max-width: 1600px;
        padding: 40px;
    }
}

.disclaimer-block .content-cn {
    margin-bottom: 0;
}

.content-block .content-cn {
    color: #333;
}

.disclaimer-section {
    padding: 20px;
    margin: 0 15px 40px 15px;
    background-color: #fff !important;
}

.main-content,
.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
}

.materials-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
}

/* 团队独创页面样式 - 已移至materials.php内联样式 */

/* 联系我们页面样式 */
.office-hours {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 25px;
    margin-top: 40px;
    margin-bottom: 40px;
    border-left: 4px solid #3498db;
}

.contact-content {
    max-width: 800px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-info {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.info-item {
    margin: 1rem 0;
    display: flex;
    align-items: center;
}

.info-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.contact-form {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.submit-btn {
    background-color: #3498db;
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.submit-btn:hover {
    background-color: #2980b9;
}

/* 页脚样式 */
.site-footer {
    background: linear-gradient(135deg, rgba(0, 119, 190, 0.8) 0%, rgba(0, 77, 122, 0.9) 100%), url('../images/footer.jpg');
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    width: 100%;
    padding: 30px 0 0 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 20px 20px;
}

.footer-section h3 {
    font-size: 1.1em;
    margin-bottom: 12px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-section p {
    opacity: 0.8;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* 友情链接样式 */
.footer-section #footer-friendlinks a {
    color: #fff;
    opacity: 0.8;
    text-decoration: none;
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 5px;
    padding: 2px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-size: inherit; /* 与footer-section p保持一致 */
}

.footer-section #footer-friendlinks a:hover {
    opacity: 1;
    border-bottom-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.footer-bottom {
    background-color: rgba(0, 77, 122, 0.3);
    text-align: center;
    padding: 15px 0;
    margin-top: 10px;
}

.footer-bottom p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9em;
}

/* 汉堡菜单样式 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-header {
        height: auto;
        min-height: 60px;
    }

    .header-container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        position: relative;
    }
    
    .logo {
        flex: 0 1 auto;
        max-width: 60%;
        position: static;
        left: auto;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
        margin-left: auto;
        position: static;
        right: auto;
        z-index: 1002;
    }

    .logo a {
        font-size: 1.1rem;
        gap: 8px;
    }
    
    .logo-text-main {
        font-size: 1.1rem;
    }
    
    .logo-text-sub {
        font-size: 0.75rem;
    }
    
    .logo-text-container {
        gap: 10px;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 4;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background-color: #ffffff; /* 改回完全不透明的白色 */
        box-shadow: 0 2px 10px rgba(0,0,0,0.15); /* 增强阴影 */
        display: none;
        z-index: 1001; /* 提高z-index确保在所有内容之上 */
        margin: 0;
        padding: 0;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        height: auto;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .main-nav li {
        width: 100%;
        height: auto;
        border-bottom: none; /* 完全移除分隔线 */
        margin: 0;
        padding: 0;
        background-color: #ffffff; /* 确保li元素也有白色背景 */
        position: relative; /* 添加相对定位 */
    }
    
    .main-nav li:not(:last-child) {
        border-bottom: 1px solid #f0f0f0; /* 只在非最后一项添加浅色分隔线 */
    }

    .main-nav a {
        padding: 15px 20px;
        display: block;
        width: 100%;
        height: auto;
        color: #333; /* 确保文字颜色足够深 */
        font-weight: 500; /* 增加字体粗细 */
        background-color: #ffffff; /* 确保背景完全不透明 */
        box-sizing: border-box;
        text-align: left;
        border: none;
        position: relative;
        z-index: 2; /* 确保链接在最上层 */
    }
    
    .main-nav a:hover {
        background-color: #f8f9fa;
        color: #3498db;
    }
    
    /* 移动端语言切换按钮样式 */
    .lang-switch {
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        order: 1;
        position: static;
        right: auto;
    }
    
    .lang-btn {
        width: auto;
        min-width: 45px;
        margin: 0;
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    /* 移动端百度二维码样式 */
    .baidu-link {
        display: flex;
        align-items: center;
        order: 2;
    }
    
    .baidu-qr-image {
        height: 20px;
        margin: 0 4px;
    }

    /* 移动端二维码样式 */
    .qr-code {
        display: flex;
        align-items: center;
        order: 3;
    }
    
    .qr-image {
        height: 20px;
        margin: 0 4px;
    }

    .qr-image {
        height: 35px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .qr-image:hover {
        transform: none;
    }

    .page-content {
        padding-top: 85px; /* 进一步减少顶部间距 */
    }

    .materials-content {
        flex-direction: column;
        padding: 20px 15px;
    }

    .materials-content .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 15px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px 15px;
    }
    
    .footer-section #footer-friendlinks a {
        margin-right: 10px;
        margin-bottom: 8px;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h3 {
        margin-bottom: 10px;
    }

    .footer-section p,
    .footer-section ul li {
        margin-bottom: 6px;
    }

    .novel-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* 小说卡片移动端优化 */
    .novel-item {
        padding: 15px;
    }

    .novel-item h3 {
        font-size: 1.1rem;
    }

    .novel-item p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* 按钮移动端优化 */
    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    /* 表单移动端优化 */
    input, textarea, select {
        font-size: 16px; /* 防止iOS缩放 */
    }

    /* 文字大小调整 */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
}