/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: #4a89dc;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #3a70c0;
}

.btn-secondary {
    background-color: #5cb85c;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: #4cae4c;
}

.btn-outline {
    background-color: transparent;
    color: #4a89dc;
    border: 2px solid #4a89dc;
}

.btn-outline:hover {
    background-color: #4a89dc;
    color: white;
}

/* 导航栏 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    font-size: 24px;
    color: #4a89dc;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    padding: 5px 10px;
    font-weight: 500;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4a89dc;
    transition: width 0.3s ease;
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

.user-actions {
    display: flex;
    gap: 10px;
}

/* 英雄区域 */
.hero {
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/slide-plugins-overlay.png') no-repeat center center/cover;
    background-size: cover;
    transition: background-image 1s ease;
}

/* 轮播动画相关样式 */
.hero.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* 章节标题 */
.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #4a89dc;
}

/* 游戏展示区 */
.games {
    padding: 80px 0;
    background-color: #fff;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.game-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.game-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.game-info {
    padding: 20px;
}

.game-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.game-info p {
    margin-bottom: 20px;
    color: #666;
}

/* 特色功能 */
.features {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 40px;
    color: #4a89dc;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
}

/* 新闻公告 */
.news {
    padding: 80px 0;
    background-color: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-info {
    padding: 20px;
}

.news-date {
    display: block;
    color: #888;
    margin-bottom: 10px;
}

.news-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.news-info p {
    margin-bottom: 15px;
    color: #666;
}

.read-more {
    color: #4a89dc;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* 关于我们 */
.about {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.footer-links h3,
.footer-contact h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3:after,
.footer-contact h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #4a89dc;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a:hover {
    color: #4a89dc;
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: 10px;
    color: #4a89dc;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #34495e;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #4a89dc;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin: 20px 0;
    }
    
    .hero-content h2 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .section-title {
        font-size: 28px;
    }
}

/* 轮播控制按钮 */
.carousel-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 防止按钮阻挡内容点击 */
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto; /* 使按钮可点击 */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.7;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 1;
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: white;
    transform: scale(1.2);
}