/*styles.css
/* Ana Düzen */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #36393f;
    color: #fff;
}

#container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
#sidebar {
    width: 250px;
    background-color: #2f3136;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
}

#sidebar h2 {
    text-align: center;
    margin: 0 0 10px 0;
    font-size: 1.2em;
    border-bottom: 1px solid #23272a;
    padding-bottom: 10px;
}

#channelList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#channelList li {
    padding: 10px;
    margin-bottom: 5px;
    background-color: #40444b;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#channelList li.active,
#channelList li:hover {
    background-color: #7289da;
}

#channelUserList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#channelUserList li {
    padding: 5px 10px;
    border-bottom: 1px solid #23272a;
}

/* Main Content */
#mainContent {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #36393f;
}

#chatArea {
    width: 1700px;
    /* Sabit genişlik (örnek) */
    height: 650px;
    /* Sabit yükseklik (örnek) */
    overflow-y: auto;
    /* Fazladan içerik için dikey kaydırma */
    background-color: #40444b;
    margin: 0 auto;
    /* Ortalamak isterseniz */
    padding: 10px;
    box-sizing: border-box;
}

.chat-message {
    text-align: left;
    margin-bottom: 10px;
    padding: 8px;
    background-color: #2f3136;
    border-radius: 4px;
    color: #fff;
}

.chat-message img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 5px;
}

#pastePreviewContainer {
    display: none;
    /* Başlangıçta gizli */
    margin: 5px;
    padding: 5px;
    border: 1px dashed #ccc;
    min-height: 50px;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Her preview öğesi için wrapper */
.preview-item {
    width: 80px;
    height: 80px;
    position: relative;
}

/* Resim veya video */
.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

/* Kapatma butonu: Sağ üst köşe */
.preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    cursor: pointer;
    z-index: 2;
}

/* Chat Input */
#chatInputContainer {
    display: flex;
    align-items: center;
    background-color: #2f3136;
    border-top: 1px solid #23272a;
    padding: 10px;
    gap: 5px;
}

#message {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    outline: none;
}

#uploadBtn,
#sendBtn {
    padding: 8px 10px;
    background-color: #7289da;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

#uploadBtn:hover,
#sendBtn:hover {
    background-color: #677bc4;
}

#hiddenMediaInput {
    display: none;
}

#pastePreview,
#pasteVideoPreview {
    max-width: 80px;
    max-height: 80px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

/* VoiceAreaFixed: Nick solda, daire sağda */
#voiceAreaFixed {
    position: fixed;
    bottom: 10px;
    /* Control panelin altında kalsın */
    left: 10px;
    background-color: #2f3136;
    border-radius: 4px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    /* Control panel 10000, bu 9999 */
    /* Genişlik vererek chat inputun altına kaymamasını sağlayabilirsiniz */
    width: 120px;
    justify-content: space-between;
    /* Nick solda, daire sağda */
}



#voiceAreaFixed #voiceIndicator {
    width: 40px;
    height: 40px;
    border: 3px solid gray;
    border-radius: 50%;
    transition: border-color 0.3s;
}

#voiceAreaFixed #voiceIndicator.speaking {
    border-color: green;
}

/* Nick solda */
#voiceAreaFixed #nicknameDisplay {
    font-weight: bold;
    font-size: 14px;
    margin-right: auto;
    /* it to left side */
    /* Kenar boşlukları */
    margin-right: auto;
}

/* Ekran Paylaşımı */
#screenVideos {
    padding: 10px;
    background-color: #2f3136;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow-y: auto;
}

#screenVideos video {
    width: 300px;
    border: 2px solid #000;
    background: #000;
}

/* Kontrol Paneli */
#controlPanel {
    position: fixed;
    bottom: 80px;
    left: 10px;
    background-color: rgba(47, 49, 54, 0.9);
    padding: 10px;
    border-radius: 4px;
    z-index: 10000;
    display: none;
    /* Kanala girince gösterirsiniz */
    gap: 5px;
    align-items: center;
}

/* Butonlar */
#controlPanel button {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #fff;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    /* Hover efekti için transition */
    transition: background-color 0.2s, transform 0.2s;
    text-align: center;
    line-height: 40px;
    /* İkonu dikey ortalar */
}

/* Hover efekti: buton biraz büyür, arka plan değişir */
#controlPanel button:hover {
    background-color: #40444b;
    transform: scale(1.1);
}

/* Tooltip (data-title) */
#controlPanel button::after {
    content: attr(data-title);
    display: none;
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    font-size: 12px;
    padding: 5px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}

#controlPanel button:hover::after {
    display: block;
    z-index: 9999;
}

/* Mic Sensitivity benzer yapı */
#micSensitivityControl {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

#micSensitivityControl i {
    font-size: 18px;
    cursor: pointer;
    color: #fff;
}

#micSensitivitySlider {
    width: 60px;
    cursor: pointer;
}

#micSensitivityControl::after {
    content: attr(data-title);
    display: none;
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    font-size: 12px;
    padding: 5px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}

#micSensitivityControl:hover::after {
    display: block;
    z-index: 9999;
}

/* Connection Indicator */
#connectionIndicator {
    position: absolute;
    bottom: 55px;
    margin-left: 5px;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    background: red;
    color: white;
}

/* Context Menu */
#contextMenu {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    padding: 5px;
    z-index: 20000;
    border-radius: 4px;
}

#contextMenu label {
    font-size: 12px;
    color: #000;
}

#contextMenu input {
    margin-left: 5px;
}

/* Lightbox */
#lightboxOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    cursor: pointer;
}

/* Temp Message */
.temp-message {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    z-index: 9999;
    opacity: 0.9;
}

/* Remote Audio */
.remoteAudio {
    display: none;
}

/* Ses Paneli Popup */
#soundPanel {
    position: fixed;
    /* Yukarı doğru açılması için top'u JS'de hesaplayacağız */
    width: 400px;
    height: 300px;
    background-color: #2f3136;
    border: 1px solid #23272a;
    border-radius: 4px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

/* Panel Header */
#soundPanelHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    background-color: #40444b;
    border-bottom: 1px solid #23272a;
}

#soundPanelHeader h3 {
    margin: 0;
    font-size: 1em;
}

#addSoundBtn {
    background: #7289da;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    padding: 5px 10px;
}

/* Sound volume slider (panelin üst kısmında) */
#soundVolumeControl {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

#soundVolumeControl label {
    font-size: 12px;
}

#soundVolumeSlider {
    width: 60px;
    cursor: pointer;
    display: none;
    /* Varsayılan kapalı */
}

/* Sound grid */
#soundGrid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 80px;
    gap: 5px;
    padding: 10px;
}

/* Sound cell hover effect */
.sound-cell {
    background-color: #36393f;
    border: 1px solid #23272a;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.sound-cell:hover {
    background-color: #40444b;
    transform: scale(1.05);
}

.sound-emote {
    font-size: 24px;
    margin-bottom: 5px;
}

.sound-name {
    font-size: 14px;
}

/* Add New Sound Modal */
#soundAddModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#soundAddModalContent {
    background: #2f3136;
    padding: 20px;
    border-radius: 4px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#soundAddModalContent label {
    font-size: 14px;
}