/* 全局样式 (Global styles) */
:root {
    --primary-light: #E3F2FD;  /* 浅蓝色背景 (Light blue background) */
    --primary: #90CAF9;        /* 中蓝色元素 (Medium blue elements) */
    --primary-dark: #1565C0;   /* 深蓝色文字 (Dark blue text) */
    --accent: #29B6F6;         /* 强调色 (Accent color) */
    --white: #FFFFFF;          /* 白色 (White) */
    --gray-light: #F5F7FA;     /* 浅灰色 (Light gray) */
    --gray: #B0BEC5;           /* 中灰色 (Medium gray) */
    --gray-dark: #37474F;      /* 深灰色 (Dark gray) */
}

/* 字体设置 (Font settings) */
.font-baloo {
    font-family: 'Baloo 2', cursive, sans-serif;
}

/* 页面基础样式 (Basic page styles) */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Logo动画效果 (Logo animation effects) */
.logo-container {
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

/* 游戏容器样式 (Game container styles) */
.game-container {
    transition: all 0.3s ease;
    position: relative;
}

.game-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 游戏包装器样式 */
#gameWrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 0;
    padding-bottom: 56.25%;     /* 16:9比例的容器高度 */
}

/* 游戏iframe样式 */
#gameFrame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 全屏按钮样式 (Fullscreen button styles) */
#fullscreenButton {
    transition: all 0.2s ease;
}

#fullscreenButton:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 卡片悬停效果 (Card hover effects) */
.transform {
    transition: transform 0.3s ease;
}

/* 响应式设计调整 (Responsive design adjustments) */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    nav .container {
        padding: 15px 20px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons .btn {
        padding: 10px 15px;
    }
    
    /* 移除了#gameWrapper的高度限制 */
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* 移除了#gameWrapper的高度限制 */
}

/* 语言选择器样式 (Language selector styles) */
#languageSelector {
    transition: all 0.2s ease;
}

#languageSelector:hover {
    border-color: var(--primary-dark);
}

/* 自定义滚动条 (Custom scrollbar) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 图片加载占位符 (Image loading placeholders) */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* 按钮动画 (Button animations) */
button {
    transition: all 0.2s ease;
}

button:active {
    transform: translateY(2px);
}

/* 自定义动画 (Custom animations) */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* 链接样式 (Link styles) */
a {
    transition: color 0.2s ease;
}

footer a {
    color: var(--primary-light);
}

footer a:hover {
    color: var(--white);
}

/* 提高无障碍性的焦点样式 (Focus styles for accessibility) */
a:focus, button:focus, select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* 表单元素样式 (Form element styles) */
input, select, textarea {
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.2);
}

/* 页面过渡效果 (Page transition effects) */
.page-transition {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 游戏全屏模式样式 (Game fullscreen mode styles) */
.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: black;
}

/* 游戏载入动画 (Game loading animation) */
.game-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
}

.game-loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary);
    border-top-color: var(--primary-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 用户评论卡片样式 (User review card styles) */
.review-card {
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 多语言内容初始隐藏 (Initially hide multilingual content) */
[data-lang] {
    transition: opacity 0.3s ease;
}

[data-lang].hidden {
    display: none;
} 