.room-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 10px;
    padding: 20px;
    color: white;
    z-index: 10000;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 1px solid #555;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
}

.room-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-room {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

.close-room:hover {
    color: #ff4444;
}

.room-content {
    margin-bottom: 20px;
}

.room-input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.room-input-group input {
    padding: 12px;
    border: 1px solid #555;
    background: #333;
    color: white;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 1px;
}

.room-input-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.room-buttons {
    display: flex;
    gap: 10px;
}

.room-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

#createRoomBtn {
    background: #4CAF50;
    color: white;
}

#createRoomBtn:hover {
    background: #45a049;
}

#joinRoomBtn {
    background: #2196F3;
    color: white;
}

#joinRoomBtn:hover {
    background: #0b7dda;
}

.room-status {
    border-top: 1px solid #555;
    padding-top: 15px;
}

.room-info {
    background: #333;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.room-info p {
    margin: 0;
    font-size: 14px;
}

.room-info strong {
    color: #4CAF50;
    font-size: 16px;
    letter-spacing: 1px;
}

.players-list {
    margin-bottom: 15px;
    max-height: 250px;
    overflow-y: auto;
}

.players-list h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.player-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    background: #333;
    border-radius: 5px;
}

.player-item.my-player {
    background: #4CAF50;
    color: white;
}

.player-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
}

.player-name {
    flex: 1;
    font-size: 14px;
}

.player-status {
    font-size: 12px;
}

.room-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.room-controls button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

#readyBtn {
    background: #2196F3;
    color: white;
}

#readyBtn.ready {
    background: #ff9800;
}

#startGameBtn {
    background: #4CAF50;
    color: white;
}

#resetGameBtn {
    background: #f44336;
    color: white;
}

#leaveRoomBtn {
    background: #9e9e9e;
    color: white;
}

/* 遮罩层 */
.room-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}
/* 玩家状态显示增强 */
.player-item .player-status {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
}

.player-item .player-status.ready {
    background: #4CAF50;
}

.player-item .player-status.waiting {
    background: #ff9800;
}

.player-item .player-status.computer {
    background: #9e9e9e;
}

/* 当前回合高亮 */
.current-turn {
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}