/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 新的主题颜色 */
    --primary-color: #4a90e2;      /* 主色调：现代蓝色 */
    --secondary-color: #5cb3ff;    /* 次要色调：浅蓝色 */
    --accent-color: #ff6b6b;       /* 强调色：珊瑚红 */
    --background-dark: #1a1f2c;    /* 深色背景 */
    --background-light: #2a3142;   /* 浅色背景 */
    --text-primary: #ffffff;       /* 主要文字颜色 */
    --text-secondary: #b3c5d7;     /* 次要文字颜色 */
    --text-muted: #8a9db3;         /* 弱化文字颜色 */
    --border-color: #3a4a5c;       /* 边框颜色 */
    --success-color: #4caf50;      /* 成功状态颜色 */
    --warning-color: #ffc107;      /* 警告状态颜色 */
    --error-color: #f44336;        /* 错误状态颜色 */
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--background-dark), var(--background-light));
    min-height: 100vh;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-primary);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.logo-container {
    display: flex;
    align-items: center;
}

.retro-logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    color: var(--text-primary);
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-btn:hover, .lang-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Main Content Layout */
main {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Left Sidebar - Game Links */
.game-links {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 1rem;
}

.game-links h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.game-links ul {
    list-style: none;
    padding-left: 0;
}

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

.game-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.game-links a:hover {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    transform: translateX(8px);
}

.game-links hr {
    border: 0;
    border-top: 1.5px solid #e0e0e0;
    margin: 0.7rem 0;
}

.game-links a {
    font-family: 'Poppins', 'Segoe UI Emoji', 'Segoe UI Symbol', Arial, sans-serif;
}

/* Main Game Section */
.main-game {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.game-container {
    position: relative;
    width: 100%;
    height: 600px;
    background-color: rgba(0, 0, 0, 0.2);
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.fullscreen-btn {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    background-color: var(--primary-color);
    color: var(--text-primary);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.fullscreen-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Game Information Section */
.game-info {
    padding: 1.5rem;
}

.game-info h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.8rem;
}

.game-screenshots {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.game-screenshots img {
    width: 200px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.game-features, .how-to-play, .player-reviews, .faq {
    margin-bottom: 2rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.game-features h3, .how-to-play h3, .player-reviews h3, .faq h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.game-features ul {
    list-style-position: inside;
    margin-left: 1rem;
}

.review {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.review p {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.8rem;
}

.review span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-item h4 {
    color: #34495e;
    margin-bottom: 0.5rem;
}

/* Right Sidebar - Mini Games */
.mini-games {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.mini-games h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.mini-game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.mini-game {
    position: relative;
    padding-bottom: 75%;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    border: 2px solid var(--primary-color);
}

.mini-game:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.game-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.game-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, var(--primary-color), transparent);
    color: var(--text-primary);
    font-size: 14px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mini-game:hover .game-title {
    transform: translateY(0);
}

.mini-game iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.mini-game.active .game-cover {
    opacity: 0;
}

.mini-game.active iframe {
    opacity: 1;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, var(--background-dark), var(--background-light));
    color: var(--text-secondary);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.copyright {
    font-size: 0.9rem;
}

.copyright a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    main {
        grid-template-columns: 150px 1fr 250px;
    }
}

@media (max-width: 992px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .game-links, .mini-games {
        display: none;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    
    .language-selector {
        margin-top: 1rem;
    }
    
    .game-container {
        height: 400px;
    }
    
    .game-screenshots {
        flex-direction: column;
    }
    
    .game-screenshots img {
        width: 100%;
        height: auto;
    }
    
    .why-content {
        grid-template-columns: 1fr;
    }
    
    .game-links, .mini-games {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .game-links {
        font-size: 0.95rem;
    }
    
    .game-links a {
        font-size: 1rem;
        padding: 0.4rem 0.5rem;
    }
}

/* Game Description Section */
.game-description {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.game-description p {
    line-height: 1.8;
    color: #444;
}

/* Game Tips Section */
.game-tips {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.game-tips ul {
    list-style-type: none;
    padding-left: 0;
}

.game-tips li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.game-tips li:before {
    content: "💡";
    position: absolute;
    left: 0;
    color: #e74c3c;
}

/* Game Updates Section */
.game-updates {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.game-updates ul {
    list-style-type: none;
    padding-left: 0;
}

.game-updates li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.game-updates li:before {
    content: "🔄";
    position: absolute;
    left: 0;
    color: #2c3e50;
}

/* Enhanced How to Play Section */
.how-to-play ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1rem;
}

.how-to-play li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.how-to-play li:before {
    content: "🎮";
    position: absolute;
    left: 0;
    color: #e74c3c;
}

/* Enhanced FAQ Section */
.faq-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.faq-item h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.faq-item h4:before {
    content: "❓";
    margin-right: 0.5rem;
    color: #e74c3c;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
}

/* Why Section Styles */
.why-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.why-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.why-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.why-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
}

.why-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.why-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.why-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Game Container Loading State */
.game-container {
    position: relative;
    width: 100%;
    height: 600px;
}

.game-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="50" cy="50" fill="none" stroke="%23e74c3c" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138"><animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"/></circle></svg>') center center no-repeat;
    background-size: 50px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-container.loading::after {
    opacity: 1;
}

/* Mini Game Active State */
.mini-game.active {
    border: 2px solid #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

.mini-game.active .game-cover {
    opacity: 0;
}

.mini-game.active iframe {
    opacity: 1;
}

/* Game Title Transition */
.game-info h2 {
    transition: opacity 0.3s ease;
}

.game-info h2.updating {
    opacity: 0;
}

/* 导航栏新字体和图标样式 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&display=swap');

/* 移除主要区域和内容块的边框 */
.game-links,
.mini-games,
.main-game,
.game-features,
.how-to-play,
.player-reviews,
.faq,
.why-section,
.why-item {
    border: none !important;
}

/* 移除标题下划线边框 */
.game-links h2,
.mini-games h2,
.game-info h2,
.why-section h3 {
    border-bottom: none !important;
}

/* 自动检测背景色并适配文字颜色 */
/* 深色背景内容区 */
.game-features,
.how-to-play,
.player-reviews,
.faq,
.why-section {
    color: #f8f8ff !important; /* 浅色文字 */
    background-color: rgba(255, 255, 255, 0.05); /* 深色背景 */
}

/* 浅色背景内容区 */
.game-description,
.game-tips,
.game-updates,
.faq-item {
    color: #22223b !important; /* 深色文字 */
    background-color: #f8f9fa; /* 浅色背景 */
}

/* 确保所有标题可见 */
.game-features h3,
.how-to-play h3,
.player-reviews h3,
.faq h3,
.why-section h3 {
    color: #a259f7 !important; /* 亮紫色标题 */
}

.game-description h3,
.game-tips h3,
.game-updates h3 {
    color: #7c3aed !important; /* 深紫色标题，适合浅色背景 */
}

/* 确保FAQ项内容可见 */
.faq-item p {
    color: #22223b !important; /* 深色文字 */
}

/* 确保评论文字可见 */
.review {
    background-color: rgba(255, 255, 255, 0.05); /* 深色背景 */
}
.review p, .review span {
    color: #f8f8ff !important; /* 浅色文字 */
}

/* Why区域项目内容可见 */
.why-item {
    background-color: white; /* 浅色背景 */
}
.why-item p {
    color: #22223b !important; /* 深色文字 */
}

/* 深色背景内容区用浅色字 */
.dark-block {
    color: #f8f8ff !important;
}

/* 浅色背景内容区用深色字 */
.light-block {
    color: #22223b !important;
}

/* 加载指示器样式 */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.2rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.loading-indicator::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 错误消息样式 */
.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--text-primary);
    padding: 2rem;
    border-radius: 12px;
    max-width: 80%;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.error-message h3 {
    color: var(--error-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-message p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.error-message ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
    text-align: left;
    display: inline-block;
}

.error-message li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.error-message li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.error-message button {
    background-color: var(--primary-color);
    color: var(--text-primary);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.error-message button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
} 