/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3px; /* 原来是10px，减少70% */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 主要内容区域 */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 游戏区域 */
.game-area {
    display: flex;
    gap: 10px;
    min-height: 1024px;
    margin-bottom: 20px;
    justify-content: center; /* 改回居中对齐 */
    align-items: flex-start;
    position: relative;
}

/* 标题样式 */
.title-column {
    position: static;
    padding: 0 0 4.5px 0; /* 原来底部是15px，减少70% */
    z-index: 2;
    width: 100%;
    text-align: left;
    margin-bottom: 4.5px; /* 原来是15px，减少70% */
    border-bottom: 1px solid #eee;
}

.title-column h1 {
    font-size: 28px;
    font-weight: bold;
    white-space: nowrap;
    position: static;
    color: #ff6633; /* 添加一点颜色使标题更突出 */
}

.gg-column {
    width: 15%;
    display: flex;
    flex-direction: column;
}

.gg-column.left {
    margin-left: 0; /* 移除为标题预留的空间 */
}

.gg-view {
    padding: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #f9f9f9;
    font-style: italic;
    color: #999;
}

.game-column {
    width: 768px; /* 3比例 */
    height: 1024px; /* 4比例 */
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    margin: 0 auto; /* 确保水平居中 */
}

/* 确保iframe基本样式 */
iframe {
    border: none;
    background-color: #f5f5f5;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    /* 原始尺寸 */
    width: 768px; 
    height: 1024px;
    transform-origin: top left;
}

iframe::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.iframe-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-style: italic;
    color: #999;
    background-color: #f5f5f5;
    z-index: 0;
}

/* 游戏说明 */
.game-description {
    padding: 20px;
    margin-bottom: 20px;
    min-height: 300px;
    background-color: #f9f9f9;
}

.game-description h2 {
    font-size: 22px;
    margin-bottom: 15px;
}

.description-content {
    font-size: 16px;
}

.description-content h3 {
    margin-bottom: 15px;
}

.description-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.description-content p {
    margin-bottom: 15px;
}

.description-content ul, 
.description-content ol {
    margin-bottom: 15px;
    margin-left: 20px;
}

.description-content li {
    margin-bottom: 5px;
}

/* 底部区域 */
footer {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
}

.footer-section {
    flex: 1;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

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

.footer-section ul li {
    margin-bottom: 5px;
}

.footer-section ul li a {
    color: #333;
    text-decoration: none;
}

.footer-section ul li a:hover {
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 1100px) {
    .gg-column {
        display: none;
    }
    
    .game-column {
        flex-shrink: 0;
    }
    
    .container {
        padding: 15px;
    }
}

/* 基于视口高度的自适应缩放，保持3:4比例 */
@media (max-height: 1100px) {
    .game-column {
        /* 使用宽高比为3:4的容器尺寸 */
        width: 691.2px; /* 768 * 0.9 */
        height: 921.6px; /* 1024 * 0.9 */
        transform-origin: center;
        /* 移除transform:scale导致的比例失真 */
        transform: none;
    }
    
    .game-area {
        min-height: 921.6px;
    }
    
    /* 添加此处：确保iframe内容也跟随缩放 */
    iframe {
        transform: scale(0.9);
    }
}

@media (max-height: 950px) {
    .game-column {
        width: 614.4px; /* 768 * 0.8 */
        height: 819.2px; /* 1024 * 0.8 */
        transform-origin: center;
        transform: none;
    }
    
    .game-area {
        min-height: 819.2px;
    }
    
    /* 添加此处：确保iframe内容也跟随缩放 */
    iframe {
        transform: scale(0.8);
    }
}

@media (max-height: 850px) {
    .game-column {
        width: 537.6px; /* 768 * 0.7 */
        height: 716.8px; /* 1024 * 0.7 */
        transform-origin: center;
        transform: none;
    }
    
    .game-area {
        min-height: 716.8px;
    }
    
    /* 添加此处：确保iframe内容也跟随缩放 */
    iframe {
        transform: scale(0.7);
    }
}

/* 宽屏幕但高度受限的情况 */
@media (min-width: 801px) and (max-height: 768px) {
    .game-column {
        width: calc(3 * (100vh - 200px) / 4); /* 保持3:4比例，减去页眉页脚等空间 */
        height: calc(100vh - 200px);
        transform: none;
    }
    
    .game-area {
        min-height: calc(100vh - 200px);
    }
    
    /* 添加此处：根据容器尺寸计算缩放比例 */
    iframe {
        transform: scale(calc((100vh - 200px) / 1024));
    }
}

/* 窄屏幕设备的自适应布局 */
@media (max-width: 800px) {
    .title-column h1 {
        font-size: 24px;
        text-align: center;
    }
    
    .title-column {
        text-align: center;
        padding: 5px 0 15px 0;
    }
    
    .container {
        padding: 10px;
    }
    
    .game-column {
        width: 100%;
        height: 0;
        padding-bottom: 133.33%; /* 保持3:4比例 => 4/3 * 100% = 133.33% */
        transform: none;
    }
    
    .game-area {
        min-height: auto;
        align-items: center;
        flex-direction: column;
    }
    
    /* 添加此处：确保iframe内容根据宽度缩放 */
    iframe {
        width: 768px;
        height: 1024px;
        transform: scale(calc(100vw / 768));
        left: calc((100vw - 768px) / 2); /* 居中 */
    }
    
    footer {
        flex-direction: column;
        gap: 20px;
    }
}

/* 页面内容样式 */
.page-content {
    padding: 20px;
    line-height: 1.8;
}

.back-link {
    margin-bottom: 20px;
    display: inline-block;
}

/* 各种页面特定样式 */
.policy-section, 
.terms-section,
.copyright-section {
    margin-bottom: 30px;
}

.policy-section h3,
.terms-section h3,
.copyright-section h3 {
    margin-bottom: 15px;
}

.policy-section p,
.policy-section ul,
.terms-section p,
.copyright-section p,
.copyright-section ol {
    margin-bottom: 15px;
}

.policy-section ul,
.copyright-section ol {
    padding-left: 20px;
}

.copyright-section li {
    margin-bottom: 10px;
}

/* 联系表单样式 */
.contact-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group textarea {
    height: 150px;
}

.submit-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.submit-btn:hover {
    background-color: #555;
}

.contact-info {
    margin-top: 30px;
} 