#roomVoicePanel {
    position: absolute;
    z-index: 46;
    left: auto;
    right: 18px;
    top: 130px;
    width: 142px;
    padding: 5px;
    border: 1px solid rgba(82, 228, 255, .72);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(3, 24, 39, .96), rgba(3, 7, 17, .96));
    box-shadow: 0 0 4px #8ef5ff inset, 0 0 13px rgba(0, 210, 255, .58), 0 6px 14px rgba(0, 0, 0, .55);
    color: white;
    font-family: Arial, sans-serif;
    transform-origin: center;
}
#roomVoicePanel:before {
    content: "ROOM VOICE";
    display: block;
    margin: -1px 2px 4px;
    color: #8af3ff;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.6px;
    text-align: center;
    text-shadow: 0 0 7px #00d9ff;
}
.roomVoiceModes, .roomVoiceControls { display: flex; align-items: center; justify-content: center; gap: 4px; }
.roomVoiceModes button {
    display: none;
    min-width: 64px;
    height: 21px;
    padding: 0 5px;
    border: 1px solid #2c7189;
    border-radius: 6px;
    background: linear-gradient(#173c4b, #08161f);
    color: #9cb7c1;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
    text-shadow: 0 1px #000;
}
#roomVoicePanel.voice-master .roomVoiceModes button { display: block; }
.roomVoiceModes button span { color: #45eaff; font-size: 7px; }
.roomVoiceModes button.active {
    border-color: #85ffae;
    background: linear-gradient(#20b965, #07502d);
    color: #fff;
    box-shadow: 0 0 10px rgba(44, 255, 130, .8), 0 0 4px #c9ffdc inset;
}
.roomVoiceControls { margin-top: 4px; }
.roomVoiceControls button {
    position: relative;
    width: 30px;
    height: 30px;
    padding: 2px;
    overflow: hidden;
    border: 1px solid #40677c;
    border-radius: 50%;
    background: radial-gradient(circle, #17394a, #050b12 70%);
    opacity: .66;
    cursor: pointer;
}
.roomVoiceControls button img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 3px rgba(90, 226, 255, .75)); }
.roomVoiceControls button.selected { opacity: 1; border-color: #73ecff; box-shadow: 0 0 10px #00d9ff, 0 0 5px white inset; transform: scale(1.08); }
#roomVoiceDisable.selected { border-color: #ff6479; box-shadow: 0 0 10px #ff2148, 0 0 5px white inset; }
#roomVoiceStatus {
    width: 65px;
    color: #b4dce7;
    font-size: 7px;
    font-weight: 900;
    line-height: 10px;
    letter-spacing: .3px;
    text-align: center;
    text-shadow: 0 0 5px #000;
}
#roomVoicePanel.voice-live { border-color: #6dffad; box-shadow: 0 0 4px #caffde inset, 0 0 16px rgba(21, 255, 127, .75), 0 6px 14px rgba(0, 0, 0, .55); }
#roomVoicePanel.voice-live #roomVoiceStatus { color: #75ffac; text-shadow: 0 0 7px #00e66a; }
.roomVoiceAudio { display: none; }

#gameVoiceControls {
    position: absolute;
    z-index: 72;
    left: 211px;
    top: -96px;
    width: 62px;
    height: 30px;
    display: none;
    align-items: center;
    justify-content: space-between;
    pointer-events: auto;
}
#gameVoiceControls button {
    position: relative;
    width: 28px;
    height: 28px;
    box-sizing: border-box;
    padding: 2px;
    overflow: hidden;
    border: 1px solid rgba(82, 228, 255, .7);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, rgba(41, 105, 126, .98), rgba(3, 12, 22, .98) 72%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .82), 0 0 7px rgba(0, 217, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
    opacity: .66;
    cursor: pointer;
    transition: opacity .14s ease, transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
#gameVoiceControls button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 0 3px rgba(90, 226, 255, .78));
}
#gameVoiceControls button:hover { opacity: 1; transform: translateY(-1px); }
#gameVoiceControls button:active { transform: translateY(1px) scale(.96); }
#gameVoiceControls button.selected {
    opacity: 1;
    border-color: #73ecff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .82), 0 0 10px #00d9ff, inset 0 0 5px rgba(255, 255, 255, .75);
}
#gameVoiceDisable.selected {
    border-color: #ff6479;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .82), 0 0 10px #ff2148, inset 0 0 5px rgba(255, 255, 255, .68);
}

.roomVoiceSpeaking {
    position: absolute;
    z-index: 25;
    top: -2px;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    border: 1px solid rgba(117, 255, 172, .92);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(24, 205, 112, .96), rgba(2, 34, 28, .96) 72%);
    box-shadow: 0 0 5px rgba(21, 255, 127, .92) inset, 0 0 12px rgba(21, 255, 127, .92);
    font-size: 11px;
    line-height: 1;
    pointer-events: none;
}
.roomVoiceSpeaking.active {
    display: inline-flex;
    animation: roomVoiceSpeakingPulse .8s ease-in-out infinite alternate;
}
@keyframes roomVoiceSpeakingPulse {
    from { box-shadow: 0 0 4px rgba(21, 255, 127, .72) inset, 0 0 8px rgba(21, 255, 127, .72); }
    to { box-shadow: 0 0 7px rgba(21, 255, 127, 1) inset, 0 0 18px rgba(21, 255, 127, 1); }
}

/* Elite chat balloon: its highlight/glow follows the same cyan identity
   color instead of flashing a white inner shadow while the player speaks. */
.roomPlayerBalloon.bg3 {
    border-top-color: #04fefe !important;
    box-shadow: 0 0 0 1px rgba(0, 40, 55, .95),
                0 0 14px 4px rgba(4, 254, 254, .9),
                inset 0 1px 0 rgba(4, 254, 254, .9),
                inset 0 -10px 18px rgba(4, 180, 254, .18) !important;
}
