
:root {
    --bg-dark: #0C1A1A;
    --bg-medium: #152B2B;
    --text-light: #E0E0E0;
    --accent-gold: #FFC06C;
    --accent-green: #22DDAA;
    --card-hover-shadow: 0 0 15px rgba(255, 192, 108, 0.7), 0 0 30px rgba(34, 221, 170, 0.5);
}

/* Global Styles - 全局样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 1px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Merriweather', serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Canvas Background - Canvas 背景 */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.9;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header - 头部 */
.page-header {
    background: rgba(12, 26, 26, 0.7);
    backdrop-filter: blur(5px);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.site-logo {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: var(--text-light);
    text-shadow: 0 0 10px var(--accent-gold), 0 0 20px var(--accent-green);
    letter-spacing: 3px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.site-logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 15px var(--accent-green), 0 0 30px var(--accent-gold);
}

/* Search Box - 搜索框 */
.search-container {
    position: relative;
    margin-top: 1.5rem;
    max-width: 400px; /* New: Set max-width here for cleaner code */
    margin: 0 auto; /* New: Center the search container */
}

.search-input {
    background: var(--bg-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    width: 100%;
    outline: none;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(255, 192, 108, 0.5);
}

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.search-btn:hover {
    color: var(--accent-green);
}

/* Main Content - 主体内容 */
.main-content {
    padding: 0.5rem 0;
    position: relative;
    z-index: 10;
}

/* Hero Section - 英雄部分 */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(21, 43, 43, 0.7);
    backdrop-filter: blur(5px);
    padding: 1rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 4rem;
}

.hero-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    color: var(--accent-gold);
    text-shadow: 0 0 10px var(--accent-gold);
    margin-bottom: 1rem;
}

.hero-section p {
    max-width: 800px;
    font-size: 1.2rem;
    color: #b0b0c0;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-green));
    color: var(--bg-dark);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 192, 108, 0.3);
    text-transform: uppercase;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

/* Game Grid - Responsive Layout - 游戏卡片响应式布局 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Default for mobile: 2 columns - 移动端默认2列 */
    gap: 3rem;
}

/* Tablet Layout: 3 columns - 平板布局: 3 列 */
@media (min-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop Layout: 4 columns - 桌面布局: 4 列 */
@media (min-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop Layout: 5 columns - 大屏桌面布局: 5 列 */
@media (min-width: 1280px) {
    .game-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.game-card {
    background: var(--bg-medium);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.card-image-box {
    width: 100%;
    height: 220px;
    background-color: #1a3c3c; /* Placeholder color - 占位符颜色 */
    overflow: hidden;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .card-image-box img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.card-content p {
    color: #b0b0c0;
}

/* Footer - 页脚 */
.page-footer {
    background: rgba(12, 26, 26, 0.7);
    backdrop-filter: blur(5px);
    padding: 2.5rem 0;
    text-align: center;
    margin-top: 6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav a {
    color: var(--text-light);
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--accent-green);
}

.footer-text {
    margin-top: 1rem;
    color: #777;
    font-size: 0.9rem;
}

/* Responsive Design - 响应式设计 */
@media (max-width: 768px) {
    .site-logo {
        font-size: 2rem;
    }
    .hero-section h2 {
        font-size: 3rem;
    }
    .hero-section p {
        font-size: 1rem;
    }
    .cta-button {
        padding: 1rem 2.5rem;
    }
}

/* Game Categories - 游戏分类 */
.category-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.category-btn {
    background: var(--bg-medium);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background-color: var(--accent-green);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(34, 221, 170, 0.5);
}

.category-btn.active {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
    box-shadow: 0 5px 15px rgba(255, 192, 108, 0.5);
    border-color: var(--accent-gold);
}