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

/* 变量定义 - 科技感配色方案 */
:root {
    --bg-dark: #0a0e17;
    --bg-light: #121826;
    --primary: #00f2fe;
    --secondary: #7c3aed;
    --accent: #ff00ea;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --border-glow: 0 0 10px rgba(0, 242, 254, 0.5);
    --glass-bg: rgba(18, 24, 38, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --highlight-gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* 基础字体与背景 */
body {
    font-family: 'Rajdhani', 'Roboto', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* 网格背景覆盖 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(124, 58, 237, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -2;
}

/* 动态背景效果 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.15) 0%, rgba(10, 14, 23, 0) 70%);
    z-index: -1;
    animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* 容器样式 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* 霓虹标题样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 2px;
    background: var(--highlight-gradient);
    animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: var(--highlight-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
    letter-spacing: 2px;
    position: relative;
}

.subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 1px;
}

/* 未来感导航菜单 */
.nav {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 40px;
    border: 1px solid var(--glass-border);
    position: relative;
}

.nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-item a {
    display: block;
    padding: 12px 24px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    background: rgba(124, 58, 237, 0.05);
}

.nav-item a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 254, 0.2), transparent);
    transition: all 0.5s ease;
}

.nav-item a:hover {
    color: var(--primary);
    box-shadow: var(--border-glow);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.nav-item a:hover::before {
    left: 100%;
}

/* 主内容区域 - 玻璃态效果 */
.main-content {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.main-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(0, 242, 254, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* 欢迎区样式 */
.welcome-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    padding: 30px;
    background: rgba(124, 58, 237, 0.05);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.2) 0%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
}

.welcome-text {
    flex: 1;
    min-width: 300px;
    margin-right: 30px;
    position: relative;
    z-index: 1;
}

.welcome-text h2 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.welcome-text p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
}

.welcome-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.welcome-image img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.welcome-image img:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), var(--border-glow);
}

/* 通用区块标题 */
.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--highlight-gradient);
    border-radius: 3px;
}

/* 游戏区域样式 - 3D卡片效果 */
.games-section {
    margin-bottom: 60px;
}

.games-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    perspective: 1000px;
}

.game-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    width: 320px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--highlight-gradient);
}

.game-card:hover {
    transform: translateY(-15px) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), var(--border-glow);
}

.game-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
    transition: transform 0.5s ease;
}

.game-card:hover .game-image {
    transform: scale(1.05) rotate(1deg);
}

.game-card h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 600;
}

.game-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 未来感按钮样式 */
.play-button, .read-button, .answer-button {
    background: var(--highlight-gradient);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-button::before, .read-button::before, .answer-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.play-button:hover, .read-button:hover, .answer-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
}

.play-button:hover::before, .read-button:hover::before, .answer-button:hover::before {
    transform: translateX(100%);
}

/* 故事区域样式 */
.stories-section {
    margin-bottom: 60px;
}

.stories-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.story-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    width: 420px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
}

.story-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 0, 234, 0.2);
}

.story-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
    transition: transform 0.5s ease;
}

.story-card:hover .story-image {
    transform: scale(1.05) rotate(1deg);
}

.story-card h3 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 15px;
    font-weight: 600;
}

.story-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 互动区域样式 */
.interactive-section {
    margin-bottom: 60px;
}

.activity-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.activity {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    width: 380px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.activity::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.activity:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), var(--border-glow);
}

.activity h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 600;
}

.activity p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    font-style: italic;
}

/* 页脚样式 - 科技感设计 */
.footer {
    text-align: center;
    padding: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    border: 1px solid var(--glass-border);
    position: relative;
    margin-top: 60px;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--highlight-gradient);
}

.footer p {
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding: 0 5px;
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.footer a:hover {
    color: var(--accent);
}

.footer a:hover::after {
    transform: scaleX(1);
}

/* 游戏页面专用样式 */
.game-area {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0;
    border: 1px solid var(--glass-border);
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.game-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--highlight-gradient);
}

.game-header {
    margin-bottom: 30px;
}

.game-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.game-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.game-controls {
    margin-bottom: 30px;
}

/* 返回按钮样式 */
.back-button {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 0, 234, 0.4);
}

.back-button:hover::before {
    transform: translateX(100%);
}

/* 响应式设计 - 适应各种屏幕尺寸 */
@media (max-width: 768px) {
    .title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .nav-item a {
        width: 100%;
        text-align: center;
    }
    
    .welcome-section {
        flex-direction: column;
    }
    
    .welcome-text {
        margin-right: 0;
        margin-bottom: 30px;
        text-align: center;
    }
    
    .welcome-text h2 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .game-card, .story-card, .activity {
        width: 100%;
        max-width: 400px;
    }
    
    .main-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.5rem;
    }
    
    .welcome-text h2 {
        font-size: 2rem;
    }
    
    .welcome-text p, .game-card p, .story-card p, .activity p {
        font-size: 1rem;
    }
    
    .play-button, .read-button, .answer-button, .back-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
    box-shadow: var(--border-glow);
}

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

.main-content > * {
    animation: fadeIn 0.6s ease-out;
}

/* 霓虹光效文本 */
.neon-text {
    color: var(--primary);
    text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse-effect {
    animation: pulse 2s ease-in-out infinite;
}

/* 发光边框效果 */
.glow-border {
    box-shadow: var(--border-glow);
    border: 1px solid var(--primary);
}

/* 渐变文字效果 */
.gradient-text {
    background: var(--highlight-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 未来感分隔线 */
.futuristic-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 40px 0;
    position: relative;
}

.futuristic-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--bg-light);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.futuristic-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}