/* 大厅列表 */
.lobby-list-section {
    margin-top: 20px;
}

.lobby-list-section h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.lobby-list {
    max-height: 300px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    padding-right: 4px;
}

.lobby-item {
    padding: 15px;
    margin: 0;
    background: #f5f5f5;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.lobby-item:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.lobby-item.game-playing {
    background: #fff3cd;
    border-color: #ffc107;
}

.lobby-item.full {
    background: #f8d7da;
    border-color: #dc3545;
    cursor: not-allowed;
}

.lobby-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lobby-item-id {
    font-weight: 600;
    color: #333;
}

.lobby-item-players {
    font-size: 0.9em;
    color: #666;
}

.lobby-item-players.game-playing {
    color: #856404;
}

.lobby-item-players.full {
    color: #721c24;
}

.lobby-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 0.85em;
    color: #666;
}

.player-tag {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
}

.player-tag.ready {
    background: #d4edda;
    color: #155724;
}

.no-lobbies {
    text-align: center;
    color: #666;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

#lobbySetup .card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px 30px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

#waitingScreen .card {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

#lobbySetup .card h2,
#lobbySetup .card #errorMessage {
    grid-column: 1 / -1;
}

#lobbySetup .card .input-group,
#lobbySetup .card .button-group,
#lobbySetup .card #lobbyListSection,
#lobbySetup .card #manualJoinGroup {
    width: 100%;
}

#lobbySetup .card .button-group {
    justify-content: flex-start;
}

#manualJoinGroup button {
    margin-top: 10px;
}

.scoreboard-section {
    display: block;
    width: 100%;
    max-width: 960px;
    margin: 25px auto 0;
    padding: 0 10px 30px;
}

.scoreboard-header {
    text-align: center;
    margin-bottom: 16px;
}

.scoreboard-header h3 {
    margin: 0;
    font-size: 1.4em;
}

.scoreboard-header p {
    margin: 6px 0 0;
    color: #555;
    font-size: 0.95em;
}

.scoreboard-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.scoreboard-column {
    background: #fdfdfd;
    border-radius: 18px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    padding: 18px;
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.12);
}

.scoreboard-column-title {
    font-weight: 600;
    color: #1f2a44;
    margin-bottom: 12px;
}

.scoreboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scoreboard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.scoreboard-player {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scoreboard-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}

.scoreboard-name {
    font-weight: 600;
    color: #222;
}

.scoreboard-time {
    font-size: 0.8em;
    color: #888;
}

.scoreboard-value {
    font-weight: 600;
    color: #4a5568;
    min-width: 70px;
    text-align: right;
}

.scoreboard-empty {
    text-align: center;
    padding: 16px 0;
    color: #777;
    font-size: 0.9em;
}
