:root {
    --sky-blue: #7FDFFF;    /* 天空蓝色 */
    --grass-green: #90EE90;  /* 草地绿色 */
    --logo-yellow: #FFE135;  /* logo黄色 */
}

.header {
    background-color: var(--sky-blue);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header__nav {
    max-width: 1200px;
    margin: 0 auto;
}

.header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 1rem;
}

.header__logo-img {
    height: 40px;
    width: auto;
}

.header__logo-text {
    font-size: 2rem;
    font-weight: bold;
    color: var(--logo-yellow);
    text-shadow: 
        -2px -2px 0 #000,  
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000;  /* 文字描边效果 */
}

/* 游戏区域样式 */
.game-section {
    background-color: var(--sky-blue);
    padding: 1rem;
    position: relative;
}

.game-container {
    max-width: calc(1200px * 0.8); /* 缩小20% */
    margin: 0 auto;
    position: relative;
    aspect-ratio: 16 / 9;  /* 保持16:9的比例 */
}

.game-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 全屏按钮样式 */
.fullscreen-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    background-color: var(--logo-yellow);
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 100;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fullscreen-btn svg {
    width: 16px;
    height: 16px;
}

/* 全屏模式样式 */
.game-container.fullscreen {
    max-width: none;  /* 全屏模式下覆盖max-width设置 */
    width: 100vw;
    height: 100vh;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .game-container {
        max-width: calc(100% * 0.8); /* 移动端下基于视口宽度缩小20% */
        aspect-ratio: 4 / 3;
    }
    
    .fullscreen-btn {
        padding: 6px 10px;
        right: 10px;
        top: 10px;
    }
}

/* Hero 部分样式 */
.hero {
    background: linear-gradient(to bottom, var(--sky-blue), var(--grass-green));
    padding: 4rem 2rem;
    overflow: hidden;
}

.hero__container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero__content {
    flex: 1;
    color: #fff;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--logo-yellow);
    text-shadow: 
        -2px -2px 0 #000,  
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000;
}

.hero__subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #333;
    max-width: 600px;
}

.hero__buttons {
    display: flex;
    gap: 1rem;
}

.hero__button {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.3s ease;
}

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

.hero__button--primary {
    background-color: var(--logo-yellow);
    color: #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero__button--secondary {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
}

.hero__image {
    flex: 1;
    position: relative;
}

.hero__img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transform: rotate(2deg);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero__container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .hero__buttons {
        justify-content: center;
    }

    .hero__image {
        order: -1; /* 在移动端将图片放在文字上方 */
    }
}

/* 动画效果 */
@keyframes float {
    0% {
        transform: translateY(0) rotate(2deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
    100% {
        transform: translateY(0) rotate(2deg);
    }
}

.hero__img {
    animation: float 4s ease-in-out infinite;
}

.features {
    background-color: var(--sky-blue);
    padding: 4rem 0;
}

.features__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.features__main-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--logo-yellow);
    margin-bottom: 3rem;
    text-shadow: 
        -2px -2px 0 #000,  
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000;
}

.features__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card__image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.feature-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-card__image img {
    transform: scale(1.05);
}

.feature-card__content {
    padding: 1.5rem;
}

.feature-card__content h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-card__content h4 {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

/* 响应式设计 */
@media (min-width: 768px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* 共享样式 */
.section-title {
    font-size: 2.5rem;
    color: var(--logo-yellow);
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

/* About Section */
.about {
    background: linear-gradient(to bottom, var(--sky-blue), var(--grass-green));
    padding: 4rem 0;
}

.about__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about__content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* How To Play Section */
.how-to-play {
    background-color: var(--sky-blue);
    padding: 4rem 0;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.control-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Why Play Section */
.why-play {
    background: linear-gradient(to top, var(--sky-blue), var(--grass-green));
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .controls-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.faq {
    background-color: var(--sky-blue);
    padding: 4rem 0;
}

.faq__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.faq__content {
    display: grid;
    gap: 2rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.faq-item h4 {
    color: #333;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.faq-answer {
    color: #555;
    line-height: 1.6;
}

.faq-answer ul,
.faq-answer ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .faq__container {
        padding: 0 1rem;
    }

    .faq-item {
        padding: 1.5rem;
    }

    .faq-item h4 {
        font-size: 1.1rem;
    }
}

/* 动画效果 */
.faq-item {
    transition: transform 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
}

.video-section {
    background-color: var(--sky-blue);
    padding: 2rem 0;
}

.video-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 1;
}

/* 添加加载动画（可选） */
.video-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--logo-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-container {
        grid-template-columns: 1fr; /* 手机端改为单列 */
        gap: 1rem;
    }
}

/* 悬停效果 */
.video-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}