/* Empire War 游戏的样式 */
.game-page {
    background-color: #f5f7fa;
}

/* 确保游戏内容区域使用正确的网格布局 */
.game-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

@media (min-width: 992px) {
    .game-content {
        grid-template-columns: 65fr 35fr; /* 更优化的比例：65%游戏区域，35%推荐区域 */
        align-items: start; /* 确保顶部对齐 */
    }
    
    /* 游戏主内容区域 */
    .game-main {
        display: flex;
        flex-direction: column;
    }
    
    /* 相关游戏卡片优化 */
    .related-games {
        align-self: flex-start; /* 从顶部开始对齐 */
        position: sticky;
        top: 20px;
    }
}

/* 调整游戏框架尺寸 */
.game-frame {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    position: relative;
    height: 480px;
    width: 100%;
    max-width: 100%;
}

.game-frame iframe {
    width: 100%;
    height: 480px;
    border: none;
}

.game-controls {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 15px;
}

.game-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #6d4c41 0%, #8d6e63 100%); /* 战争风格的褐色 */
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(141, 110, 99, 0.3);
}

.game-controls button i {
    margin-right: 8px;
}

.game-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(141, 110, 99, 0.4);
}

.game-description {
    margin-top: 30px;
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.game-description h2 {
    color: #5d4037; /* 帝国战争主题色 */
    margin-bottom: 15px;
    font-size: 24px;
}

.game-description h3 {
    color: #795548; /* 帝国战争次主题色 */
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 20px;
}

.game-description p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.game-description ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.game-description ul li {
    margin-bottom: 8px;
    color: #6c757d;
}

.social-share {
    margin-top: 30px;
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.social-share h3 {
    color: #5d4037;
    margin-bottom: 15px;
    font-size: 20px;
}

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

.share-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #795548;
    color: white;
    transition: all 0.3s ease;
}

.share-buttons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(121, 85, 72, 0.3);
}

.share-buttons a.facebook {
    background-color: #3b5998;
}

.share-buttons a.twitter {
    background-color: #1da1f2;
}

.share-buttons a.instagram {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

.share-buttons a.pinterest {
    background-color: #bd081c;
}

.game-comments {
    margin-top: 30px;
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.game-comments h3 {
    color: #5d4037;
    margin-bottom: 20px;
    font-size: 20px;
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    resize: none;
    height: 120px;
    font-family: inherit;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus {
    border-color: #8d6e63;
    outline: none;
}

.comment-form button {
    padding: 10px 24px;
    background: linear-gradient(135deg, #6d4c41 0%, #8d6e63 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form button:hover {
    background: linear-gradient(135deg, #5d4037 0%, #795548 100%);
}

.comments-list {
    margin-top: 20px;
}

.comment {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #8d6e63;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-header h4 {
    color: #5d4037;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.comment-date {
    color: #9e9e9e;
    font-size: 14px;
}

.comment-content p {
    color: #616161;
    line-height: 1.5;
    margin-bottom: 12px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-actions button {
    background: none;
    border: none;
    color: #8d6e63;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.comment-actions button:hover {
    color: #6d4c41;
}

/* 相关游戏样式 */
.related-games {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: fit-content;
}

.related-games h2 {
    color: #5d4037;
    margin-bottom: 20px;
    font-size: 22px;
    position: relative;
    padding-bottom: 10px;
    font-weight: 600;
}

.related-games h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #6d4c41, #a1887f);
    border-radius: 1.5px;
}

.related-games .games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.game-card {
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.03);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.game-card-image {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-card-image img {
    transform: scale(1.05);
}

.game-card-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #6d4c41 0%, #8d6e63 100%);
    color: white;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.game-card-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.game-card-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #5d4037;
}

.game-card-info p {
    color: #757575;
    font-size: 14px;
    margin-bottom: 15px;
}

.play-btn {
    display: inline-block;
    padding: 8px 0;
    background-color: #795548;
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(121, 85, 72, 0.3);
    text-align: center;
    width: 100%;
}

.play-btn:hover {
    background-color: #6d4c41;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(121, 85, 72, 0.4);
    color: white;
}

/* 响应式调整 */
@media (min-width: 768px) and (max-width: 991px) {
    .related-games .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .related-games .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .related-games {
        padding: 20px 15px;
    }
    
    .related-games h2 {
        font-size: 20px;
    }
}

/* 帝国战争截图样式 */
.city-screenshots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.city-screenshot {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.city-screenshot:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 帝国战争特有样式 */
.empire-war-game {
    font-family: 'Cinzel', serif;
}

.empire-war-game .game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #e8e0d5;
}

.empire-war-game .resources-bar {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(93, 64, 55, 0.8);
    border: 2px solid #8d6e63;
    color: white;
    padding: 8px;
    border-radius: 5px;
    z-index: 100;
    display: flex;
    gap: 15px;
}

.empire-war-game .resource {
    display: flex;
    align-items: center;
    gap: 5px;
}

.empire-war-game .resource i {
    font-size: 16px;
    color: #ffca28;
}

.empire-war-game .minimap {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 180px;
    height: 180px;
    background: rgba(93, 64, 55, 0.7);
    border: 2px solid #8d6e63;
    border-radius: 5px;
    overflow: hidden;
    z-index: 100;
}

.empire-war-game .units-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(93, 64, 55, 0.8);
    border: 2px solid #8d6e63;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.empire-war-game .unit-btn {
    width: 40px;
    height: 40px;
    background: #a1887f;
    border: 1px solid #8d6e63;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.empire-war-game .unit-btn:hover {
    background: #8d6e63;
    transform: scale(1.05);
}

.empire-war-game .unit-btn.active {
    background: #6d4c41;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.empire-war-game .game-map {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.empire-war-game .tile {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: #e8e0d5;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.empire-war-game .tile.grass {
    background-color: #a5d6a7;
}

.empire-war-game .tile.water {
    background-color: #90caf9;
}

.empire-war-game .tile.mountain {
    background-color: #bcaaa4;
}

.empire-war-game .tile.forest {
    background-color: #66bb6a;
}

.empire-war-game .tile:hover {
    filter: brightness(1.1);
}

.empire-war-game .building {
    position: absolute;
    z-index: 10;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.empire-war-game .unit {
    position: absolute;
    z-index: 20;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.empire-war-game .unit:hover {
    transform: scale(1.1);
}

.empire-war-game .unit.selected {
    box-shadow: 0 0 10px #ffca28;
}

.empire-war-game .game-hud {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(93, 64, 55, 0.8);
    border: 2px solid #8d6e63;
    color: white;
    padding: 10px;
    border-radius: 5px;
    width: 200px;
    z-index: 100;
}

.empire-war-game .game-hud h3 {
    margin-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
    font-size: 16px;
}

.game-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../../../assets/images/empire-war/loading.svg') center center no-repeat;
    background-size: 80px;
    background-color: rgba(93, 64, 55, 0.3);
    z-index: 10;
    animation: fadeOut 0.5s ease 1s forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

/* 媒体查询 - 移动设备适配 */
@media (max-width: 767px) {
    .city-screenshots {
        grid-template-columns: 1fr;
    }
    
    .game-frame, .game-frame iframe {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .game-controls {
        flex-direction: column;
    }
    
    .game-controls button {
        width: 100%;
    }
} 