/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* CSS变量定义，便于统一管理颜色和尺寸 */
:root {
    --primary: #2c3e50;      /* 主色调 */
    --secondary: #3498db;    /* 辅助色 */
    --accent: #e74c3c;       /* 强调色 */
    --light: #ecf0f1;        /* 浅色背景 */
    --dark: #1a2530;         /* 深色背景 */
    --text: #333;            /* 主要文本颜色 */
    --text-light: #777;      /* 浅色文本 */
    --shadow: 0 5px 15px rgba(0,0,0,0.1); /* 阴影效果 */
    --transition: all 0.3s ease; /* 过渡效果 */
}

/* 基础样式设置 */
body {
    background-color: #f9f9f9;
    color: var(--text);
    line-height: 1.6;
}

/* 容器样式，用于居中内容 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 通用按钮样式 */
.btn {
    display: inline-block;
    background-color: var(--secondary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* 通用标题样式 */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* 导航栏样式 */
header {
    background-color: var(--primary);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary);
}

/* 语言切换器样式 */
.language-switcher {
    position: relative;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-flag {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--dark)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* 游戏展示区域样式 */
.games {
    padding: 5rem 0;
    background-color: white;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.game-image {
    height: 200px;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.game-card:hover .game-image img {
    transform: scale(1.05);
}

.game-info {
    padding: 1.5rem;
}

.game-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.game-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* 关于我们区域样式 */
.about {
    padding: 5rem 0;
    background-color: var(--light);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 隐私政策区域样式 */
.privacy-policy {
    padding: 5rem 0;
    background-color: white;
}

.policy-content {
    max-width: 900px;
    margin: 0 auto;
}

.policy-section {
    margin-bottom: 3rem;
}

.policy-section h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.policy-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.policy-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.policy-section li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.policy-section strong {
    color: var(--primary);
}

.policy-date {
    font-style: italic;
    color: var(--text-light);
    margin-top: 2rem;
}

/* 联系区域样式 */
.contact {
    padding: 5rem 0;
    background-color: var(--light);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

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

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* 页脚样式 */
footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.footer-links li i {
    margin-right: 10px;
    color: var(--secondary);
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bbb;
    font-size: 0.9rem;
}

.copyright a {
    color: var(--secondary);
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

/* 自定义字体图标样式 */
/* 游戏控制器图标 - 用于游戏相关元素 */
.icon-controller::before {
    content: "\f11b"; /* Font Awesome游戏控制器图标 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* 团队图标 - 用于关于我们部分 */
.icon-team::before {
    content: "\f0c0"; /* Font Awesome用户组图标 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* 隐私图标 - 用于隐私政策部分 */
.icon-privacy::before {
    content: "\f023"; /* Font Awesome锁图标 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* 联系图标 - 用于联系部分 */
.icon-contact::before {
    content: "\f0e0"; /* Font Awesome信封图标 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* 首页图标 - 用于首页导航 */
.icon-home::before {
    content: "\f015"; /* Font Awesome首页图标 */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* 滚动到顶部按钮样式 */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

/* 响应式设计 - 平板和手机 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 0;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 0.8rem 1rem;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        width: 100%;
        margin-top: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .policy-section {
        margin-bottom: 2rem;
    }
    
    .policy-section h3 {
        font-size: 1.3rem;
    }
}

/* 响应式设计 - 小屏幕手机 */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .game-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}