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

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    background: #fff;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* 导航栏 */
.navbar {
    position: fixed;   /* 博客页用固定，主页可调 */
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links li a {
    color: #fff;
    font-size: 1rem;
    padding: 8px 12px;
    transition: background 0.3s;
}

.nav-links li a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    border-radius: 6px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px;
    color: #fff;
    text-align: center;
}

.dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 幻灯片 */
.slider {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.slides {
    display: flex;
    transition: transform 0.8s ease-in-out;
    width: 100%;
}

.slide {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    flex: 0 0 100%;
}

.slide img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: 100%;
    transform: translate(-50%, -50%);
    display: block;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 5;
}

.slider-controls button {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-controls button:hover {
    background: rgba(0,0,0,0.8);
}

/* 新闻板块 */
.news {
    padding: 60px 20px;
    background: #f9f9f9;
    text-align: center;
}

.news h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: left;
}

.news-link {
    margin-top: 15px;
    align-self: flex-end;
    color: #007BFF;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.news-link:hover {
    color: #0056b3;
}

.news-item h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: #333;
}

.news-item p {
    color: #666;
    font-size: 0.95rem;
}

/* 页脚 */
footer {
    background: #222;
    color: #ccc;
    text-align: center;
    padding: 20px 0;
}

/* 玩法一览 */
.game-modes {
    padding: 60px 20px;
    background: #fff;
}

.game-modes h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.modes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.mode-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    height: 250px;
}

.mode-item img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
}

.mode-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    transition: background 0.3s;
}

.mode-info p {
    margin: 0;
    line-height: 1.3;
}

.mode-info p:first-child {
    font-weight: bold;
    font-size: 1.1rem;
}

.mode-info p:last-child {
    font-size: 0.9rem;
    opacity: 0.9;
}

.mode-info a {
    position: absolute;
    bottom: 12px;
    right: 12px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.mode-info a:hover {
    color: #0056b3;
}

.mode-item:hover .mode-info {
    background: rgba(0, 0, 0, 0.75);
}

/* 移动端适配 */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

@media (max-width: 900px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -70%;
        height: 100%;
        width: 70%;
        background: rgba(0,0,0,0.95);
        flex-direction: column;
        gap: 0;
        padding-top: 60px;
        transition: right 0.3s;
        z-index: 20;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links li a {
        display: block;
        padding: 15px 20px;
        color: #fff;
    }

    .nav-links.show {
        right: 0;
    }

    .dropdown-menu {
        position: relative;
        top: 0;
        left: 0;
        display: none;
        background: rgba(0,0,0,0.85);
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }
}

/* 新闻板块 */
.server_info {
    padding-top: 30px;
    align-items: center;
    background: #f9f9f9;
    text-align: center;
}

.server_info h2 {
    font-size: 2rem;
    padding-bottom: 30px;
}

.server_info img {
    padding-bottom: 30px;
    max-width: 80%;
    height: auto;
}

.competition {
    padding: 60px 20px;
    background: #fff;
}

.competition h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}