/* 大逃杀游戏样式 */
.battle-royale-game {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.game-status {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 游戏信息栏 */
.game-info-bar {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 状态栏样式 */
.status-item {
    margin: 0;
    font-size: 14px;
    font-weight: normal;
}

/* 山峰格子悬停效果 */
.mountain-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.waiting-area, .user-info, .room-selection, .game-result, .game-history {
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.room-card {
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.room-card.bg-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
}

.room-card.bg-light {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* 倒计时动画 */
@keyframes countdown {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#countdown {
    animation: countdown 1s infinite;
    font-weight: bold;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

/* 地图容器 */
.map-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 5px;
    border: 2px solid #333;
    background-image: url('/gmap/beijing.png');
    background-size: cover;
    background-position: center;
    padding: 10px;
}

/* 删除多余的页面导航栏 */
.page-header {
    display: none !important;
}

/* 战国七雄地图 */
.warring-states-map {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 山峰布局 */
.mountain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    height: auto;
    padding: 10px;
}

/* 单元格 */
.mountain-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    aspect-ratio: 1/1;
    background-color: #f5f5f5;
}

/* 山峰背景图 */
.mountain-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #ffffff;
}

.mountain-image.wudangshan {
    background-image: url('/gmap/wudangshan.png');
}

.mountain-image.longhushan {
    background-image: url('/gmap/longhushan.png');
}

.mountain-image.qingchengshan {
    background-image: url('/gmap/qingchengshan.png');
}

.mountain-image.qiyunshan {
    background-image: url('/gmap/qiyunshan.png');
}

.mountain-image.sanqingshan {
    background-image: url('/gmap/sanqingshan.png');
}

.mountain-image.laojunshan {
    background-image: url('/gmap/laojunshan.png');
}

/* 山峰名称 */
.mountain-name {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 10;
    font-size: 14px;
}

/* 状态栏样式 */
.mountain-status {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 被击败国家的样式 */
.mountain-status.defeated {
    color: red;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .map-container {
        padding: 5px;
    }
    
    .mountain-grid {
        gap: 5px;
        padding: 5px;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
    
    .mountain-item {
        aspect-ratio: 1/1;
    }
    
    .mountain-name {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .mountain-status {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* 更小屏幕的适配 */
@media (max-width: 480px) {
    .mountain-name {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .mountain-status {
        font-size: 8px;
        padding: 2px 4px;
    }
}






/* 房间闪烁动画 */
@keyframes roomBlink {
    0% { background-color: #f8d7da; }
    50% { background-color: #dc3545; }
    100% { background-color: #f8d7da; }
}

.room-info.blink {
    animation: roomBlink 1s 3;
}

/* 游戏布局表格 */
.game-layout {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.game-layout td {
    border: 2px solid #007bff;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

.game-layout .corridor {
    width: 60px;
    background-color: #f8f9fa;
    position: relative;
    border: 2px solid #007bff;
    border-left: none;
    border-right: none;
}

.game-layout .corridor:first-child {
    border-left: 2px solid #007bff;
}

.game-layout .corridor:last-child {
    border-right: 2px solid #007bff;
}

.room-info {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    padding: 10px;
    min-height: 120px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-status .row {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .game-status .row > div {
        flex: 0 0 auto;
        margin-right: 15px;
        margin-bottom: 0 !important;
    }
    
    .user-info .row {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .user-info .row > div {
        flex: 0 0 auto;
        margin-right: 15px;
        margin-bottom: 0 !important;
    }
    
    h4 {
        font-size: 1.2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .form-control-lg {
        font-size: 1rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
        width: 100%;
    }
    
    /* 调整卡片间距 */
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    /* 调整内边距 */
    .p-4 {
        padding: 1.5rem !important;
    }
    
    /* 游戏布局表格响应式 */
    .game-layout {
        font-size: 14px;
    }
    
    .game-layout td {
        padding: 5px;
    }
    
    .game-layout .corridor {
        width: 40px;
    }
    
    .room-info {
        padding: 5px;
        min-height: 100px;
    }
    
    /* 确保加入房间表单在手机上正常显示 */
    .room-selection {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* 更小屏幕的适配 */
@media (max-width: 480px) {
    h4 {
        font-size: 1.1rem;
    }
    
    .p-4 {
        padding: 1rem !important;
    }
    
    .game-layout {
        font-size: 12px;
    }
    
    .game-layout td {
        padding: 3px;
    }
    
    .game-layout .corridor {
        width: 30px;
    }
    
    .room-info {
        min-height: 80px;
    }
}

/* 游戏规则样式 */
.game-rules {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* 游戏结果样式 */
.game-result {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

/* 游戏历史记录样式 */
.game-history {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
}

/* 排行榜样式 */
.leaderboard {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

.leaderboard-table th {
    background-color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
}

.leaderboard-table tr:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.leaderboard-table .rank-1 {
    background-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-table .rank-2 {
    background-color: rgba(192, 192, 192, 0.3);
}

.leaderboard-table .rank-3 {
    background-color: rgba(205, 127, 50, 0.3);
}

/* 组团功能样式 */
.team-section {
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.team-member {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.team-member.leader {
    border-left: 4px solid #ffc107;
}

.invite-form {
    margin-top: 15px;
}

.invite-form input {
    margin-right: 10px;
}

/* 团员列表样式 */
.team-members-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.team-member-slot {
    border: 2px dashed #ccc;
    border-radius: 8px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
}

.member-placeholder {
    color: #999;
    font-size: 14px;
}

.team-member-slot .team-member {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.team-member-slot .team-member img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.team-member-slot .team-member .member-name {
    font-size: 12px;
    text-align: center;
    word-break: break-all;
}