/* Reset and Base Styles */
:root {
    /* 主色调 */
    --primary-color: #6C5CE7;      /* 明亮的紫色，用于主要强调 */
    --secondary-color: #A3A1FF;    /* 柔和的紫色，用于次要强调 */
    
    /* 背景色 */
    --background-white: #FFFFFF;    /* 纯白色主背景 */
    --background-light: #F8F9FD;    /* 浅灰白色，用于区分区块 */
    
    /* 文字颜色 */
    --text-primary: #2D3436;       /* 主要文字颜色 */
    --text-secondary: #636E72;     /* 次要文字颜色 */
    
    /* 功能色 */
    --hover-color: #5849BE;        /* 悬停状态色 */
    --border-color: #E9ECEF;       /* 边框颜色 */
    
    --max-width: 1200px;
}

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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-white);
}

/* Header Styles */
.site-header {
    background-color: var(--background-white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Group Styles */
.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 40px;  /* 调整logo大小 */
    height: 40px;
    object-fit: contain;
}

.logo {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Main Content Styles */
.main-content {
    margin: 0;
}

.game-area {
    background-color: var(--background-light);
    padding: 2rem 0;
    width: 100%;
}

/* 修改container在game-area中的样式 */
.game-area .container {
    padding: 0 0.5rem;  /* 减小两侧内边距，让内容更接近边缘 */
    max-width: 1600px;  /* 增加最大宽度 */
}

.seo-content {
    background-image: url('back.jpg'); /* 替换为您的图片路径 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 创建视差滚动效果 */
    background-repeat: no-repeat;
    position: relative;
    padding: 3rem 0;
    width: 100%;
}

/* 添加一个半透明遮罩，确保文字清晰可读 */
.seo-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.75); /* 白色背景，0.95的不透明度 */
    z-index: 1;
}

/* 确保内容在遮罩层之上 */
.seo-content .container {
    position: relative;
    z-index: 2;
}

/* Footer Styles */
.site-footer {
    background-color: var(--background-light);
    color: var(--text-primary);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

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

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Game Area Layout */
.game-layout {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 1rem;  /* 稍微减小间距 */
    margin-bottom: 2rem;
}

/* Main Game Area */
.game-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9宽高比 */
    background: #000;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

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

/* 新增全屏控制器样式 */
.fullscreen-control {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 12px;
    border-radius: 20px;
    transition: opacity 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.fullscreen-control:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
}

.fullscreen-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.fullscreen-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-btn i {
    font-size: 1.1rem;
}

/* 在悬停时显示全屏控制器 */
.iframe-container:hover .fullscreen-control {
    opacity: 1;
}

/* 默认状态下半透明 */
.fullscreen-control {
    opacity: 0.6;
}

/* Game Cards Styling */
.game-card {
    background: var(--background-white);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.1);
}

.game-thumb {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
}

.game-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-title {
    padding: 0.8rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.play-button {
    display: block;
    text-align: center;
    padding: 0.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.play-button:hover {
    background: var(--hover-color);
}

/* Side Games Grid */
.side-games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Bottom Games Grid */
.bottom-games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.section-title {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}


/* Responsive Design */
@media (max-width: 1024px) {
    .game-area .container {
        padding: 0 0.5rem;  /* 在小屏幕上减小内边距 */
    }
    
    .game-layout {
        grid-template-columns: 1fr;
    }

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

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

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

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* SEO Content Styles */
.seo-section {
    margin-bottom: 4rem;
}

.seo-section h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-weight: 600;
}

/* What Is Section Specific Styles */
.what-is-layout {
    display: grid;
    grid-template-columns: 3fr 2fr; /* 文字区域占60%，图片区域占40% */
    gap: 3rem;
    align-items: start;
}

.what-is-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.what-is-image {
    position: sticky;
    top: 2rem; /* 让图片在滚动时保持固定位置 */
}

.what-is-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .what-is-layout {
        grid-template-columns: 1fr; /* 在平板尺寸下变为单列布局 */
        gap: 2rem;
    }

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

@media (max-width: 768px) {
    .seo-section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .what-is-content p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Features Section Styles */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.feature-item {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.feature-item h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-item {
        padding: 1.5rem;
    }
}

/* How To and Why Play Sections Styles */
.how-to-content,
.why-play-content {
    max-width: 800px;
    margin: 0 auto;
}

.how-to-content h3,
.why-play-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.how-to-content p,
.why-play-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.how-to-content ul {
    list-style-type: none;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.how-to-content ul li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    position: relative;
}

.how-to-content ul li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: -1.5rem;
}

@media (max-width: 768px) {
    .how-to-content,
    .why-play-content {
        padding: 0 1rem;
    }

    .how-to-content h3,
    .why-play-content h3 {
        font-size: 1.25rem;
        margin: 1.5rem 0 0.75rem;
    }

    .how-to-content p,
    .why-play-content p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* FAQ Section Styles */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--background-white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.faq-item h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .faq-container {
        padding: 0 1rem;
    }

    .faq-item {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

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

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

/* 游戏控制栏样式 */
.game-control-bar {
    background: rgba(255, 255, 255, 0.95);  /* 白色半透明背景 */
    backdrop-filter: blur(10px);            /* 毛玻璃效果 */
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);  /* 轻微阴影 */
}

.game-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.game-details {
    color: #333;  /* 深色文字 */
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.play-count {
    font-size: 0.9rem;
    color: #666;  /* 浅灰色文字 */
    margin: 2px 0 0 0;
}

.game-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.share-group {
    display: flex;
    align-items: center;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
}

.share-btn i {
    margin-right: 8px;
}

/* Facebook按钮 */
.share-btn.facebook {
    background-color: #4267B2;
}

/* Twitter按钮 */
.share-btn.twitter {
    background-color: #1DA1F2;
}

/* Reddit按钮 */
.share-btn.reddit {
    background-color: #FF4500;
}

/* 添加Embed按钮样式 */
.share-btn.embed {
    background-color: #2c3e50; /* 深蓝灰色，区别于其他社交媒体按钮 */
}

/* 添加复制链接按钮样式 */
.share-btn.copy-link {
    background-color: #6c757d; /* 中性灰色 */
}

.share-btn:hover {
    opacity: 0.9;
    color: white;
}

/* 修改share text样式 */
.share-text {
    color: #666;
    font-size: 0.9rem;
    margin-right: 12px;
}

/* Embed Modal Styles */
.embed-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.embed-modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
}

.embed-modal-content h3 {
    margin: 0 0 16px 0;
    color: #333;
}

.embed-code-container {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.embed-code-container code {
    font-family: monospace;
    color: #333;
    word-break: break-all;
    flex: 1;
}

.copy-btn, .close-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn {
    background: #f0f0f0;
    color: #333;
}

.close-btn {
    background: #666;
    color: white;
    width: 100%;
}

.copy-btn:hover, .close-btn:hover {
    opacity: 0.9;
}

/* 复制成功提示的动画效果 */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.copied-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    pointer-events: none;
    animation: fadeOut 1s ease-out 1s forwards;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    /* 游戏区域布局调整 */
    .game-layout {
        flex-direction: column;
    }

    .game-main {
        width: 100%;
    }

    /* 游戏控制栏调整 */
    .game-control-bar {
        padding: 12px;
    }

    .game-info {
        gap: 10px;
    }

    .game-logo {
        width: 40px;
        height: 40px;
    }

    .game-title {
        font-size: 1.2rem;
    }

    .play-count {
        font-size: 0.8rem;
    }

    /* 分享按钮组调整 */
    .game-actions {
        flex-direction: column;
        gap: 10px;
    }

    .share-group {
        width: 100%;
    }

    .share-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .share-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
        min-width: auto;
    }

    /* More Games 区域调整 */
    .bottom-games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .game-card {
        margin-bottom: 0;
    }

    .game-thumb img {
        height: 120px;
    }

    .game-card .game-title {
        font-size: 0.9rem;
        margin: 8px 0;
    }

    .play-button {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    /* 全屏控制器调整 */
    .fullscreen-control {
        bottom: 10px;
        right: 10px;
        padding: 6px 10px;
    }

    .fullscreen-text {
        font-size: 0.8rem;
    }

    /* 容器内边距调整 */
    .container {
        padding: 0 10px;
    }

    /* 标题调整 */
    .section-title {
        font-size: 1.3rem;
        margin: 15px 0;
    }

    /* 游戏区域布局调整 */
    .iframe-container {
        padding-top: 120%; /* 将高度设置为宽度的1.2倍 */
    }

    /* 确保iframe内容完全填充容器 */
    .iframe-container iframe {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* 更小屏幕的额外调整 */
@media screen and (max-width: 480px) {
    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

    .game-title {
        font-size: 1rem;
    }

    .bottom-games-grid {
        grid-template-columns: 1fr;
    }

    .game-thumb img {
        height: 160px;
    }
}