/* 基础样式 */
:root {
    --primary-color: #9042a5; /* 紫色作为主色调 */
    --secondary-color: #47c0e8; /* 亮蓝色作为辅助色 */
    --accent-color: #ff7e7e; /* 粉红色作为强调色 */
    --bg-color: #e8f4ff; /* 浅蓝背景 */
    --text-color: #333;
    --header-font: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    --body-font: 'Arial', sans-serif;
}

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

body {
    font-family: var(--body-font);
    background-color: var(--bg-color);
    color: var(--text-color);
}

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

/* Header 样式 */
header {
    background: linear-gradient(to bottom, #74b9e6, #a7d8f7);
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.logo-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.site-title h1 {
    font-family: var(--header-font);
    color: var(--primary-color);
    font-size: 2.2rem;
    text-shadow: 2px 2px 0 #fff, 3px 3px 0 rgba(0,0,0,0.15);
    margin-bottom: 5px;
}

.tagline {
    font-family: var(--header-font);
    color: #fff;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
    font-size: 1rem;
}

/* 导航菜单 */
nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: #fff;
    font-family: var(--header-font);
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
    padding: 8px 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-area {
        margin-bottom: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 游戏区域样式 */
.game-area {
    padding: 40px 0;
    background-color: #f0f8ff;
}

.game-area h2 {
    text-align: center;
    font-family: var(--header-font);
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 0 #fff;
}

/* 游戏布局 */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* 导航标题 */
.nav-title {
    background-color: var(--primary-color);
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: 10px 10px 0 0;
    font-weight: bold;
    font-family: var(--header-font);
}

/* 游戏导航样式 */
.game-nav {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.game-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.bottom-nav {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 游戏项目样式 */
.game-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f9f9f9;
}

.game-item:hover {
    background-color: var(--bg-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.game-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 10px;
}

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

.bottom-nav .game-item {
    flex-direction: column;
    text-align: center;
    width: calc(20% - 10px);
}

.bottom-nav .game-item img {
    width: 60px;
    height: 60px;
    margin-right: 0;
    margin-bottom: 5px;
}

/* 游戏内容区域 */
.game-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 500px; /* 固定高度 */
    position: relative;
}

.game-frame-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#game-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

.game-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f8ff 0%, #d8ecff 100%);
}

.game-placeholder h3 {
    font-family: var(--header-font);
    color: var(--primary-color);
    margin-bottom: 20px;
}

.mascot {
    width: 150px;
    height: auto;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .game-layout {
        grid-template-columns: 1fr 2fr;
    }
    
    .right-nav {
        grid-column: 1 / -1;
    }
    
    .bottom-nav .game-list {
        justify-content: center;
    }
    
    .bottom-nav .game-item {
        width: calc(25% - 10px);
    }
}

@media (max-width: 768px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
    
    .left-nav, .right-nav {
        grid-column: 1;
    }
    
    .bottom-nav .game-item {
        width: calc(33.33% - 10px);
    }
    
    .game-content {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .bottom-nav .game-item {
        width: calc(50% - 10px);
    }
}

/* Hero Section 样式 */
.hero-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f0f4ff 0%, #e3eaff 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.hero-img:hover {
    transform: translateY(-10px);
}

.hero-section h2 {
    font-family: var(--header-font);
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 25px;
}

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

.hero-features li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.feature-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin-right: 12px;
    font-size: 1rem;
}

.hero-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(144, 66, 165, 0.3);
}

.hero-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(144, 66, 165, 0.4);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero-section h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
    }
    
    .hero-text {
        order: 2;
        text-align: center;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 30px;
    }
    
    .hero-features li {
        justify-content: center;
    }
}

/* Features Section */
.feature-section {
    padding: 60px 0;
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background-color: #f8f8ff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

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

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #b673d0 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}

.feature-icon-large {
    font-size: 30px;
    color: white;
}

.feature-card h3 {
    font-family: var(--header-font);
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.feature-card p {
    color: #555;
    line-height: 1.6;
}

/* What Is Section - Enhanced */
.what-is-section {
    padding: 70px 0;
    background-color: #f9f5ff;
    position: relative;
}

.what-is-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/pattern-bg.png');
    background-size: 200px;
    background-repeat: repeat;
    opacity: 0.05;
    z-index: 0;
}

.what-is-section .container {
    position: relative;
    z-index: 1;
}

.what-is-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
    margin-top: 40px;
}

.what-is-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.what-is-image:hover {
    transform: translateY(-10px);
}

.section-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 15px;
    font-size: 0.9rem;
    text-align: center;
}

.what-is-text {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.what-is-card {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.what-is-card h3 {
    font-family: var(--header-font);
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
    position: relative;
    padding-bottom: 10px;
}

.what-is-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

.what-is-card p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
}

.what-is-card p:last-child {
    margin-bottom: 0;
}

.game-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.game-pill {
    padding: 8px 15px;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.purple-pairs {
    background-color: var(--primary-color);
}

.comfy-cakes {
    background-color: #f5756c;
}

.purble-shop {
    background-color: #47b8e0;
}

.mini-game-desc {
    margin-top: 15px;
}

/* Responsive design adjustments */
@media (max-width: 992px) {
    .what-is-content {
        grid-template-columns: 1fr;
    }
    
    .what-is-image {
        max-width: 500px;
        margin: 0 auto 30px;
    }
}

@media (max-width: 576px) {
    .game-pills {
        justify-content: center;
    }
    
    .what-is-card h3 {
        text-align: center;
    }
    
    .what-is-card h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* How To Section */
.how-to-section {
    padding: 60px 0;
    background-color: white;
}

.how-to-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.tab-button {
    background-color: #f0f0f0;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-family: var(--header-font);
    font-size: 1.1rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover, .tab-button.active {
    background-color: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.instruction-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.how-to-img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.instruction-steps h3 {
    font-family: var(--header-font);
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.instruction-steps {
    counter-reset: step-counter;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.step-number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
    flex-shrink: 0;
}

.step-item p {
    margin: 0;
    padding-top: 5px;
}

/* FAQ Section */
.faq-section {
    padding: 60px 0;
    background-color: #f9f5ff;
}

.faq-list {
    margin-top: 40px;
}

.faq-item {
    background-color: white;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

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

.faq-question:hover {
    background-color: #f9f9f9;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

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

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 500px;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

/* Responsive adjustments for the new sections */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .what-is-content {
        grid-template-columns: 1fr;
    }
    
    .instruction-grid {
        grid-template-columns: 1fr;
    }
    
    .what-is-image {
        order: 1;
    }
    
    .what-is-text {
        order: 2;
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .how-to-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-button {
        width: 100%;
        max-width: 300px;
    }
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: white;
    position: relative;
    padding: 70px 0 30px;
    margin-top: 40px;
}

.footer-waves {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.footer-waves svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    grid-column: span 1;
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    margin-bottom: 15px;
    background-color: white;
    padding: 5px;
}

.footer-info p {
    margin-top: 10px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-links, .footer-games {
    grid-column: span 1;
}

.footer-contact {
    grid-column: span 1;
}

.site-footer h2 {
    font-family: var(--header-font);
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: white;
}

.site-footer h3 {
    font-family: var(--header-font);
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.site-footer h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

.site-footer ul {
    list-style: none;
}

.site-footer li {
    margin-bottom: 12px;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.site-footer a:hover {
    color: white;
    transform: translateX(5px);
}

.contact-email {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.email-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px) translateX(0) !important;
}

.social-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-policy-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-policy-links a {
    font-size: 0.9rem;
}

.separator {
    color: rgba(255, 255, 255, 0.4);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-logo {
        grid-column: span 2;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .footer-logo-img {
        margin: 0 auto 15px;
    }
    
    .footer-info h2 {
        text-align: center;
    }
    
    .footer-info p {
        text-align: center;
        max-width: 500px;
        margin: 10px auto 0;
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .copyright {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-logo, .footer-links, .footer-games, .footer-contact {
        grid-column: span 1;
        text-align: center;
    }
    
    .site-footer h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .site-footer a:hover {
        transform: translateX(0) scale(1.05);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-email {
        justify-content: center;
    }
}
