/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 顶部导航栏 */
.header {
    background-color: #4A90E2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Banner 区域 */
.banner {
    margin-top: 60px;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.banner-content {
    padding: 20px;
}

.banner h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 600;
}

.banner p {
    font-size: 18px;
    opacity: 0.9;
}

/* 主内容区域 */
.container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 游戏展示区域 */
.games-section {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    color: #333;
    margin-bottom: 40px;
    font-weight: 600;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* 游戏卡片 */
.game-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    min-width: 300px;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.game-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #e8e8e8;
    display: block;
}

.game-info {
    padding: 20px;
}

.game-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-detail {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.game-detail span {
    font-weight: 500;
    margin-right: 8px;
}

.game-detail .value {
    color: #333;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
    line-height: 1.4;
}

.game-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4A90E2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: 12px;
}

.game-button:hover {
    background-color: #357ABD;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.game-button.enter-game {
    width: 100%;
    background-color: #5CB85C;
}

.game-button.enter-game:hover {
    background-color: #4A9B5C;
}

/* 底部页脚 */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.footer-section {
    flex: 1;
}

.footer-section.left {
    flex: 2;
}

.footer-section.right {
    flex: 1;
}

.footer-subsection {
    margin-bottom: 25px;
}

.footer-subsection:last-child {
    margin-bottom: 0;
}

.footer h3 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.friend-links a {
    color: #4A90E2;
    text-decoration: none;
    margin-right: 20px;
    font-size: 14px;
}

.friend-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* 图片灯箱 */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2001;
}

.lightbox-close:hover {
    color: #4A90E2;
}

/* 灯箱导航按钮 */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 48px;
    padding: 20px 30px;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 2001;
    display: none;
}

.lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

#lightbox-prev {
    left: 30px;
}

#lightbox-next {
    right: 30px;
}

/* 灯箱缩略图 */
.lightbox-thumbs {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2001;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90%;
}

.lightbox-thumbs .thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
    border: 2px solid transparent;
}

.lightbox-thumbs .thumb:hover {
    opacity: 0.9;
    transform: scale(1.1);
}

.lightbox-thumbs .thumb.active {
    opacity: 1;
    border-color: #4A90E2;
    transform: scale(1.15);
}

/* 响应式设计 */
@media (min-width: 1400px) {
    .container {
        max-width: 1500px;
    }
}

@media (max-width: 1400px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner h1 {
        font-size: 36px;
    }
}

@media (max-width: 600px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .banner {
        height: 300px;
    }
    
    .banner h1 {
        font-size: 28px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-links a {
        font-size: 14px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-section.left {
        flex: 1;
    }
    
    .footer-section.right {
        flex: 1;
    }
    
    .lightbox-nav {
        padding: 15px 20px;
        font-size: 36px;
    }
    
    .lightbox-thumbs .thumb {
        width: 50px;
        height: 50px;
    }
}
