/* CSS Reset 和基础样式 */
* {
    box-sizing: border-box;
}


html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    user-select: none;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #fff;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 页面背景 */
body.home {
    background-image: url('images/bg.png');
}

body.contact {
    background-image: url('images/lxbg.png');
}

body.join {
    background-image: url('images/jrbg.png');
}

/* 通用元素样式 */
a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* 页面容器 */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* 页面标题 */
.page-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(24px, 4vw, 36px);
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    z-index: 15;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 40px;
}

/* 顶部导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    padding: 8px 20px;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    transform: translateY(0);
}

header:hover {
    background: rgba(255, 255, 255, 0.2);
}

header.hidden {
    transform: translateY(-100%);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
}

nav ul {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

nav ul li:first-child {
    margin-right: auto;
}

nav ul li a {
    color: #fff;
    font-size: 15px;
    padding: 6px 12px;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

nav ul li img {
    height: 32px;
    vertical-align: middle;
    border-radius: 6px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

nav ul li:first-child a:hover img {
    transform: scale(1.05);
}

/* 主要内容区域 */
main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* 首页横幅区域 */
.banner-container {
    position: relative;
    width: 100%;
    margin: 60px 0 60px 0;
    text-align: center;
}

.banner {
    width: 100%;
    height: clamp(450px, 65vh, 850px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 60px 20px;
}

.banner .page-title {
    position: static;
    transform: none;
    margin-bottom: 60px;
    margin-top: -40px;
}

.banner .buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 650px;
    margin-top: 20px;
}

/* 首页主体内容 */
.home-main {
    padding: 20px;
}

/* 子页面主体内容 */
.page-main {
    padding: 160px 20px 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.page-main h1 {
    font-size: clamp(32px, 6vw, 48px);
    margin: 0 0 30px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-main p {
    font-size: clamp(16px, 2.5vw, 20px);
    margin: 15px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.8;
}

.page-main .buttons {
    margin: 50px 0 30px 0;
}

/* 特性展示区域 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
    padding: 0 20px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.feature-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.feature-item h3 {
    background: rgba(0, 120, 212, 0.9);
    color: #fff;
    margin: 0;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
}

.feature-item p {
    padding: 20px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

/* 新闻区域 */
.news {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    margin: 40px 20px;
    backdrop-filter: blur(10px);
    color: #333;
}

.news h2 {
    color: rgba(0, 120, 212, 0.9);
    border-bottom: 3px solid #ddd;
    padding-bottom: 15px;
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 28px;
    font-weight: bold;
}

.news-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    margin-bottom: 15px;
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.news-item h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
    font-weight: bold;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #777;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.news-content {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #555;
}

.news-author {
    text-align: right;
    font-style: italic;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* 按钮样式 */
.buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin: 40px 0;
    padding: 0 20px;
}

.buttons a,
.close-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 18px 35px;
    border-radius: 30px;
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    min-width: 160px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.buttons a:hover,
.close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.buttons a:active,
.close-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 首页按钮特殊样式 */
.banner .buttons a {
    padding: 20px 40px;
    font-size: 18px;
    min-width: 180px;
}

/* 底部样式 */
footer {
    background: linear-gradient(135deg, #333, #444);
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

footer p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.6;
}

footer img {
    margin-top: 15px;
    width: 100px;
    height: auto;
    border-radius: 5px;
}

.footer-content a {
    color: #ffffff;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: #ccc;
}

/* 子页面底部样式 */
footer.page-footer {
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .buttons {
        flex-direction: column;
        gap: 20px;
        margin-top: 40px;
    }
    
    .buttons a {
        padding: 16px 30px;
        font-size: 16px;
        min-width: 200px;
        max-width: 280px;
    }
    
    /* 子页面内容优化 */
    .page-main {
        padding: 120px 15px 60px 15px;
        margin-top: 0;
    }
    
    .page-main h1 {
        font-size: 28px;
        margin-bottom: 25px;
        text-align: center;
        line-height: 1.3;
    }
    
    .page-main p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 15px;
        text-align: center;
        padding: 0 10px;
    }
    
    .server-info, .contact-info {
        margin: 25px 0 !important;
        padding: 15px !important;
        border-radius: 10px !important;
    }
    
    .server-info h2, .contact-info h2 {
        font-size: 18px !important;
        margin-bottom: 12px !important;
        text-align: center;
    }
    
    .server-info div, .contact-info div {
        font-size: 14px !important;
        line-height: 1.5;
        margin-bottom: 8px;
    }
    
    .contact-info p {
        font-size: 13px !important;
        margin-top: 12px !important;
        text-align: center;
    }
    
    nav ul li a {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .banner {
        height: 60vh;
        min-height: 400px;
        padding: 40px 15px;
    }
    
    .banner .page-title {
        margin-bottom: 40px;
        margin-top: -20px;
    }
    
    .banner .buttons {
        gap: 20px;
        margin-top: 30px;
    }
    
    .banner .buttons a {
        padding: 16px 30px;
        font-size: 16px;
        min-width: 160px;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }
    
    .news {
        margin: 20px 10px;
        padding: 20px;
    }
    
    .page-main {
        padding: 100px 15px 60px 15px;
        min-height: calc(100vh - 160px);
    }
    
    .page-main .buttons {
        margin: 40px 0 20px 0;
        gap: 18px;
    }
    
    .buttons {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 0 15px;
    }
    
    .buttons a {
        width: 100%;
        max-width: 280px;
        padding: 16px 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 15px;
    }
    
    main {
        padding: 10px;
    }
    
    nav ul {
        gap: 3px;
    }
    
    nav ul li a {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .banner {
        height: 55vh;
        min-height: 350px;
        padding: 30px 10px;
    }
    
    .banner .page-title {
        margin-bottom: 35px;
        margin-top: -15px;
        font-size: 22px;
    }
    
    .banner .buttons {
        gap: 15px;
        margin-top: 25px;
    }
    
    .banner .buttons a {
        padding: 14px 25px;
        font-size: 15px;
        min-width: 140px;
    }
    
    .page-main {
        padding: 110px 10px 50px 10px;
        min-height: calc(100vh - 140px);
    }
    
    .page-main h1 {
        margin-bottom: 25px;
    }
    
    .page-main .buttons {
        margin: 35px 0 15px 0;
        gap: 15px;
    }
    
    .buttons {
        gap: 15px;
        padding: 0 10px;
    }
    
    .buttons a {
        max-width: 260px;
        padding: 14px 20px;
        font-size: 15px;
        min-width: 140px;
    }
    
    .feature-item h3 {
        padding: 12px;
        font-size: 16px;
    }
    
    .feature-item p {
        padding: 15px;
        font-size: 13px;
    }
    
    .news {
        margin: 15px 5px;
        padding: 15px;
    }
    
    .news h2 {
        font-size: 24px;
    }
    
    .news-item h3 {
        font-size: 18px;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    header,
    footer,
    .buttons {
        display: none !important;
    }
    
    .page-title {
        position: static;
        transform: none;
        color: black;
        text-shadow: none;
    }
}