:root {
    --primary-color: #FF0000;
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --header-height: 80px;
}

/* Header & Navigation Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    border-bottom: 1px solid var(--primary-color);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav__logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.nav__logo-link {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav__menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__item {
    position: relative;
}

.nav__link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__link--active {
    color: var(--primary-color);
}

.nav__link--active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav__menu {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }

    .nav__link {
        font-size: 0.9rem;
        padding: 0.3rem 0.5rem;
    }
}

/* Game Section Styles */
.game-section {
    background-color: var(--background-color);
    padding: 2rem 1rem;
    margin-top: var(--header-height); /* 添加顶部间距,对应header高度 */
}

.game-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    background: #000;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    overflow: hidden;
}

/* 非全屏时的默认比例 */
.game-container:not(.fullscreen) {
    aspect-ratio: 16/9;
}

.game-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* 游戏控制按钮区域 */
.game-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* 全屏按钮样式 */
.fullscreen-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(255, 0, 0, 0.2);
}

.fullscreen-icon {
    fill: #fff;
    width: 24px;
    height: 24px;
}

/* 全屏模式样式 */
.game-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    z-index: 1000;
    border: none;
    border-radius: 0;
}

@media (max-width: 768px) {
    .game-section {
        padding: 1rem 0;
        margin-top: calc(var(--header-height) + 1rem); /* 移动端增加一点顶部间距 */
    }

    .game-container {
        border: none;
        border-radius: 0;
    }

    /* 在移动端使用更小的控制按钮 */
    .fullscreen-btn {
        padding: 6px;
    }

    .fullscreen-icon {
        width: 20px;
        height: 20px;
    }
}

/* Hero Section Styles */
.hero {
    position: relative;
    min-height: 80vh;
    background-color: var(--background-color);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--text-color);
}

.hero__title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: glitch 3s infinite;
}

.hero__subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #ffffff;
    opacity: 0.8;
}

.hero__cta {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hero__cta:hover {
    background-color: transparent;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.hero__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 26, 0.8) 0%,
        rgba(26, 26, 26, 0.9) 100%
    );
}

/* Glitch Animation */
@keyframes glitch {
    0% {
        text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.5);
    }
    2% {
        text-shadow: -2px -2px 4px rgba(255, 0, 0, 0.5);
    }
    4% {
        text-shadow: 2px -2px 4px rgba(255, 0, 0, 0.5);
    }
    6% {
        text-shadow: -2px 2px 4px rgba(255, 0, 0, 0.5);
    }
    8% {
        text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.5);
    }
    100% {
        text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.5);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        font-size: 1.2rem;
    }

    .hero__content {
        padding: 1rem;
        text-align: center;
    }
}

/* Features Section Styles */
.features {
    background-color: var(--background-color);
    padding: 4rem 1rem;
}

.features__title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.feature-card {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.feature-card__image {
    position: relative;
    aspect-ratio: 16/9;
    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: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card__content p {
    color: #ffffff;
    line-height: 1.6;
    opacity: 0.9;
}

/* Responsive Design */
@media (min-width: 768px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features {
        padding: 6rem 2rem;
    }

    .feature-card__content {
        padding: 2rem;
    }
}

/* Common Section Styles */
.about,
.how-to-play,
.why-play {
    background-color: var(--background-color);
    padding: 4rem 1rem;
    color: var(--text-color);
}

/* Section Content Container */
.about__content,
.how-to-play__content,
.why-play__content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
}

/* Section Titles */
.about__title,
.how-to-play__title,
.why-play__title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.3);
}

/* Headings Hierarchy */
h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    border-bottom: 2px solid rgba(255, 0, 0, 0.3);
    padding-bottom: 0.5rem;
}

h4 {
    color: #ffffff;
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem;
    opacity: 0.9;
}

/* Content Paragraphs */
p {
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .about__content,
    .how-to-play__content,
    .why-play__content {
        padding: 1rem;
    }

    .about__title,
    .how-to-play__title,
    .why-play__title {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.2rem;
    }
}

/* FAQ Section Styles */
.faq {
    background-color: var(--background-color);
    padding: 4rem 1rem;
}

.faq__title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.3);
}

.faq__content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
}

.faq__group {
    margin-bottom: 2.5rem;
}

.faq__group:last-child {
    margin-bottom: 0;
}

.faq__group h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 0, 0, 0.3);
    padding-bottom: 0.5rem;
}

.faq__group h4 {
    color: #ffffff;
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem;
    font-weight: bold;
}

.faq__group p {
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq__content {
        padding: 1rem;
    }

    .faq__title {
        font-size: 2rem;
    }

    .faq__group h3 {
        font-size: 1.5rem;
    }

    .faq__group h4 {
        font-size: 1.2rem;
    }
}

/* YouTube Videos Section */
.videos-container {
    max-width: 1200px;
    margin: 2rem auto 0;
    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 Aspect Ratio */
    background: #000;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    overflow: hidden;
}

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

/* 移动端适配 */
@media (max-width: 768px) {
    .videos-container {
        grid-template-columns: 1fr; /* 手机端一列显示 */
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .video-wrapper {
        border-width: 1px;
    }
}