/* 座位样式 */
.seat {
    position: absolute;
    width: 100px;
    height: 60px;
    background: #444;
    border-radius: 30px;
    box-shadow: 0 2px 8px #0006;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.seat .name-edit {
    width: 70px;
    text-align: center;
    border: none;
    border-radius: 5px;
    padding: 2px 4px;
    margin-top: 4px;
    font-size: 14px;
    background: #fff;
    color: #222;
    cursor: pointer;
    position: relative;
}

.seat .name-edit[disabled] {
    background: #aaa;
    color: #666;
    cursor: not-allowed;
}

.seat .dropdown-list {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 120px;
    max-width: 300px;
    width: max-content;
    background: #fff;
    color: #222;
    border-radius: 5px;
    box-shadow: 0 2px 8px #0006;
    z-index: 10;
    max-height: 180px;
    overflow-y: auto;
    white-space: nowrap;
    padding: 4px 0;
}

.seat .dropdown-list.show {
    display: block;
}

.seat.dropdown-active {
    z-index: 100;
}

.seat .dropdown-group-title {
    font-weight: bold;
    padding: 6px 10px 2px 10px;
    color: #888;
    font-size: 13px;
}

.seat .dropdown-item {
    padding: 6px 10px;
    cursor: pointer;
    white-space: nowrap;
    border-left: 6px solid transparent;
    transition: background 0.2s, border-color 0.2s;
}

.seat .dropdown-item.song {
    border-left-color: #2980b9;
}

.seat .dropdown-item.outsider {
    border-left-color: #f1c40f;
}

.seat .dropdown-item.mongolia {
    border-left-color: #e74c3c;
}

.seat .dropdown-item.third {
    border-left-color: #27ae60;
}

.seat .dropdown-item:hover {
    background: #3498db;
    color: #fff;
}

.seat-number {
    font-weight: bold;
    font-size: 18px;
}

.seat.death,
.seat.suicide {
    background: #222;
    opacity: 0.6;
}

.seat.out {
    background: #222;
    opacity: 0.7;
}

.seat.flipped {
    box-shadow: 0 0 12px rgba(52, 152, 219, 0.6);
}

.seat.surrendered {
    box-shadow: 0 0 12px rgba(155, 89, 182, 0.6);
}

.seat.highlight {
    box-shadow: 0 0 16px 4px #ff3333, 0 2px 8px #0006;
    background: #a94442 !important;
    color: #fff !important;
}

.seat.selected-first {
    box-shadow: 0 0 16px 4px #27ae60, 0 2px 8px #0006;
    background: #556b55 !important;
    color: #fff !important;
}

.seat.selected-other {
    box-shadow: 0 0 16px 4px #f1c40f, 0 2px 8px #0006;
    background: #6b6255 !important;
    color: #fff !important;
}

.seat-votes {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 2px;
    margin-top: 2px;
    z-index: 2;
    pointer-events: none;
}

/* 身份计数按钮样式 */
.role-counter-toggle {
    position: absolute;
    right: -8px;
    top: -8px;
    width: 20px;
    height: 20px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.2s;
    padding: 6px 6px;
}

.role-counter-toggle:hover {
    background: #1f884b;
}

.role-counter-buttons {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    background: rgba(0,0,0,0.8);
    padding: 6px 8px;
    border-radius: 8px;
    z-index: 20;
    white-space: nowrap;
}

.role-counter-buttons.show {
    display: flex;
}

.role-counter-btn {
    padding: 3px 8px;
    border-radius: 4px;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 28px;
}

.role-counter-btn.negative {
    background: #3498db;
}

.role-counter-btn.negative:hover {
    background: #217dbb;
}

.role-counter-btn.positive {
    background: #27ae60;
}

.role-counter-btn.positive:hover {
    background: #1f884b;
}
