/* Global Styles */
:root {
    --primary-color: #2f3542;
    --secondary-color: #0a0e23;
    --accent-color: #ff6b6b;
    --text-color: #f1f2f6;
    --purple-brick: #9c88ff;
    --green-brick: #4cd137;
    --yellow-brick: #fbc531;
    --orange-brick: #e84118;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

button {
    cursor: pointer;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: var(--accent-color);
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #e84118;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Header Styles */
header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    padding: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    animation: pulse 2s infinite alternate;
}

h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: var(--text-color);
    text-shadow: 0 0 10px var(--purple-brick),
                 0 0 20px var(--green-brick);
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav ul li a {
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--yellow-brick), var(--orange-brick));
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Animated Effects */
@keyframes pulse {
    from {
        transform: scale(1);
        box-shadow: 0 0 5px var(--purple-brick);
    }
    to {
        transform: scale(1.05);
        box-shadow: 0 0 15px var(--green-brick),
                    0 0 30px var(--purple-brick);
    }
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        gap: 10px;
    }
    
    h1 {
        font-size: 1.2rem;
    }
}

/* Game Area Styles */
.game-area {
    padding: 50px 0;
}

/* New Game Layout Grid */
.game-section {
    padding: 0;
}

.game-layout {
    display: grid;
    grid-template-areas:
        "left-nav game-area right-nav"
        "bottom-nav bottom-nav bottom-nav";
    grid-template-columns: 200px 1fr 200px;
    grid-template-rows: auto auto;
    gap: 25px;
    margin-top: 30px;
}

/* Game Navigation Styles */
.game-nav {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.game-nav:hover {
    transform: translateY(-5px);
}

.game-nav h3 {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--accent-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
}

.game-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bottom-nav .game-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

.game-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.game-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.game-link img {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.game-link:hover img {
    transform: scale(1.1);
}

.game-link span {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Specific Nav Positioning */
.left-nav {
    grid-area: left-nav;
}

.right-nav {
    grid-area: right-nav;
}

.bottom-nav {
    grid-area: bottom-nav;
}

.bottom-nav .game-link {
    flex: 0 0 18%;
    margin-bottom: 10px;
}

/* Main Game Container */
.game-container {
    grid-area: game-area;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    height: 5px;
    background: linear-gradient(to right, 
        var(--purple-brick), 
        var(--green-brick), 
        var(--yellow-brick), 
        var(--orange-brick)
    );
    border-radius: 5px;
}

.game-frame-container {
    width: 100%;
    height: 600px; /* 固定高度替代百分比 */
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

#game-iframe, .iframe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0e23;
    border-radius: 8px;
}

.game-controls {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-weight: 600;
}

/* SEO Content Area Styles */
.seo-content {
    padding: 50px 0;
    background-color: var(--primary-color);
}

/* Common styles for all SEO sections */
.seo-section {
    margin-bottom: 60px;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.seo-section h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.6rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--accent-color);
    position: relative;
    padding-bottom: 15px;
}

.seo-section h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--purple-brick), var(--green-brick));
    border-radius: 3px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 60px 30px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(10, 14, 35, 0.9));
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, var(--purple-brick) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, var(--green-brick) 0%, transparent 20%);
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    text-align: left;
}

.hero-text {
    flex: 1;
    max-width: 550px;
}

.hero-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-color);
}

.hero-text .highlight {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    position: relative;
    display: inline-block;
}

.hero-text .highlight::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: rgba(241, 242, 246, 0.8);
}

.hero-features {
    list-style-type: none;
    margin: 25px 0;
}

.hero-features li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 500;
}

.hero-features .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-right: 15px;
    font-size: 1.2rem;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.cta-button.primary {
    background-color: var(--accent-color);
    color: white;
}

.cta-button.primary:hover {
    background-color: #e84118;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(232, 65, 24, 0.3);
}

.cta-button.secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.hero-image {
    flex: 1;
    position: relative;
    max-width: 500px;
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(-5deg);
    transition: all 0.5s ease;
    position: relative;
    z-index: 2;
}

.hero-img:hover {
    transform: perspective(1000px) rotateY(0deg) translateY(-10px);
}

.hero-image-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: 
        linear-gradient(45deg, transparent 65%, var(--purple-brick) 100%),
        linear-gradient(-45deg, transparent 65%, var(--green-brick) 100%);
    filter: blur(30px);
    opacity: 0.4;
    z-index: 1;
}

/* Responsive Hero Section */
@media screen and (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        max-width: 100%;
        order: 2;
    }
    
    .hero-image {
        max-width: 400px;
        margin: 0 auto 30px;
        order: 1;
    }
    
    .hero-features li {
        justify-content: center;
    }
    
    .cta-buttons {
        justify-content: center;
    }
}

@media screen and (max-width: 576px) {
    .hero-text h3 {
        font-size: 1.5rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-img {
        transform: none;
    }
    
    .hero-img:hover {
        transform: translateY(-5px);
    }
}

/* Feature Section Styles */
.feature-section {
    background-color: rgba(255, 255, 255, 0.05);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature-item {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--purple-brick), var(--accent-color));
    opacity: 0.7;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: inline-block;
    position: relative;
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--yellow-brick);
}

.feature-item p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.7;
}

.feature-callout {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(156, 136, 255, 0.1));
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin-top: 20px;
}

.feature-callout h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.feature-callout p {
    margin-bottom: 25px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.feature-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.feature-button:hover {
    background-color: #e84118;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(232, 65, 24, 0.4);
}

/* What Is Section Styles */
.what-is-section {
    background-color: rgba(0, 0, 0, 0.2);
}

.what-is-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: center;
}

.what-is-text h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--yellow-brick);
}

.what-is-text p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.what-is-image {
    position: relative;
}

.history-img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.image-caption {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 15px;
    color: rgba(241, 242, 246, 0.7);
    font-style: italic;
}

.what-is-details {
    margin-top: 50px;
}

.what-is-details h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--accent-color);
    text-align: center;
}

.elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.element-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.element-item:hover {
    transform: translateY(-5px);
}

.element-item h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--green-brick);
}

.what-is-conclusion {
    margin-top: 40px;
    padding: 25px;
    background-color: rgba(156, 136, 255, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--purple-brick);
}

.what-is-conclusion p {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* How To Section Styles */
.how-to-section {
    background-color: rgba(255, 255, 255, 0.05);
}

.basics-section {
    margin-bottom: 50px;
}

.basics-section h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--accent-color);
    text-align: center;
}

.basics-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    align-items: center;
}

.basics-text h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--yellow-brick);
}

.basics-text p {
    margin-bottom: 20px;
}

.controls-list {
    padding-left: 20px;
    margin: 20px 0;
}

.controls-list li {
    margin-bottom: 10px;
}

.controls-img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.strategies-section {
    margin-bottom: 50px;
}

.strategies-section h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--accent-color);
    text-align: center;
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.strategy-item {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.strategy-item:hover {
    transform: translateY(-5px);
}

.strategy-item h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--green-brick);
}

.tips-section h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-align: center;
}

.tips-list {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 25px 25px 25px 45px;
    margin-bottom: 30px;
}

.tips-list li {
    margin-bottom: 12px;
}

.tips-list strong {
    color: var(--yellow-brick);
}

.difficulty-progression {
    background-color: rgba(156, 136, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid var(--purple-brick);
}

.difficulty-progression h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--purple-brick);
}

/* FAQ Section Styles */
.faq-section {
    background-color: rgba(0, 0, 0, 0.2);
}

.accordion {
    margin-bottom: 40px;
}

.accordion-item {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.accordion-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.accordion-header h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-color);
    font-weight: 600;
}

.accordion-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: var(--accent-color);
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-body {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item.active .accordion-body {
    padding: 0 20px 20px;
    max-height: 500px;
}

.accordion-body p {
    color: rgba(241, 242, 246, 0.8);
    line-height: 1.7;
}

.faq-contact {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(156, 136, 255, 0.1));
    border-radius: 10px;
    padding: 30px;
    text-align: center;
}

.faq-contact h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.faq-contact p {
    margin-bottom: 20px;
}

.contact-button {
    display: inline-block;
    background-color: var(--purple-brick);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background-color: #8c7ae6;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(140, 122, 230, 0.3);
}

/* Responsive styles for SEO sections */
@media screen and (max-width: 992px) {
    .what-is-grid, 
    .basics-grid {
        grid-template-columns: 1fr;
    }
    
    .what-is-image,
    .basics-image {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 768px) {
    .seo-section {
        padding: 20px;
        margin-bottom: 40px;
    }
    
    .seo-section h2 {
        font-size: 1.3rem;
    }
    
    .hero-section {
        padding: 40px 20px;
    }
    
    .feature-grid,
    .strategy-grid,
    .elements-grid {
        grid-template-columns: 1fr;
    }
    
    .accordion-header h3 {
        font-size: 1rem;
    }
}

@media screen and (max-width: 576px) {
    .feature-item,
    .element-item,
    .strategy-item,
    .tips-list,
    .difficulty-progression,
    .what-is-conclusion {
        padding: 15px;
    }
    
    .feature-callout,
    .faq-contact {
        padding: 20px;
    }
}

/* Footer Styles */
footer {
    background-color: var(--primary-color);
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

/* Responsive Game Layout */
@media screen and (max-width: 1024px) {
    .game-layout {
        grid-template-areas:
            "game-area game-area"
            "left-nav right-nav"
            "bottom-nav bottom-nav";
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .game-nav {
        padding: 15px;
    }
    
    .game-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .left-nav .game-link, .right-nav .game-link {
        flex: 0 0 48%;
    }
}

@media screen and (max-width: 768px) {
    .game-layout {
        grid-template-areas:
            "game-area"
            "left-nav"
            "right-nav"
            "bottom-nav";
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }
    
    .bottom-nav .game-link {
        flex: 0 0 30%;
    }
}

@media screen and (max-width: 600px) {
    .bottom-nav .game-link,
    .left-nav .game-link, 
    .right-nav .game-link {
        flex: 0 0 48%;
    }
    
    footer .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-nav ul {
        justify-content: center;
    }
}

/* Loading Styles */
.loading-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 14, 35, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.loading-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.7);
    animation: pulse-text 1.5s infinite alternate;
}

.progress-bar {
    width: 80%;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(156, 136, 255, 0.5);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--purple-brick), var(--accent-color));
    border-radius: 10px;
    transition: width 0.3s ease;
}

@keyframes pulse-text {
    from {
        opacity: 0.7;
    }
    to {
        opacity: 1;
    }
}

.loading-container.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}