/* 全局变量定义 */
:root {
    --primary-color: #6200ea;    /* 主色调：深紫色 */
    --secondary-color: #b388ff;  /* 次要色：浅紫色 */
    --accent-color: #3d5afe;     /* 强调色：蓝色 */
    --text-color: #333;          /* 深色文本 */
    --bg-color: #1a1a1a;         /* 深色背景 */
    --text-light: #ffffff;       /* 浅色文本 */
    --card-bg: #2d2d2d;          /* 卡片背景色 */
    --hover-color: #7c4dff;      /* 悬停效果色 */
}

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

/* 基础布局 */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--bg-color);
    margin: 0;
    padding: 0;
}

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

/* 头部英雄区域 */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.4));
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 主要内容区域 */
.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 特性卡片网格 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.feature-card {
    background: var(--card-bg);
    color: var(--text-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.feature-card h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* 标题样式 */
h2 {
    color: var(--text-light);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    border: 2px solid transparent;
}

.button:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* 行动召唤区域 */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    text-align: center;
    padding: 3rem;
    border-radius: 10px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.3));
    z-index: 1;
}

.cta > * {
    position: relative;
    z-index: 2;
}

/* 语言选择器 */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-selector select {
    padding: 0.5rem;
    border-radius: 5px;
    background: var(--card-bg);
    color: var(--text-light);
    border: 1px solid var(--secondary-color);
    cursor: pointer;
}

/* 游戏容器 */
.game-container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.game-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    height: 0;
    overflow: hidden;
}

.game-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* 列表样式 */
ul {
    list-style-position: inside;
    margin: 1rem 0;
    padding-left: 1rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* 页脚 */
footer {
    background: var(--card-bg);
    color: var(--text-light);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 2rem 1rem;
    }

    .cta {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card {
    animation: fadeIn 0.6s ease-out forwards;
}