* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(102, 126, 234, 0.1);
    padding: 15px 25px;
    border-radius: 15px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    justify-content: center;
    margin-bottom: 20px;
}

.control-group:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.control-group input[type="text"], 
.control-group input[type="number"] {
    padding: 8px 12px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
}

.control-group button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.control-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.game-settings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 20px 30px;
    border-radius: 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.settings-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.settings-right {
    display: flex;
    align-items: center;
}

.add-player-section {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.add-player-section:hover {
    opacity: 1;
}

.add-player-section input[type="text"] {
    padding: 6px 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 6px;
    font-size: 12px;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.8);
    color: #666;
    transition: all 0.3s ease;
}

.add-player-section input[type="text"]:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(255, 255, 255, 1);
    color: #333;
}

.add-player-section input[type="text"]::placeholder {
    color: #999;
    font-size: 11px;
}

.add-player-btn {
    background: rgba(102, 126, 234, 0.1) !important;
    color: #667eea !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.add-player-btn:hover {
    background: rgba(102, 126, 234, 0.2) !important;
    color: #5a67d8 !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.1) !important;
}

.custom-select {
    position: relative;
    display: inline-block;
}

.custom-select select {
    padding: 8px 35px 8px 15px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.custom-select select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.custom-select::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 12px;
    pointer-events: none;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s ease;
}

.custom-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
}

.custom-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.custom-checkbox label {
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

.game-areas {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.top-area {
    width: 100%;
}

.bottom-areas {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.area {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    min-height: 188px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.area[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

.area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.area.locked {
    background: rgba(200, 200, 200, 0.7);
    border-color: #bbb;
    pointer-events: none;
}

.area.locked .player {
    opacity: 0.5;
    cursor: not-allowed;
}

.area.locked h3 {
    color: #999;
}

.area.hidden {
    display: none;
}

/* 修复备战区显示逻辑 */
#readyArea {
    display: block;
}

#readyArea.hidden {
    display: none !important;
}

/* 当选人锁定时，玩家池隐藏但备战区保持可见 */
#playerPool.hidden {
    display: none;
}

/* 确保备战区在锁定状态下的样式 */
.area.selection-locked {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.area h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.game-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.team {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.team.team-blue {
    border-color: #4ecdc4;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.05), rgba(78, 205, 196, 0.02));
}

.team.team-red {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05), rgba(255, 107, 107, 0.02));
}

.team.locked {
    background: rgba(200, 200, 200, 0.3);
    border-color: #bbb;
    pointer-events: none;
}

.team.locked .player {
    opacity: 0.5;
    cursor: not-allowed;
}

.team.locked h4 {
    color: #999;
}

.team h4 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.team-blue h4 {
    color: #4ecdc4;
}

.team-red h4 {
    color: #ff6b6b;
}

.team-header {
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.1);
}

.team-budget {
    font-size: 0.9em;
    color: #666;
}

.player-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.player-slot {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    width: 288px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
    box-sizing: content-box;
    border: 2px dashed #ddd;
}

.player-slot.empty {
    color: #999;
    font-size: 0.75em;
}

.player-slot.empty::before {
    content: "拖拽到此";
    opacity: 0.6;
}

.player-slot.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.team-blue .player-slot {
    border-color: rgba(78, 205, 196, 0.3);
}

.team-blue .player-slot.dragover {
    border-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}

.team-red .player-slot {
    border-color: rgba(255, 107, 107, 0.3);
}

.team-red .player-slot.dragover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.player-slot .player {
    width: 292px;
    height: 104px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2px 6px;
}

.extra-players {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.extra-players-title {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
}

.player {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid #e9ecef;
    color: #333;
    padding: 6px 10px;
    margin: 0px 12px;
    border-radius: 12px;
    cursor: move;
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 292px;
    height: 104px;
    text-align: center;
    position: relative;
    user-select: none;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.player:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.player:hover .player-edit-btn {
    opacity: 1;
}

.player .player-name {
    font-weight: 600;
    font-size: 25px;
    margin-bottom: 2px;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 35px;
}

.player .player-score {
    margin-top: 10px;
    font-size: 20px;
    color: #7f8c8d;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    line-height: 1.2;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.player-score-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.score-text {
    font-size: 16px;
    color: #2c3e50;
    background: rgba(108, 117, 125, 0.15);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    width: 60px;
    height: 30px;
}

.player .player-edit-btn {
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.8);
    pointer-events: auto;
}

.player .player-edit-btn:hover {
    background: rgba(102, 126, 234, 0.2);
}

.captain-badge {
    display: inline-block;
    background-color: #ffed4e;
    color: #2c3e50;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    height: 30px;
    white-space: nowrap;
    width: 50px;
}

.overlay-team-player .captain-badge {
    display: none;
}

/* 编辑模态框样式 */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.edit-modal-content {
    background: white;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(102, 126, 234, 0.3);
    animation: editModalAppear 0.3s ease-out;
    min-width: 400px;
}

@keyframes editModalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.edit-modal h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.5em;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.edit-field label {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.edit-field input {
    padding: 10px 12px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.edit-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.edit-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.edit-buttons .button {
    min-width: 80px;
    padding: 10px 20px;
    font-size: 14px;
}

/* 游戏遮罩相关样式 */
.overlay-mole-selection {
    margin-top: 30px;
}

.overlay-mole-teams {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.overlay-mole-team {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    min-height: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.overlay-mole-team h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.4em;
    font-weight: 600;
}

.overlay-mole-player {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.3);
    color: #333;
    padding: 10px 15px;
    margin: 8px 5px;
    border-radius: 25px;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 1.1em;
    font-weight: 500;
    user-select: none;
}

.overlay-mole-player:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.overlay-mole-player.selected {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

/* 游戏进行中的全屏暗化遮罩 */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.game-overlay.active {
    display: flex;
}

.game-overlay-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    padding: 40px 60px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(102, 126, 234, 0.3);
    animation: gameOverlayAppear 0.5s ease-out;
    max-width: 80%;
    max-height: 80%;
    overflow-y: auto;
}

@keyframes gameOverlayAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.game-overlay h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2em;
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
}

.game-overlay h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.game-overlay p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.game-overlay .button {
    font-size: 1.2em;
    padding: 15px 30px;
    margin: 0 10px;
}

.game-overlay .button.danger {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
}

.game-overlay .button.danger:hover {
    background: linear-gradient(45deg, #ff5252, #ff7979);
}

.overlay-winner-selection {
    margin-top: 20px;
}

.overlay-winner-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

/* 确保内鬼选择界面层级正确 */
#moleSelectionContent {
    position: relative;
    z-index: 1;
}

.overlay-score-changes {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 900px;
}

.overlay-score-changes h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.score-change-teams {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.score-change-team {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    border: 2px solid rgba(0, 0, 0, 0.05);
}

.score-change-team h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

.score-change-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-direction: column;
    gap: 5px;
}

.score-change-player.positive {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.score-change-player.negative {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.3);
}

.score-change-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.score-change-details {
    font-size: 0.8em;
    color: #666;
    width: 100%;
    text-align: left;
}

.score-change-value {
    font-weight: bold;
    font-size: 0.9em;
}

.score-change-value.positive {
    color: #4caf50;
}

.score-change-value.negative {
    color: #f44336;
}

/* 游戏遮罩中的队伍显示 */
.overlay-teams-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
    max-width: 800px;
    width: 100%;
}

.overlay-team-display {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.overlay-team-display h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.4em;
    font-weight: 600;
}

.overlay-team-players {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.overlay-team-player {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #333;
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.overlay-team-player:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.overlay-team-player .player-name {
    font-weight: 600;
    color: #2c3e50;
}

.overlay-team-player .player-score {
    color: #7f8c8d;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    margin-left: 5px;
}



/* 投票结果显示样式 */
.mole-vote-results-display {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    margin-bottom: 15px;
}

.mole-vote-results-display h5 {
    margin-bottom: 10px;
    color: #3498db;
    font-size: 1.1em;
    text-align: center;
}

.vote-results-readonly {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 10px;
    min-height: 40px;
}

.vote-results-readonly .vote-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.vote-results-readonly .vote-result-item:last-child {
    border-bottom: none;
}

/* 内鬼选择区域样式 */
.mole-selection-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.mole-selection-section h5 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
    text-align: center;
    font-weight: 600;
}

/* 内鬼选择页面的列表样式 */
.mole-correct-players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.overlay-mole-player-row {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: #333;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 1em;
    font-weight: 500;
    user-select: none;
    width: 100%;
}

.overlay-mole-player-row:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.overlay-mole-player-row.selected {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.overlay-mole-player-row .player-info {
    font-weight: 600;
}

/* 移除之前的绿色样式 */
.mole-correct-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.mole-correct-section h5 {
    color: #333;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.mole-vote-indicator {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
}

.mole-vote-indicator.guessed {
    background: rgba(244, 67, 54, 0.2);
    color: #d32f2f;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.mole-vote-indicator.not-guessed {
    background: rgba(76, 175, 80, 0.2);
    color: #388e3c;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.mole-badge {
    display: inline-block;
    background: rgba(255, 107, 107, 0.2);
    color: #d32f2f;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 5px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* 游戏进行中时让容器变暗 */
.container.game-playing {
    filter: brightness(0.3);
    pointer-events: none;
}

#poolPlayers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    align-items: flex-start;
}

#readyPlayers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    align-items: flex-start;
}

.connection-status {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.connection-status.connected {
    border-color: rgba(76, 175, 80, 0.5);
}

.connection-status.disconnected {
    border-color: rgba(244, 67, 54, 0.5);
}

#connectionIndicator.connected {
    color: #4caf50;
}

#connectionIndicator.disconnected {
    color: #f44336;
}

.team-mole-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mole-vote-section,
.mole-correct-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.mole-vote-section h5,
.mole-correct-section h5 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1em;
    text-align: center;
}

.mole-vote-players,
.mole-correct-players {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.mole-vote-player {
    background: rgba(52, 152, 219, 0.2);
    border: 2px solid rgba(52, 152, 219, 0.3);
    color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
    user-select: none;
}

.mole-vote-player:hover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.mole-vote-player.voted {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.vote-results {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    min-height: 40px;
}

.vote-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.9em;
}

/* 投票条形图样式 */
.mole-vote-players-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.vote-player-row {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

.vote-player-row:hover {
    border-color: rgba(52, 152, 219, 0.5);
    background: rgba(52, 152, 219, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.vote-player-row.voted {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.vote-player-info {
    min-width: 150px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vote-player-info .player-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
    display: block;
    line-height: 1.3;
}

.vote-player-info .player-score {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: 2px;
    line-height: 1.3;
}

/* 投票结果显示样式 */
.vote-result-summary {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid rgba(52, 152, 219, 0.3);
}

.vote-result-summary h5 {
    margin-bottom: 10px;
    color: #3498db;
    font-size: 1.1em;
    text-align: center;
}

.vote-result-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.vote-result-top .player-name {
    font-size: 1.1em;
}

.vote-result-top .vote-count {
    color: #3498db;
    font-size: 1em;
}

.vote-buttons-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.vote-buttons-row .button {
    font-size: 14px;
    padding: 8px 16px;
}

.vote-buttons-row .clear-vote-btn {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.2);
    font-size: 12px;
    padding: 6px 12px;
    box-shadow: none;
}

.vote-buttons-row .clear-vote-btn:hover {
    background: rgba(0, 0, 0, 0.15);
    transform: none;
    box-shadow: none;
}

.button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
}

.button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.button:disabled {
    background: linear-gradient(45deg, #a0aec0, #cbd5e0);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.button.success {
    background: linear-gradient(45deg, #48bb78, #38a169);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.button.success:hover {
    background: linear-gradient(45deg, #38a169, #2f855a);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.button.danger {
    background: linear-gradient(45deg, #f56565, #e53e3e);
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.button.danger:hover {
    background: linear-gradient(45deg, #e53e3e, #c53030);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.4);
}

.button.lock {
    background: linear-gradient(45deg, #ed8936, #dd6b20);
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
}

.button.lock:hover {
    background: linear-gradient(45deg, #dd6b20, #c05621);
    box-shadow: 0 8px 25px rgba(237, 137, 54, 0.4);
}

.button.lock.active {
    background: linear-gradient(45deg, #48bb78, #38a169);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.button.lock.active:hover {
    background: linear-gradient(45deg, #38a169, #2f855a);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.button.random {
    background: linear-gradient(45deg, #9f7aea, #805ad5);
    box-shadow: 0 4px 15px rgba(159, 122, 234, 0.3);
}

.button.random:hover {
    background: linear-gradient(45deg, #805ad5, #6b46c1);
    box-shadow: 0 8px 25px rgba(159, 122, 234, 0.4);
}

@media (max-width: 768px) {
    .game-area {
        grid-template-columns: 1fr;
    }
    
    .bottom-areas {
        flex-direction: column;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .game-settings {
        flex-direction: column;
        gap: 20px;
    }
    
    .settings-left {
        justify-content: center;
    }
    
    .settings-right {
        justify-content: center;
    }
    
    .captain-info > div:first-child {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .player-slots {
        flex-direction: column;
        align-items: center;
    }
    
    .player-slot {
        width: 100px;
        height: 40px;
    }
    
    .player {
        width: 100px;
        height: 40px;
        padding: 4px 8px;
    }
    
    .player .player-name {
        font-size: 0.8em;
    }
    
    .player .player-score {
        font-size: 0.65em;
    }
    
    #poolPlayers,
    #readyPlayers {
        justify-content: center;
    }

    .score-change-player {
        min-width: unset;
    }

    .vote-player-info {
        min-width: 100px;
    }

    .vote-bar {
        min-width: 120px;
    }
}

.captain-info {
    margin-top: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 3px solid rgba(102, 126, 234, 0.15);
}

.captain-info > div:first-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    text-align: center;
}

.captain-info > div:first-child > div {
    padding: 20px;
    border-radius: 15px;
    font-size: 1.1em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.captain-info > div:first-child > div:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.captain-info > div:first-child > div:first-child {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(78, 205, 196, 0.05));
    border: 2px solid rgba(78, 205, 196, 0.25);
}

.captain-info > div:first-child > div:last-child {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 107, 107, 0.05));
    border: 2px solid rgba(255, 107, 107, 0.25);
}

.budget-info {
    font-size: 0.9em;
    margin-top: 10px;
    color: #666;
    font-weight: 500;
}

.budget-warning {
    color: #e74c3c;
    font-weight: bold;
}

.budget-ignored {
    color: #999;
    font-weight: normal;
    text-decoration: line-through;
}

.vote-bar {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    height: 40px;
    flex: 1;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 200px;
}

.vote-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    transition: all 0.4s ease;
    border-radius: 7px;
}

.vote-count {
    position: relative;
    z-index: 2;
    font-weight: 600;
    font-size: 1em;
    color: #2c3e50;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    padding-right: 12px;
}


.captain-btn {
    margin-left: 10px;
    font-size: 0.9em;
    padding: 4px 12px;
    border-radius: 8px;
    background: linear-gradient(45deg, #ffd700, #ffec8b);
    color: #b8860b;
    border: 1px solid #ffe066;
    box-shadow: none;
    font-weight: bold;
}
.captain-btn:hover {
    background: linear-gradient(45deg, #ffe066, #ffd700);
    color: #a67c00;
}

/* 拖拽相关样式增强 */
.player.dragging {
    opacity: 0.7;
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: #667eea;
}

.drop-zone {
    border: 2px dashed rgba(102, 126, 234, 0.3);
    background: rgba(102, 126, 234, 0.05);
    transition: all 0.3s ease;
}

.drop-zone.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    transform: scale(1.02);
}

/* 右键点击上下文菜单样式 */
.context-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.3);
    z-index: 10001;
    min-width: 150px;
    padding: 8px 0;
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #333;
}

.context-menu-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.context-menu-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 4px 0;
}

/* 玩家右键点击状态 */
.player.context-active {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 确保拖拽时的层级和可见性 */
.player[draggable="true"] {
    cursor: grab;
}

.player[draggable="true"]:active {
    cursor: grabbing;
}

/* 拖拽占位符样式 */
.drag-placeholder {
    background: rgba(102, 126, 234, 0.1);
    border: 2px dashed rgba(102, 126, 234, 0.4);
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 0.9em;
    font-weight: 500;
}

.drag-placeholder::before {
    content: "拖拽到此处";
}

#scoreChangesContent {
    width: 900px;
}