/* 游戏页面专用样式 */

/* 头部导航 */
.game-page header {
    text-align: left;
    margin-bottom: 2rem;
}

/* 游戏页面头部带背景图 */
.game-header {
    position: relative;
    padding: 2rem;
    border-radius: 20px;
    overflow: hidden;
    color: white;
    margin-bottom: 2rem;
}

.game-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    z-index: 0;
}

.game-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.8));
    z-index: 1;
}

.game-header-content {
    position: relative;
    z-index: 2;
}

.nav-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: white;
    text-decoration: none;
    margin-right: 1rem;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 1;
}

.back-link:before {
    content: '←';
    margin-right: 0.5rem;
}

.game-tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* 游戏容器 */
.game-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 992px) {
    .game-container {
        grid-template-columns: 2fr 1fr;
    }
}

/* 游戏框架 */
.game-frame-container {
    position: relative;
    width: 100%;
    box-shadow: 0 4px 15px var(--apple-shadow);
    border-radius: 20px;
    overflow: hidden;
}

.game-frame-container:before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9宽高比 */
}

.game-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background-color: #000;
    z-index: 2;
}

/* 特定游戏框架样式 */
.game-frame-monster {
    background: linear-gradient(135deg, var(--monster-survivors-color), #6B4E9D);
    position: relative;
}

.game-frame-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.monster-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.top-left {
    top: 10px;
    left: 10px;
}

.top-right {
    top: 10px;
    right: 10px;
}

.bottom-left {
    bottom: 10px;
    left: 10px;
}

.bottom-right {
    bottom: 10px;
    right: 10px;
}

.game-frame-container:hover .monster-icon {
    opacity: 0;
}

/* 全屏按钮 */
.fullscreen-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 3;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    opacity: 0;
}

.game-frame-container:hover .fullscreen-btn {
    opacity: 1;
}

.fullscreen-btn:hover {
    background-color: var(--apple-blue);
    transform: scale(1.05);
}

/* 游戏描述 */
.game-description-container {
    background: var(--apple-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 10px var(--apple-shadow);
}

.game-description-container h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--apple-text-primary);
}

.game-description {
    margin-bottom: 2rem;
}

.game-description p {
    margin-bottom: 1rem;
}

.game-description ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.game-description li {
    margin-bottom: 0.5rem;
}

/* 游戏控制说明 */
.game-controls {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--apple-background);
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
}

.key {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--apple-blue);
}

.action {
    font-size: 0.9rem;
    color: var(--apple-text-secondary);
}

/* 相关游戏 */
.related-games {
    margin-bottom: 3rem;
}

.related-games h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .game-header {
        padding: 1.5rem;
    }
    
    .game-frame-container:before {
        padding-top: 75%; /* 移动端更高的比例 */
    }
    
    .game-controls {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-description-container {
        padding: 1.5rem;
    }
} 