@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #ffd700; /* 金色，符合传奇风格 */
    --secondary-color: #8b0000; /* 暗红色 */
    --dark-color: #1a1a1a; /* 深黑色 */
    --light-color: #f4e9d3; /* 米黄色 */
    --text-color: #333; /* 深灰色文字，提高对比度 */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px; /* 基础字体大小 */
    /* 确保页脚可见 */
    overflow-x: hidden;
}

/* 导航栏样式 */
nav {
    background-color: var(--dark-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--primary-color); /* 金色边框 */
    background-image: linear-gradient(to right, #1a1a1a, #2a2a2a, #1a1a1a);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo h1 {
    color: #fff;
    font-size: 24px; /* 增大字体大小 */
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
    // gap: 2rem;
    margin-right: 2rem;
}

.nav-links li:not(:last-child) {
    margin-right: 2rem;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transition);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5); /* 文字阴影 */
    font-size: 18px; /* 增大字体大小 */
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--secondary-color);
    color: #fff;
    box-shadow: 0 0 10px var(--primary-color); /* 光影特效 */
}

.nav-right {
    display: flex;
    gap: 1rem;
}

.nav-right a {
    color: #fff;
    font-size: 20px; /* 增大图标大小 */
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.nav-right a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('hero-bg.jpg') center/cover no-repeat;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #fff;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.hero-features p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    color: #fff;
}

.hero-features i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 36px; /* 增大标题字体大小 */
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 20px; /* 增大段落字体大小 */
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    font-size: 18px; /* 增大按钮字体大小 */
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max - width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        margin: 1rem 0;
    }
    
    .nav-links li:not(:last-child) {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .game-card {
        flex: 0 0 calc(50% - 1rem);
        min-width: calc(50% - 1rem);
    }
}

@media (max - width: 480px) {
    .game-card {
        flex: 0 0 100%;
        min-width: 100%;
    }
}

/* 游戏卡片样式 */
.game-carousel {
    position: relative;
    margin-bottom: 2rem;
}

.game-carousel-container {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    gap: 2rem;
    padding: 0 2rem;
}

.game-card {
    flex: 0 0 calc(25% - 1.5rem);
    min-width: calc(25% - 1.5rem);
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
}

.carousel-control {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.active {
    background: var(--primary-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    position: relative;
    padding-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--primary-color);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.game-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 1px solid var(--primary-color);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.game-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    flex-shrink: 0;
}
.game-info {
    padding: 15px;
    background-color: #fff;
    flex-grow: 1;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 设置图片填充方式 */
    transition: var(--transition);
}

/* 假设这里是热门区服的图片展示区域，依次设置 1~4.jpeg */

.game-card:hover .game-image img {
    transform: scale(1.05);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    padding: 5px 10px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    border-radius: 0 0 10px 0;
}
    left: 0;
    right: 0;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.game-tag {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--secondary-color);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.game-rating {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.game-info {
    padding: 1.5rem;
}

.game-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.game-info p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.game-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.game-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-play {
    width: 100%;
    text-align: center;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid var(--primary-color);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.btn-play::before {
    content: '⚔️';
    position: absolute;
    left: 10px;
    opacity: 0.3;
}

.btn-play::after {
    content: '🛡️';
    position: absolute;
    right: 10px;
    opacity: 0.3;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    padding: 2rem 0;
    text-align: center;
    color: #fff;
    margin-top: auto;
    border-top: 3px solid var(--primary-color); /* 金色边框 */
}

.footer-content p a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: var(--transition);
}

.footer-content p a:hover {
    color: var(--secondary-color);
}

.footer-content p::after {
    content: "|";
    color: #666; /* 设置分隔符为不同颜色 */
    margin: 0 0.5rem;
}

.footer-content p:last-child::after {
    content: "";
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section ul {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin: 0;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 全局响应式设置 */
html {
    font-size: 16px;
    @media (max-width: 1200px) {
        font-size: 15px;
    }
    @media (max-width: 992px) {
        font-size: 14px;
    }
    @media (max-width: 768px) {
        font-size: 13px;
    }
    @media (max-width: 576px) {
        font-size: 12px;
    }
}

/* 图片响应式设置 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 响应式布局 */
.game-card {
    flex: 0 0 calc(50% - 1.5rem);
    min-width: calc(50% - 1.5rem);
    @media (max-width: 768px) {
        flex: 0 0 100%;
        min-width: 100%;
    }
}

.nav-links {
    @media (max-width: 768px) {
        display: none;
    }
}

.hero h1 {
    font-size: 2.5rem;
}

.hero-buttons {
    flex-direction: row;
}

.game-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.user-agreement {
    padding: 2rem 0;
}

.agreement-content {
    padding: 3rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--primary-color);
    margin: 2rem auto;
    max-width: 1000px;
}

.agreement-content h3 {
    color: var(--secondary-color);
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.agreement-content h4 {
    color: var(--dark-color);
    margin: 1.5rem 0 0.5rem;
    font-size: 1.2rem;
}

.agreement-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.agreement-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.agreement-content li {
    margin-bottom: 0.5rem;
}


/* 公告样式 */
.announcement {
    background-color: #fff;
    border-left: 4px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    padding: 1.5rem;
}

.announcement h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.announcement p {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.announcement ul {
    list-style-type: disc;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.announcement li {
    margin-bottom: 0.5rem;
}

/* 游戏更新日志样式 */
.update-log {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.update-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.update-item {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: var(--transition);
}

.update-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.update-date {
    color: var(--primary-color);
    font-weight: 500;
}

.update-version {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.update-content ul {
    list-style-type: disc;
    margin-left: 2rem;
    color: var(--text-color);
}

.update-content li {
    margin-bottom: 0.5rem;
}

.side-floating h3, .side-floating span {
    color: #000;
}

/* 侧边浮动页样式 */
.side-floating { position: fixed; right: 20px; top: 100px; background: #fff; padding: 20px; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.1); z-index: 99; text-align: left; }
.side-floating h3 { margin-top: 0; text-align: left; }
.side-floating img { width: 100%; max-width: 200px; margin: 10px 0; text-align: left; }
.side-floating a { display: block; margin: 5px 0; color: #007bff; text-align: left; }

/* 英雄横幅样式 */
.hero-banner {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #ff6600;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #e65c00;
}

/* 游戏特色样式 */
.game-features {
    padding: 4rem 0;
    background-color: #f4f4f4;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.feature-item {
    text-align: center;
}

.feature-item i {
    font-size: 3rem;
    color: #ff6600;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* 热门游戏推荐样式 */
.hot-games {
    padding: 4rem 0;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.game-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.game-card h3 {
    padding: 1rem;
    margin: 0;
}

.game-card p {
    padding: 0 1rem;
}

.game-card .btn {
    margin: 1rem;
}

/* 侧边浮动栏样式 */
.side-floating {
    position: fixed;
    right: 20px;
    top: 100px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    text-align: center;
    z-index: 99;
}

.side-floating h3 {
    margin-top: 0;
}

.side-floating img {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
}

.side-floating a {
    display: block;
    margin-bottom: 0.5rem;
    color: #ff6600;
    text-decoration: none;
}

.side-floating a:hover {
    text-decoration: underline;
}

/* 添加样式确保登录表单不会显示在题头内 */
.login-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* 确保显示在其他元素之上 */
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* 可能需要添加遮罩层 */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}