


/* --- ANA PANEL KONTEYNERI --- */
#voicePanel {
    position: absolute;
    top: 10px;
    z-index: 1;
    pointer-events: auto;
    display: none; /* JS ile açılacak */
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: right 0.05s linear;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* --- KULLANICI LISTESI VE SCROLLBAR --- */
#voice-users {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    max-height: 210px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

#voice-users::-webkit-scrollbar {
    width: 3px;
}

#voice-users::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

#voice-users::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 10px;
}

/* --- MIKROFON BUTONU (KONUŞ SATIRI) --- */
#micRow {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    background: rgba(0, 255, 136, 0.2);
    padding: 6px 12px;
    border-radius: 2px;
    border: 1px solid rgba(0, 255, 136, 0.5);
    margin-bottom: 5px;
    cursor: pointer;
    box-shadow: inset 0 0 10px rgba(0, 255, 136, 0.1);
    transition: all 0.2s ease-in-out;
    min-width: 130px; /* Yazı gidince daralmayı önlemek için sabit genişlik */
}

#micRow:hover {
    background: rgba(0, 255, 136, 0.3);
    border-color: rgba(0, 255, 136, 0.8);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
}

/* SESSİZ MOD (KIRMIZI) */
#micRow.muted {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.5);
}

#micRow.muted i {
    color: #FF4444 !important;
    filter: drop-shadow(0 0 5px rgba(255, 68, 68, 0.5));
}

/* BASILI TUTMA ANI (YEŞİL PARLAMA) */
#micRow:active {
    background: rgba(0, 255, 136, 0.4) !important;
    border-color: #00FF88 !important;
    transform: scale(0.98);
}

/* --- YAZI VE SES DALGALARI GECIŞI --- */
.mic-text {
    color: #FFF;
    font-family: 'Ubuntu', sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.8);
    display: block; /* Normalde görünür */
}

.voice-waves {
    display: none; /* Normalde gizli */
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 18px;
}

/* KONUŞURKEN YAZIYI GIZLE, DALGAYI GOSTER */
#micRow:not(.muted) .mic-text {
    display: none !important;
}

#micRow:not(.muted) .voice-waves {
    display: flex !important;
}
.voice-waves {
display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 2px; /* Çubuklar arası mesafeyi biraz daralttık */
    height: 20px;
    min-width: 100px; /* Barların kaplayacağı alan */
}

.wave {
    width: 3px; /* 22 tane sığması için genişliği 2px yaptık */
    background-color: #00ff88;
    border-radius: 1px;
    animation: wave-anim 0.5s ease-in-out infinite alternate;
    box-shadow: 0 0 3px rgba(0, 255, 136, 0.4);
}

/* 22 Bar için rastgele yükseklik ve gecikme döngüsü */
.wave:nth-child(3n) { animation-delay: 0.1s; height: 70%; }
.wave:nth-child(3n+1) { animation-delay: 0.3s; height: 100%; }
.wave:nth-child(3n+2) { animation-delay: 0.2s; height: 40%; }

/* Özel olarak birkaç tanesini daha farklı yapalım ki tam doğal dursun */
.wave:nth-child(5) { animation-delay: 0.4s; }
.wave:nth-child(11) { animation-delay: 0.15s; }
.wave:nth-child(17) { animation-delay: 0.25s; }

@keyframes wave-anim {
    from { height: 20%; }
    to { height: 100%; }
}
/* --- LISTEDEKI DIGER KONUŞANLAR --- */
.voice-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1px;
}

.voice-row span {
    color: #FFF;
    font-family: 'Ubuntu', sans-serif;
    font-size: 25px;
    font-weight: 700;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.voice-row i {
    color: #55EFFF; /* Konuşan diğerleri mavi */
    font-size: 35px;
    width: 25px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.voice-row.speaking i {
    filter: drop-shadow(0 0 8px rgba(85, 239, 255, 0.6));
    animation: speakPulse 0.4s infinite alternate;
    font-size: 25px;
}

@keyframes speakPulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}

/* Yazı başlangıçta görünür */
.mic-text {
    display: inline-block;
}

/* Dalgalar başlangıçta tamamen kapalı ve yer kaplamaz */
.voice-waves {
    display: none; 
}

/* --- BASILINCA (muted sınıfı silinince) --- */

/* 1. Yazıyı DOM'dan tamamen kaldır */
#micRow:not(.muted) .mic-text {
    display: none !important;
}

/* 2. Dalgaları yazıdan boşalan yere yerleştir */
#micRow:not(.muted) .voice-waves {
    display: flex !important;
    gap: 3px;
    height: 18px;
    align-items: flex-end;
}

/* Butonun boyutunun oynamaması için sabit genişlik verelim */
#micRow {
    min-width: 200px; 
    justify-content: flex-start;
}




/* Mevcut tasarıma dokunmadan sadece animasyon katmanı ekliyoruz */
.voice-row {
    overflow: hidden;
    transition: all 0.1s ease-in-out; /* Kayma hızı */
}

/* İlk eklendiği anki hali (Yükseklik yok, soldan dışarıda) */
.voice-row-init {
    max-height: 0 !important;
    opacity: 0 !important;
    transform: translateX(-20px);
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Animasyon bittiğinde orijinal haline döner */
.voice-row-active {
    max-height: 60px !important; /* Senin orijinal yüksekliğine göre ayarlandı */
    opacity: 1 !important;
    transform: translateX(0);
    margin-bottom: 2px !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}