/* 导入像素风格字体 */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

/* 复古主题颜色变量 */
:root {
    --retro-black: #222034;
    --retro-purple: #814ebf;
    --retro-yellow: #f6e05e;
    --retro-white: #f8f8f8;
}

/* Header样式 */
.retro-header {
    background-color: var(--retro-black);
    padding: 1rem;
    border-bottom: 4px solid var(--retro-purple);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.logo {
    width: 50px;
    height: 50px;
    image-rendering: pixelated; /* 使logo呈现像素风格 */
}

.site-title {
    font-family: 'Press Start 2P', cursive;
    color: var(--retro-white);
    font-size: 1.5rem;
    text-shadow: 3px 3px var(--retro-purple);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.2rem;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
}

/* 游戏区域布局调整 */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: 1fr;  /* 改为单行布局 */
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 左侧区域容器 */
.game-left-container {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 游戏主窗口 */
.game-main {
    background: var(--retro-black);
    border: 4px solid var(--retro-purple);
    border-radius: 8px;
    padding: 15px;
}

.game-frame {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 保持4:3的宽高比 */
    height: 0;
    overflow: hidden;
}

.game-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* 右侧导航调整 */
.game-sidebar {
    grid-column: 2;
    grid-row: 1;
    background: var(--retro-black);
    border: 4px solid var(--retro-purple);
    border-radius: 8px;
    padding: 15px;
    height: 100%;  /* 保持高度100% */
    align-self: stretch;  /* 确保完全填充网格单元格 */
}

.sidebar-games {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

/* 底部导航调整 */
.game-bottom-nav {
    grid-column: 1;
    grid-row: 2;
    background: var(--retro-black);
    padding: 20px;
    border-radius: 8px;
    border: 4px solid var(--retro-purple);
}

.bottom-games {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 15px;
}

/* 游戏卡片样式优化 */
.game-card {
    background: var(--retro-black);
    border: 2px solid var(--retro-purple);
    border-radius: 4px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--retro-yellow);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.game-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 2px;
}

.game-name {
    display: block;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--retro-white);
    text-align: center;
    margin-top: 8px;
}

/* 标题样式 */
.retro-title {
    font-family: 'Press Start 2P', cursive;
    color: var(--retro-white);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* 响应式设计调整 */
@media (max-width: 1024px) {
    .game-layout {
        grid-template-columns: 1fr;
    }

    .game-sidebar {
        grid-column: 1;
        grid-row: 2;
    }

    .game-bottom-nav {
        grid-row: 3;
    }

    .bottom-games {
        grid-template-columns: repeat(3, 1fr);
    }

    .sidebar-games {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .bottom-games {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-games {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .bottom-games,
    .sidebar-games {
        grid-template-columns: 1fr;
    }
}

/* Hero Section Styles */
.hero-section {
    background: var(--retro-black);
    padding: 60px 20px;
    margin-top: 40px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    padding-right: 20px;
}

.hero-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    color: var(--retro-white);
    margin-bottom: 20px;
    text-shadow: 3px 3px var(--retro-purple);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--retro-white);
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-features ul {
    list-style: none;
    margin-bottom: 30px;
}

.hero-features li {
    color: var(--retro-white);
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-cta {
    margin-top: 30px;
}

.play-button {
    background: var(--retro-purple);
    color: var(--retro-white);
    font-family: 'Press Start 2P', cursive;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 2px solid var(--retro-white);
}

.play-button:hover {
    background: var(--retro-yellow);
    color: var(--retro-black);
    transform: translateY(-2px);
}

.hero-note {
    color: var(--retro-white);
    margin-top: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-image {
    position: relative;
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 4px solid var(--retro-purple);
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-features ul {
        display: inline-block;
        text-align: left;
    }

    .hero-title {
        font-size: 2rem;
    }
}

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-features li {
        font-size: 0.9rem;
    }
}

/* Features Section Styles */
.features-section {
    padding: 80px 20px;
    background: var(--retro-black);
}

.features-section h2 {
    font-family: 'Press Start 2P', cursive;
    color: var(--retro-white);
    text-align: center;
    margin-bottom: 60px;
    font-size: 2rem;
    text-shadow: 3px 3px var(--retro-purple);
}

.features-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid var(--retro-purple);
    border-radius: 8px;
    padding: 30px;
    transition: transform 0.3s ease;
    align-items: center;
}

.feature-card:nth-child(even) {
    direction: rtl;
}

.feature-card:nth-child(even) .feature-content {
    direction: ltr;
}

.feature-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--retro-purple);
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-icon {
    margin-bottom: 20px;
    text-align: center;
}

.feature-card h3 {
    font-family: 'Press Start 2P', cursive;
    color: var(--retro-yellow);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--retro-white);
    line-height: 1.6;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .feature-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .feature-card:nth-child(even) {
        direction: ltr;
    }

    .feature-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .feature-card {
        padding: 20px;
    }

    .feature-card h3 {
        font-size: 1rem;
    }
}

/* FAQ Section Styles */
.faq-section {
    padding: 80px 20px;
    background: var(--retro-black);
}

.faq-section h2 {
    font-family: 'Press Start 2P', cursive;
    color: var(--retro-white);
    text-align: center;
    margin-bottom: 60px;
    font-size: 2rem;
    text-shadow: 3px 3px var(--retro-purple);
}

.faq-content {
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid var(--retro-purple);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}

.faq-item h3 {
    font-family: 'Press Start 2P', cursive;
    color: var(--retro-yellow);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.faq-answer {
    color: var(--retro-white);
    line-height: 1.6;
}

.faq-answer p {
    margin-bottom: 15px;
}

.faq-answer ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.faq-answer li {
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-section h2 {
        font-size: 1.5rem;
    }

    .faq-item h3 {
        font-size: 1rem;
    }

    .faq-item {
        padding: 20px;
    }
}

/* What Is, How To, Why Sections Common Styles */
.what-is-section,
.how-to-section,
.why-section {
    padding: 80px 20px;
    background: var(--retro-black);
}

.what-is-content,
.how-to-content,
.why-content {
    max-width: 1000px;
    margin: 0 auto;
    color: var(--retro-white);
}

/* Section Headers */
.what-is-section h2,
.how-to-section h2,
.why-section h2 {
    font-family: 'Press Start 2P', cursive;
    color: var(--retro-white);
    text-align: center;
    margin-bottom: 60px;
    font-size: 2rem;
    text-shadow: 3px 3px var(--retro-purple);
}

/* Content Blocks */
.content-block,
.getting-started,
.controls-guide,
.gameplay-tips,
.reason-block {
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid var(--retro-purple);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

/* Subheadings */
.content-block h3,
.getting-started h3,
.controls-guide h3,
.gameplay-tips h3,
.reason-block h3 {
    font-family: 'Press Start 2P', cursive;
    color: var(--retro-yellow);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* Paragraphs */
.what-is-content p,
.how-to-content p,
.why-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Lists */
.control-list {
    list-style: none;
    margin: 20px 0;
    padding-left: 20px;
}

.control-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-list li::before {
    content: "→";
    color: var(--retro-yellow);
    font-weight: bold;
}

/* Section-specific styles */
.what-is-section {
    border-bottom: 4px solid var(--retro-purple);
}

.how-to-section .controls-guide {
    background: rgba(129, 78, 191, 0.1);
}

.why-section .reason-block:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
    border-color: var(--retro-yellow);
}

/* Highlight important text */
.highlight {
    color: var(--retro-yellow);
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 968px) {
    .what-is-section h2,
    .how-to-section h2,
    .why-section h2 {
        font-size: 1.5rem;
    }

    .content-block,
    .getting-started,
    .controls-guide,
    .gameplay-tips,
    .reason-block {
        padding: 20px;
    }

    .what-is-content p,
    .how-to-content p,
    .why-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .what-is-section h2,
    .how-to-section h2,
    .why-section h2 {
        font-size: 1.2rem;
    }

    .content-block h3,
    .getting-started h3,
    .controls-guide h3,
    .gameplay-tips h3,
    .reason-block h3 {
        font-size: 1rem;
    }

    .what-is-content p,
    .how-to-content p,
    .why-content p {
        font-size: 0.9rem;
    }

    .control-list li {
        font-size: 0.9rem;
    }
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: translateY(-2px);
}

.site-title {
    color: var(--retro-white);
    text-decoration: none;
}