/* =============================================
   Legend Speak - Ana Stil Dosyasi
   Koyu tema, modern, basit
   ============================================= */

/* ---------- Reset & Genel ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary:   #0a0a0a;
    --bg-secondary: #141414;
    --bg-card:      #1a1a1a;
    --bg-hover:     #252525;
    --text-primary: #e8e8e8;
    --text-secondary: #888888;
    --accent:       #FFA800;
    --accent-hover: #e69700;
    --danger:       #ed4245;
    --success:      #3ba55d;
    --border:       #2a2a2a;
    --radius:       8px;
    --radius-lg:    12px;
    --font:         'Segoe UI', system-ui, -apple-system, sans-serif;
    --sidebar-width: 260px;
    --desktop-titlebar-height: 36px;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}
body {
    display: flex;
    flex-direction: column;
}

/* ---------- Tauri: ozel baslik cubugu (decorations: false) ---------- */
.desktop-titlebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--desktop-titlebar-height);
    z-index: 5000;
    flex-shrink: 0;
    align-items: stretch;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    user-select: none;
    -webkit-user-select: none;
}
html.tauri-desktop .desktop-titlebar {
    display: flex;
}
html.tauri-desktop body {
    padding-top: var(--desktop-titlebar-height);
    box-sizing: border-box;
}
html.tauri-desktop,
html.tauri-desktop body {
    height: 100%;
    outline: none;
    border: none;
    box-shadow: none;
}
.desktop-titlebar-drag {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    cursor: default;
}
.desktop-titlebar-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    pointer-events: none;
}
.desktop-titlebar-controls {
    display: flex;
    flex-shrink: 0;
}
.desktop-titlebar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 100%;
    min-height: var(--desktop-titlebar-height);
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
    padding: 0;
}
.desktop-titlebar-btn:hover {
    background: var(--bg-hover);
}
.desktop-titlebar-btn.desktop-titlebar-close:hover {
    background: #c42b2b;
    color: #fff;
}
.desktop-titlebar-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Ekran Yonetimi ---------- */
.screen {
    display: none;
    height: 100%;
    flex-direction: column;
}
.screen.active {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* app-main: oda listesi + sohbet odasi + arkadas sidebar (auth disinda) */
.app-main {
    display: flex;
    flex: 1;
    flex-direction: row;
    min-height: 0;
    height: 100%;
}
.app-main.hidden {
    display: none !important;
}
.app-main .screen {
    flex: 1;
    min-width: 0;
}
.app-main .screen.active {
    display: flex;
    flex: 1;
}

/* ---------- Gizle / Goster ---------- */
.hidden { display: none !important; }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg-hover); }

.btn-danger {
    background: var(--danger);
    color: #fff;
}

/* Oda topbar: Geri, Odayı Kilitle, Odayı sil – sola yaslı, tüm butonlarda tam radius */
.room-topbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
}
.room-topbar-left .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: var(--radius);
    padding: 5px 10px;
    font-size: 12px;
}
.room-topbar-left .room-topbar-btn-icon svg {
    width: 16px;
    height: 16px;
}

.room-topbar {
    position: relative;
}
.room-topbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    margin: 0 12px;
}
.room-topbar-center .room-topbar-title {
    margin: 0;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}
.room-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Oda içi: Geri butonu – kırmızı dolu, yazı ve ok beyaz */
.room-back-btn {
    background: var(--danger) !important;
    color: #fff !important;
    border-color: var(--danger) !important;
}
.room-back-btn:hover {
    background: #d63639 !important;
    color: #fff !important;
    border-color: #d63639 !important;
}
.room-back-btn .room-topbar-btn-icon svg {
    fill: currentColor;
}

/* Oda içi: Oda Ayarları butonu (sarı outline, kilitle ile aynı stil) */
.room-settings-btn.btn-outline {
    color: var(--accent);
    border-color: var(--accent);
}
.room-settings-btn.btn-outline:hover {
    background: rgba(255, 168, 0, 0.1);
    color: var(--accent);
}

/* Oda içi: Odayı Kilitle butonu (Odayı sil ile aynı outline stili, sarı vurgu) */
.room-lock-btn.btn-outline {
    color: var(--accent);
    border-color: var(--accent);
}
.room-lock-btn.btn-outline:hover {
    background: rgba(255, 168, 0, 0.1);
    color: var(--accent);
}

/* Oda içi: Odayı sil butonu (aynı outline stili, kırmızı vurgu) */
.room-delete-btn.btn-outline {
    color: var(--danger);
    border-color: var(--danger);
}
.room-delete-btn.btn-outline:hover {
    background: rgba(237, 66, 69, 0.1);
    color: var(--danger);
}

/* Oda ayarları paneli (soldan açılır) */
.room-settings-panel {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    justify-content: flex-start;
    pointer-events: none;
}
.room-settings-panel.hidden {
    display: none;
}
.room-settings-panel:not(.hidden) {
    pointer-events: auto;
}
.room-settings-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.room-settings-panel:not(.hidden) .room-settings-panel-backdrop {
    opacity: 1;
}
.room-settings-panel-inner {
    position: relative;
    width: min(320px, 90vw);
    max-width: 100%;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1;
}
.room-settings-panel:not(.hidden) .room-settings-panel-inner {
    transform: translateX(0);
}
.room-settings-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}
.room-settings-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.room-settings-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}
.room-settings-panel-close:hover {
    color: var(--text-primary);
}
.room-settings-panel-body {
    padding: 16px;
    overflow-y: auto;
}
.room-settings-section {
    margin-bottom: 20px;
}
.room-settings-section:last-child {
    margin-bottom: 0;
}
.room-settings-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}
.room-settings-name-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.room-settings-name-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
}
.room-settings-name-input:focus {
    border-color: var(--accent);
    outline: none;
}
.room-settings-error {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--danger);
}

.btn-small {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-icon {
    padding: 6px 10px;
    line-height: 1;
}
.btn-icon svg {
    display: block;
    vertical-align: middle;
}

/* Mesajlar butonu: tam daire, sarı arka plan, ikon dolu beyaz */
.dm-open-btn-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.dm-open-btn-icon:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}
.dm-open-btn-icon svg {
    fill: #fff;
}

.btn-round {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 24px;
    padding: 0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- Form ---------- */
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus {
    border-color: var(--accent);
}

/* ---------- Auth Ekrani ---------- */
#auth-screen {
    align-items: center;
    justify-content: center;
}
.auth-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: 680px;
    padding: 40px 32px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    text-align: center;
}
.auth-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 48px;
    border-right: 1px solid var(--border-color, rgba(255,255,255,0.08));
    min-width: 0;
    flex: 0 0 36%;
    max-width: 240px;
}
.auth-right {
    flex: 1;
    min-width: 0;
    padding-left: 48px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-right .auth-form,
.auth-right .error-msg {
    width: 100%;
}
.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}
.logo-auth {
    width: 100%;
    height: auto;
    max-width: 200px;
    object-fit: contain;
}
.logo-auth-mobile {
    display: none;
}
.auth-form h2 {
    font-size: 18px;
    margin-bottom: 18px;
}
.auth-form .btn {
    width: 100%;
    margin-top: 4px;
}
.form-switch {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-secondary);
}
.auth-right .form-switch,
.auth-right .form-switch.form-link-row {
    text-align: center;
}
.error-msg {
    margin-top: 14px;
    padding: 10px;
    background: rgba(237, 66, 69, 0.15);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    color: var(--danger);
    font-size: 13px;
}

/* ---------- Hos geldin (web: indir / tarayici) ---------- */
#welcome-screen {
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}
.welcome-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: 860px;
    padding: 40px 36px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    gap: 0;
}
.welcome-left {
    flex: 0 0 48%;
    min-width: 240px;
    padding-right: 34px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.welcome-logo {
    width: 100%;
    max-width: 236px;
    height: auto;
    object-fit: contain;
    margin-bottom: 16px;
}
.welcome-logo-mobile {
    display: none;
}
.welcome-tagline {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 0;
    max-width: 320px;
}
.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 352px;
}
.welcome-dl-btn {
    width: 100%;
    justify-content: center;
    gap: 10px;
}
.welcome-dl-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.welcome-right {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 36px;
    text-align: center;
}

/* ---------- Topbar ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.logo-small {
    font-size: 18px;
    color: var(--accent);
}
.logo-img {
    height: 32px;
    width: auto;
    display: block;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

/* User Status Badge */
.user-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.user-status::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.user-status.online {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.user-status.away {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.user-status.offline {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.3);
}

.user-status.busy {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ---------- Odalar ---------- */
.rooms-main {
    flex: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
    overflow: hidden;
}
.rooms-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.rooms-voice-wrap {
    flex-shrink: 0;
}
.rooms-voice-wrap:not(:empty) {
    margin-top: 12px;
}
/* Odalar ekraninda panel ayni blokta, sabit boslukla; fixed yerine akis icinde */
.rooms-voice-wrap .voice-status-panel,
.rooms-voice-wrap-mobile .voice-status-panel {
    position: relative;
    bottom: auto;
    left: auto;
}
/* Mobil disinda: panel rooms-content icinde; mobil wrap bos ve gizli */
.rooms-voice-wrap-mobile {
    display: none;
}
.rooms-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.room-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.room-filter-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.room-filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}
.room-filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.room-favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.room-favorite-btn:hover {
    color: var(--accent);
    background: rgba(255, 168, 0, 0.1);
}
.room-favorite-btn.is-favorite {
    color: var(--accent);
}
.room-favorite-icon {
    width: 18px;
    height: 18px;
    display: block;
}
.rooms-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
    border-radius: var(--radius-lg);
    overflow-x: hidden;
    overflow-y: auto;
}
.rooms-list::-webkit-scrollbar {
    width: 6px;
}
.rooms-list::-webkit-scrollbar-track {
    background: transparent;
}
.rooms-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.rooms-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Sag sidebar: Arkadas listesi */
.rooms-friend-sidebar {
    width: 240px;
    min-width: 240px;
    border-left: 1px solid var(--border);
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.rooms-friend-sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.rooms-friend-sidebar-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    flex: 1;
    min-width: 0;
}
.rooms-friend-add-btn {
    width: auto;
    height: auto;
    min-width: 0;
    padding: 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.rooms-friend-add-btn:hover {
    color: var(--accent-hover);
}
.rooms-friend-add-btn svg {
    width: 26px;
    height: 26px;
}

/* Arkadas Ekle modali (ayarlar paneli ile ayni sabit boyut; .modal-content'i ezer) */
.modal-content.friend-add-modal-content {
    width: 680px !important;
    max-width: calc(100vw - 32px);
    height: 420px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.friend-add-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-right: 28px;
    flex-shrink: 0;
}
.friend-add-form-section {
    flex-shrink: 0;
    margin-bottom: 12px;
}
.friend-add-pending-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}
.friend-add-section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
    flex-shrink: 0;
}
.friend-pending-list {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    padding: 6px 0;
}
.friend-pending-list::-webkit-scrollbar {
    width: 6px;
}
.friend-pending-list::-webkit-scrollbar-track {
    background: transparent;
}
.friend-pending-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.friend-pending-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
.friend-pending-empty {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}
.friend-pending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}
.friend-pending-item:last-child {
    border-bottom: none;
}
.friend-pending-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}
.friend-pending-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.friend-add-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.friend-add-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
}
.friend-add-input:focus {
    outline: none;
    border-color: var(--accent);
}
.friend-add-form-section .btn {
    flex-shrink: 0;
}
.rooms-friend-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.rooms-friend-empty {
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}
.rooms-friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.rooms-friend-item:hover {
    background: var(--bg-hover);
}
.rooms-friend-item.is-me {
    background: rgba(255, 168, 0, 0.08);
}
.rooms-friend-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
    overflow: hidden;
}
.rooms-friend-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rooms-friend-item-name {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rooms-friend-item-name .badge-me {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: normal;
}
/* ---------- DM (Ozel Mesaj) Ekrani ---------- */
#dm-screen.screen.active {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
#dm-screen.screen.active .dm-layout {
    flex: 1;
    min-height: 0;
}
.dm-topbar {
    flex-shrink: 0;
}
.dm-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.dm-conversation-list-wrap {
    width: var(--sidebar-width);
    min-width: 200px;
    max-width: 320px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--bg-secondary);
}
.dm-conversation-list-header {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.dm-conversation-list-header-with-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.dm-new-chat-btn-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}
.dm-new-chat-btn-icon:hover {
    opacity: 0.9;
}
.dm-new-chat-btn-icon:hover .dm-new-chat-icon-bubble {
    fill: var(--accent-hover);
}
.dm-new-chat-icon-svg {
    width: 28px;
    height: 28px;
}
.dm-new-chat-icon-bubble {
    fill: var(--accent);
    transition: fill 0.2s;
}
.dm-new-chat-icon-plus {
    fill: #fff;
}
/* .modal-content max-width:400px'i ezer, 680px sabit */
.modal-content.dm-new-chat-modal-content {
    width: 680px !important;
    max-width: calc(100vw - 32px);
    height: 420px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dm-new-chat-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-right: 28px;
    flex-shrink: 0;
}
.dm-new-chat-filter {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.dm-new-chat-filter:focus {
    outline: none;
    border-color: var(--accent);
}
.dm-new-chat-filter::placeholder {
    color: var(--text-secondary);
}
.dm-new-chat-friend-list {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
}
.dm-new-chat-friend-list::-webkit-scrollbar {
    width: 6px;
}
.dm-new-chat-friend-list::-webkit-scrollbar-track {
    background: transparent;
}
.dm-new-chat-friend-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.dm-new-chat-friend-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
.dm-new-chat-empty {
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}
.dm-new-chat-friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}
.dm-new-chat-friend-item:last-child {
    border-bottom: none;
}
.dm-new-chat-friend-item:hover {
    background: var(--bg-hover);
}
.dm-new-chat-friend-item .dm-conversation-item-avatar {
    width: 36px;
    height: 36px;
    font-size: 15px;
}
.dm-new-chat-friend-item-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}
.dm-friend-pick-list {
    max-height: 200px;
    overflow-y: auto;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}
.dm-friend-pick-list.hidden {
    display: none !important;
}
.dm-friend-pick-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.dm-friend-pick-item:hover {
    background: var(--bg-hover);
}
.dm-friend-pick-item .dm-conversation-item-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
}
.dm-friend-pick-item-name {
    font-size: 14px;
    color: var(--text-primary);
}
.dm-conversation-list {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}
.dm-conversation-list::-webkit-scrollbar {
    width: 6px;
}
.dm-conversation-list::-webkit-scrollbar-track {
    background: transparent;
}
.dm-conversation-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.dm-conversation-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
.dm-empty-hint {
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}
.dm-conversation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.dm-conversation-item:hover {
    background: var(--bg-hover);
}
.dm-conversation-item.active {
    background: rgba(255, 168, 0, 0.12);
    border-left: 3px solid var(--accent);
}
.dm-conversation-item-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
    overflow: hidden;
}
.dm-conversation-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dm-conversation-item-body {
    flex: 1;
    min-width: 0;
}
.dm-conversation-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dm-conversation-item-preview {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.dm-conversation-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}
.dm-conversation-item-time {
    font-size: 11px;
    color: var(--text-secondary);
}
.dm-conversation-item-unread {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.dm-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--bg-primary);
}
.dm-chat-empty {
    flex: 1;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}
.dm-chat-empty.active {
    display: flex;
}
.dm-chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.dm-chat-panel.hidden {
    display: none !important;
}
.dm-chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.dm-chat-with {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
}
.dm-chat-with-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    overflow: hidden;
}
.dm-chat-with-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dm-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}
.dm-message {
    display: flex;
    gap: 10px;
    max-width: 75%;
    align-self: flex-start;
}
.dm-message.is-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.dm-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    overflow: hidden;
}
.dm-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dm-message-body {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}
.dm-message.is-mine .dm-message-body {
    background: rgba(255, 168, 0, 0.15);
    border-color: var(--accent);
}
.dm-message-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.dm-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.dm-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
}
.dm-chat-input:focus {
    outline: none;
    border-color: var(--accent);
}
.dm-chat-send {
    flex-shrink: 0;
}

.room-card {
    flex-shrink: 0;
    background: var(--bg-card);
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s;
    overflow: hidden;
}
.room-card:last-child {
    border-bottom: none;
}
.room-card:hover {
    background: var(--bg-hover);
}

/* Oda karti header */
.room-card-header {
    padding: 10px 14px 8px;
}
.room-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}
.room-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.room-card-title h3 {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.room-speaker-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    max-width: 18px;
    color: var(--accent);
    fill: var(--accent);
    flex-shrink: 0;
    display: inline-block;
}
.room-lock-icon {
    width: 13px;
    height: 13px;
    min-width: 13px;
    max-width: 13px;
    color: var(--accent);
    fill: var(--accent);
    flex-shrink: 0;
    display: inline-block;
}
.room-card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.room-card-info .room-favorite-btn {
    margin-left: 2px;
}
.room-card-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}
.room-card-count-num {
    color: var(--text-primary);
    font-weight: 600;
}
.room-card .room-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Oda karti ici kullanici listesi */
.room-card-users {
    padding: 0 14px 10px;
    min-height: 28px;
}
.room-card-users-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 10px;
}
.room-card-user {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    transition: background 0.15s;
}
.room-card-user:hover {
    background: var(--bg-hover);
}
.room-card-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
    flex-shrink: 0;
}
.room-card-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.room-card-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.room-card-empty {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px 0;
    font-style: italic;
}

/* Odada kullanici varsa alt cizgi rengi */
.room-card.has-users {
    border-bottom-color: rgba(59, 165, 93, 0.4);
}
.room-card.has-users .room-card-count-num {
    color: var(--success);
}

.loading {
    color: var(--text-secondary);
    text-align: center;
    padding: 40px 0;
}

/* ---------- Modal ---------- */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 180;
}
.modal.hidden { display: none; }
.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 100%;
    max-width: 400px;
}
.modal-content h3 {
    margin-bottom: 18px;
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

/* ---------- Ses ayarlari modali (tablolu: sol Mikrofon/Kulaklik, sag icerik) ---------- */
.voice-settings-modal {
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.voice-settings-modal.hidden { display: none; }
.voice-settings-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 880px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 1;
}
.voice-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.voice-settings-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.voice-settings-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
}
.voice-settings-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.voice-settings-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.voice-settings-sidebar {
    width: fit-content;
    min-width: 100px;
    flex-shrink: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 0;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-card);
}
.voice-settings-sidebar::-webkit-scrollbar {
    width: 6px;
}
.voice-settings-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.voice-settings-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.voice-settings-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
.voice-settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.voice-settings-nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.voice-settings-nav-item.active {
    background: rgba(255, 168, 0, 0.12);
    color: var(--accent);
    font-weight: 500;
    border-right: 3px solid var(--accent);
    margin-right: -1px;
}
.voice-settings-nav-icon {
    font-size: 18px;
}
.voice-settings-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.voice-settings-back-btn {
    display: none;
}
.voice-settings-main::-webkit-scrollbar {
    width: 6px;
}
.voice-settings-main::-webkit-scrollbar-track {
    background: transparent;
}
.voice-settings-main::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.voice-settings-main::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
.voice-settings-pane {
    display: none;
}
.voice-settings-pane.active {
    display: block;
}
@media (max-width: 768px) {
    .voice-settings-body .voice-settings-main {
        display: none;
    }
    .voice-settings-body .voice-settings-sidebar {
        flex: 1;
        width: 100%;
        min-width: 0;
    }
    .voice-settings-body.voice-settings-mobile-show-main .voice-settings-sidebar {
        display: none;
    }
    .voice-settings-body.voice-settings-mobile-show-main .voice-settings-main {
        display: flex;
        flex-direction: column;
    }
    .voice-settings-body.voice-settings-mobile-show-main .voice-settings-back-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        padding: 10px 0 14px 0;
        margin: 0 0 8px 0;
        border: none;
        border-bottom: 1px solid var(--border);
        background: none;
        color: var(--accent);
        font-size: 15px;
        cursor: pointer;
        border-radius: 0;
    }
    .voice-settings-body.voice-settings-mobile-show-main .voice-settings-back-btn:hover {
        color: var(--text-primary);
    }
    body.voice-settings-modal-open {
        overflow: hidden;
        touch-action: none;
    }
    body.voice-settings-modal-open .voice-settings-main {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
}
.voice-settings-section {
    margin-bottom: 20px;
}
.voice-settings-section:last-child {
    margin-bottom: 0;
}
.voice-settings-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.voice-settings-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
}
.voice-settings-select:focus {
    outline: none;
    border-color: var(--accent);
}
.voice-settings-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}
.voice-settings-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}
.voice-settings-toggle-label {
    font-weight: 500;
}
.voice-settings-hint {
    margin: 6px 0 0 28px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.voice-settings-account-row {
    display: flex;
    gap: 20px;
    align-items: stretch;
    margin-top: 8px;
}
.voice-settings-account-profile {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.voice-settings-account-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.voice-settings-account-username {
    display: block;
    margin-top: 12px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}
.voice-settings-account-form-wrap {
    flex: 1;
    min-width: 0;
}
.voice-settings-account-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
}
#voice-settings-password-form {
    width: 100%;
    max-width: none;
}
.voice-settings-account-form .voice-settings-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
}
.voice-settings-account-form .voice-settings-input:focus {
    outline: none;
    border-color: var(--accent);
}
.voice-settings-error {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: var(--danger);
}
.voice-settings-error.hidden {
    display: none;
}
.voice-settings-email-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.voice-settings-email-row .voice-settings-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
}
.voice-settings-email-row .voice-settings-input:focus {
    outline: none;
    border-color: var(--accent);
}
.voice-settings-email-status {
    display: block;
    margin: 6px 0 8px 0;
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
}
.voice-settings-send-verify {
    margin-top: 0;
}
.voice-settings-email-status.voice-settings-email-not-verified {
    background: rgba(220, 38, 38, 0.15);
    color: var(--danger, #dc2626);
}
.voice-settings-email-status.voice-settings-email-verified {
    background: rgba(22, 163, 74, 0.15);
    color: var(--success, #16a34a);
}
.voice-settings-email-status-icon {
    margin-left: 4px;
    font-weight: bold;
}
.form-link-row {
    margin: 8px 0 0 0;
}
.form-link-row a {
    color: var(--accent);
    font-size: 14px;
}
.form-link-row a:hover {
    text-decoration: underline;
}
.voice-settings-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
}

/* =============================================
   ODA EKRANI - Sidebar + Ana Alan Layout
   ============================================= */

.room-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ---------- Kullanici Sidebar ---------- */
.user-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-count {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.user-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* ---------- Sidebar Kullanici Itemi ---------- */
.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.user-item:hover {
    background: var(--bg-hover);
}

.user-item.speaking {
    background: rgba(59, 165, 93, 0.08);
}

.user-item-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.user-item.speaking .user-item-avatar {
    border-color: var(--success);
}

.user-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-item-info {
    flex: 1;
    min-width: 0;
}

.user-item-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.user-item-name .me-tag {
    font-size: 10px;
    color: var(--accent);
    font-weight: 700;
    margin-left: 4px;
}

/* ---------- Ses Seviyesi Cubugu (Sidebar) ---------- */
.user-item-level {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 3px;
    overflow: hidden;
}

.user-item-level-bar {
    height: 100%;
    width: 0%;
    background: var(--success);
    border-radius: 2px;
    transition: width 0.08s linear;
}

/* ---------- Mikrofon / Kulaklik Ikonlari (Sidebar) ---------- */
.user-item-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.user-item-mic,
.user-item-deafen {
    display: inline-flex;
    width: 22px;
    height: 22px;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: color 0.2s, opacity 0.2s;
}

.user-item-mic svg,
.user-item-deafen svg {
    width: 100%;
    height: 100%;
}

.user-item-mic.muted {
    color: var(--danger);
    opacity: 1;
}

.user-item-deafen.deafened {
    color: var(--danger);
    opacity: 1;
}

/* ---------- Sag kolon: ana alan + sohbet (ust/alt) ---------- */
.room-right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* =============================================
   YAZILI SOHBET PANELI (orta alanin altinda)
   ============================================= */

.room-chat-panel {
    flex-shrink: 0;
    height: 300px;
    min-height: 220px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.room-chat-header {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.room-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.room-chat-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}
.room-chat-close-btn {
    display: none;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--radius);
}
.room-chat-close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
/* Sohbet butonu sadece mobilde (panel overlay oldugu icin); masaustunde panel zaten gorunur */
.room-chat-toggle-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    font-size: 10px;
    font-weight: 700;
    background: var(--danger);
    color: #fff;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
}
.room-chat-toggle-badge:not([style*="display: none"]) {
    display: inline-flex;
}

.room-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.room-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.room-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.room-chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.room-chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.room-chat-msg {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-word;
}

.room-chat-msg-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-chat-msg-clickable {
    cursor: pointer;
}

.room-chat-msg-clickable:hover {
    opacity: 0.85;
}

.room-chat-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.room-chat-msg-initial {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.room-chat-msg-body {
    flex: 1;
    min-width: 0;
}

.room-chat-msg-meta {
    display: inline;
}

.room-chat-msg-user {
    font-weight: 700;
    color: var(--accent);
    margin-right: 6px;
}

.room-chat-msg.me .room-chat-msg-user {
    color: var(--success);
}

.room-chat-msg-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-right: 6px;
}

.room-chat-msg-text {
    display: block;
    margin-top: 2px;
}

.room-chat-msg-text .chat-msg-link {
    color: var(--accent);
    text-decoration: none;
}
.room-chat-msg-text .chat-msg-link:hover {
    text-decoration: underline;
}

.room-chat-msg-actions {
    margin-left: 6px;
}
.room-chat-msg-edit,
.room-chat-msg-delete {
    font-size: 11px;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 4px;
}
.room-chat-msg-edit:hover,
.room-chat-msg-delete:hover {
    color: var(--accent);
}

.room-chat-msg-preview-wrap {
    margin-top: 8px;
}
.chat-msg-preview {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: var(--bg-hover);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 12px;
}
.chat-msg-preview-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.chat-msg-preview-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.chat-msg-preview-title {
    display: block;
    color: var(--text-primary);
    font-size: 12px;
}
.chat-msg-preview-desc {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.35;
}

.room-chat-typing {
    padding: 4px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    flex-shrink: 0;
}

.room-chat-form {
    padding: 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.room-chat-form-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.room-chat-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

.room-chat-emoji-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    cursor: pointer;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.room-chat-emoji-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    margin-top: 6px;
    max-height: 120px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.room-chat-emoji-item {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    border-radius: 4px;
}
.room-chat-emoji-item:hover {
    background: var(--bg-hover);
}

/* Masaüstü: emoji panel ve öğeleri daha büyük, okunaklı */
@media (min-width: 769px) {
    .room-chat-emoji-btn {
        width: 42px;
        height: 42px;
        font-size: 22px;
    }
    .room-chat-emoji-panel {
        max-height: 200px;
        min-width: 280px;
        padding: 12px;
        gap: 6px;
    }
    .room-chat-emoji-item {
        width: 36px;
        height: 36px;
        font-size: 24px;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

.room-chat-input:focus {
    outline: none;
    border-color: var(--accent);
}

.room-chat-send {
    flex-shrink: 0;
}

/* =============================================
   SOHBET ODASI ANA ALAN
   ============================================= */

.room-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    overflow-y: auto;
}

.participants-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    flex: 1;
    align-content: flex-start;
    padding-top: 16px;
}

/* ---------- Katilimci Karti ---------- */
.participant-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    min-width: 130px;
    max-width: 160px;
    transition: border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.participant-card:hover {
    background: var(--bg-hover);
}

.participant-card.speaking {
    border-color: var(--success);
    box-shadow: 0 0 16px rgba(59, 165, 93, 0.25);
}

.participant-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    position: relative;
}

.participant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ses seviyesi halkasi (avatar etrafinda) */
.participant-avatar::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: border-color 0.2s;
}

.participant-card.speaking .participant-avatar::after {
    border-color: var(--success);
    animation: speakPulse 1.2s ease-in-out infinite;
}

@keyframes speakPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.participant-name {
    font-size: 13px;
    color: var(--text-primary);
    text-align: center;
    font-weight: 500;
}

/* Mikrofon / Kulaklik durumu (kart) */
.participant-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.participant-mic,
.participant-deafen {
    display: inline-flex;
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: color 0.2s, opacity 0.2s;
}

.participant-mic svg,
.participant-deafen svg {
    width: 100%;
    height: 100%;
}

.participant-mic.muted {
    color: var(--danger);
    opacity: 1;
}

.participant-deafen.deafened {
    color: var(--danger);
    opacity: 1;
}

/* Ses cubugu (kart altinda) */
.participant-level {
    width: 80%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.participant-level-bar {
    height: 100%;
    width: 0%;
    background: var(--success);
    border-radius: 2px;
    transition: width 0.08s linear;
}

.user-count {
    font-size: 13px;
    color: var(--text-secondary);
}

/* =============================================
   ODA KONTROLLERI
   ============================================= */

.room-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 0 6px;
    flex-shrink: 0;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 72px;
}

.control-btn:hover {
    background: var(--bg-hover);
}

.control-icon {
    width: 22px;
    height: 22px;
}

.control-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

/* Mikrofon: yesil tema (acik) / kirmizi (kapali) */
.control-btn.mic-btn.active {
    background: rgba(59, 165, 93, 0.2);
    border-color: var(--success);
    color: var(--success);
}
.control-btn.mic-btn.active:hover {
    background: rgba(59, 165, 93, 0.35);
    border-color: var(--success);
    color: #fff;
}
.control-btn.mic-btn:not(.active) {
    background: rgba(237, 66, 69, 0.15);
    border-color: var(--danger);
    color: var(--danger);
}
.control-btn.mic-btn:not(.active):hover {
    background: rgba(237, 66, 69, 0.3);
    border-color: var(--danger);
    color: #fff;
}

/* Kulaklik: mavi tema (normal) / kirmizi (deafen aktif) */
.control-btn.deafen-btn {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #60a5fa;
}
.control-btn.deafen-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
    color: #fff;
}
.control-btn.deafen-btn.active {
    background: rgba(237, 66, 69, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}
.control-btn.deafen-btn.active:hover {
    background: rgba(237, 66, 69, 0.35);
    border-color: var(--danger);
    color: #fff;
}

/* Sohbet: turuncu/accent tema */
.control-btn.chat-btn {
    display: none;
    position: relative;
    background: rgba(255, 168, 0, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}
.control-btn.chat-btn:hover {
    background: rgba(255, 168, 0, 0.3);
    border-color: var(--accent);
    color: #fff;
}

/* Sohbetten Ayril: kirmizi tema */
.control-btn.leave-btn {
    background: rgba(237, 66, 69, 0.2);
    border-color: var(--danger);
    color: #fff;
}
.control-btn.leave-btn:hover {
    background: rgba(237, 66, 69, 0.4);
    border-color: var(--danger);
    color: #fff;
}

/* =============================================
   PROFiL MODALI
   ============================================= */

.profile-modal-content {
    max-width: 360px;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.pm-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    z-index: 1;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.pm-close:hover {
    color: var(--text-primary);
}

.pm-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 24px 16px;
    background: linear-gradient(135deg, rgba(255,168,0,0.12), rgba(255,168,0,0.04));
}
.pm-header-add-friend {
    flex-shrink: 0;
    margin-left: auto;
}
.pm-header-add-friend.hidden {
    display: none !important;
}

.pm-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-hover);
    object-fit: cover;
    border: 3px solid var(--accent);
    flex-shrink: 0;
}

.pm-info {
    flex: 1;
    min-width: 0;
}

.pm-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-online-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.pm-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.pm-status-dot.online { background: #22c55e; }
.pm-status-dot.busy { background: #ef4444; }

.pm-dm-section {
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border);
}
.pm-dm-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.pm-dm-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.pm-dm-input {
    flex: 1;
    min-width: 0;
    width: 0;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    box-sizing: border-box;
}
.pm-dm-input:focus {
    outline: none;
    border-color: var(--accent);
}
.pm-dm-input::placeholder {
    color: var(--text-secondary);
}
.pm-dm-send-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: none;
    border-radius: 22px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.pm-dm-send-btn:hover {
    background: var(--accent-hover);
}
.pm-dm-send-btn:active {
    transform: scale(0.96);
}
.pm-status-dot.away { background: #f59e0b; }
.pm-status-dot.offline { background: var(--text-secondary); }

.pm-status-msg {
    padding: 0 24px;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

.pm-status-msg:not(:empty) {
    padding-top: 12px;
    padding-bottom: 4px;
}

.pm-bio {
    padding: 8px 24px 0;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

.pm-bio:not(:empty) {
    padding-bottom: 8px;
}

.pm-details {
    padding: 12px 24px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

.pm-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
}

.pm-detail-label {
    color: var(--text-secondary);
}

.pm-detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.pm-edit-section {
    padding: 12px 24px 20px;
    text-align: center;
}

.pm-edit-section .btn {
    width: 100%;
}

/* =============================================
   PROFIL KARTI MODALI (oyun sitesi profile-card ile ayni gorunum)
   ============================================= */

.profile-card-modal-content {
    max-width: 520px;
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 0;
}

.profile-card-modal-content .pm-close {
    top: 12px;
    right: 12px;
}

/* Gizlenecek alanlar: header, hakkımda, aktivite */
.profile-card-modal-content .profile-card-hidden {
    display: none !important;
}

.profile-card-in-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-card-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.profile-card-header h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: var(--accent);
}

.profile-card-header p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 14px;
}

.profile-card-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.profile-card-avatar-container {
    position: relative;
    display: inline-block;
}

.profile-card-avatar-container img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
}

.profile-card-online-status-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-card-online-status-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-card-online-status-select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    min-width: 120px;
}

.profile-card-online-status-select:focus {
    outline: none;
    border-color: var(--accent);
}

.profile-card-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.profile-card-status-dot.online { background: #22c55e; }
.profile-card-status-dot.offline { background: var(--text-secondary); }
.profile-card-status-dot.away { background: #f59e0b; }
.profile-card-status-dot.busy { background: #ef4444; }

.profile-card-username {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-card-avatar-upload {
    display: grid;
    gap: 8px;
    width: 100%;
    max-width: 320px;
}

.profile-card-upload-btn {
    width: 100%;
}

.profile-card-avatar-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}

.profile-card-form-section {
    display: grid;
    gap: 18px;
}

.profile-card-form-group {
    display: grid;
    gap: 6px;
}

.profile-card-form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-card-form-group input,
.profile-card-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.profile-card-form-group input:focus,
.profile-card-form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.profile-card-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.profile-card-activity-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.profile-card-activity-section h3 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-card-activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.profile-card-activity-label { color: var(--text-secondary); }
.profile-card-activity-value { color: var(--text-primary); font-weight: 500; }

.profile-card-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.profile-card-actions .btn {
    min-width: 120px;
}

/* voice-panel-user-info tiklanabilir */
.voice-panel-user-info {
    cursor: pointer;
}
.voice-panel-user-info:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
}

/* =============================================
   TOAST BILDiRiM
   ============================================= */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 200;
}
.toast {
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    color: #fff;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger);  }
.toast.info    { background: var(--accent);  }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(10px); }
}

/* =============================================
   SOL ALT: SES BAGLANTI VE KULLANICI PANELI
   ============================================= */

.voice-status-panel {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 320px;
    max-width: calc(100vw - 48px);
    background: #2d2d2d;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 140;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.voice-status-panel.hidden {
    display: none;
}

/* Masaüstü: çıkış butonu metin, ikon gizli */
.logout-btn-with-icon .logout-btn-icon {
    display: none;
}
/* Mobil bottom sheet: sadece mobilde gorunur */
.voice-panel-sheet-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
}
.voice-panel-sheet-chevron {
    display: block;
    transition: transform 0.25s ease;
}
/* Oda ekraninda: panel katilimcilar sutununun en altinda (sohbeti kapatmaz) */
.voice-status-panel.in-sidebar {
    position: relative;
    bottom: auto;
    left: auto;
    width: calc(100% - 24px);
    max-width: none;
    margin: 12px;
    flex-shrink: 0;
}
.user-sidebar .voice-status-panel.in-sidebar {
    align-self: center;
}
/* DM ekraninda: panel konusma listesi sutununun altinda */
.voice-status-panel.in-dm-sidebar {
    position: relative;
    bottom: auto;
    left: auto;
    width: calc(100% - 16px);
    max-width: none;
    margin: 8px;
    flex-shrink: 0;
    align-self: center;
}
.dm-conversation-list-wrap .voice-status-panel.in-dm-sidebar {
    order: 10;
}
/* Oda ekraninda panel dar oldugu icin ayril / mikrofon / kulaklik simgelerini gizle; yazilar tam gorunsun */
.voice-status-panel.in-sidebar .voice-panel-leave-btn,
.voice-status-panel.in-sidebar #voice-panel-mic,
.voice-status-panel.in-sidebar #voice-panel-deafen {
    display: none !important;
}
.voice-panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    gap: 12px;
}
.voice-panel-connection {
    border-bottom: 1px solid var(--border);
    min-height: 44px;
}
.voice-panel-connection-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}
.voice-panel-connection-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.voice-panel-connection-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
}
.voice-panel-connection-icon svg {
    display: block;
}
.voice-panel-connection-icon.not-in-room {
    color: #ef4444;
}
.voice-panel-connection-icon.connected {
    color: #10b981;
    filter: drop-shadow(0 0 1px currentColor);
}
.voice-panel-status-text {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.voice-panel-status-text.not-in-room {
    color: #ef4444;
}
.voice-panel-status-text.connected {
    color: #10b981;
}
.voice-panel-room-name {
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.voice-panel-room-name.hidden {
    display: none !important;
}
.voice-panel-leave-icon {
    display: block;
}
.voice-panel-leave-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
}
.voice-panel-leave-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.voice-panel-leave-btn.in-room {
    color: #ef4444;
}
.voice-panel-leave-btn.in-room:hover {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}
.voice-panel-leave-btn:disabled {
    opacity: 0.5;
    cursor: default;
}
.voice-panel-user {
    min-height: 52px;
    gap: 8px;
}
.voice-panel-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.voice-panel-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
}
.voice-panel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.voice-panel-user-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.voice-panel-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.voice-panel-status-msg {
    font-size: 11px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 14px;
}
.voice-panel-status-msg.empty {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}
.voice-panel-status-edit {
    width: 100%;
    max-width: 180px;
    padding: 2px 6px;
    font-size: 11px;
    color: #fff;
    background: var(--bg-primary);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    outline: none;
}
.voice-panel-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.voice-panel-control-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.voice-panel-control-btn:hover {
    color: var(--accent);
    background: rgba(255, 168, 0, 0.1);
}
.voice-panel-control-btn.muted,
.voice-panel-control-btn.deafened {
    color: #ef4444;
}
.voice-panel-control-btn.muted:hover,
.voice-panel-control-btn.deafened:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* =============================================
   DUYARLI TASARIM
   ============================================= */

@media (max-width: 768px) {
    /* Anasayfa (odalar) topbar - oyun sitesi gibi kompakt ve temiz */
    .topbar {
        padding: 14px 16px;
        min-height: 56px;
    }
    .topbar .logo-img {
        height: 28px;
    }
    .topbar-right {
        gap: 6px;
        align-items: center;
    }
    .topbar .user-status {
        position: relative;
        padding: 0;
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 0;
        line-height: 0;
        display: inline-block;
        vertical-align: middle;
        background: transparent;
        border: 2px solid rgba(16, 185, 129, 0.5);
        border-radius: 50%;
        box-sizing: border-box;
    }
    .topbar .user-status::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #10b981;
    }
    .topbar .user-status.away {
        border-color: rgba(245, 158, 11, 0.5);
    }
    .topbar .user-status.away::before { background: #f59e0b; }
    .topbar .user-status.busy {
        border-color: rgba(239, 68, 68, 0.5);
    }
    .topbar .user-status.busy::before { background: #ef4444; }
    .topbar .user-status.offline {
        border-color: rgba(107, 114, 128, 0.5);
    }
    .topbar .user-status.offline::before { background: #6b7280; }
    .topbar .btn-small {
        padding: 6px 10px;
        font-size: 12px;
    }
    #logout-btn {
        background: var(--danger);
        color: #fff;
        border-color: var(--danger);
    }
    #logout-btn:hover {
        background: #d63639;
        color: #fff;
        border-color: #d63639;
    }

    .rooms-main {
        flex-direction: column;
    }
    .rooms-friend-sidebar {
        display: none;
    }
    /* Sohbet odasi topbar mobil: sol butonlar sadece ikon (Geri, Kilit, Trash), sola yasli; ortada baslik; sagda DM + arkadas */
    .room-topbar {
        display: flex;
        align-items: center;
        gap: 0;
        padding-left: 8px;
        padding-right: 12px;
    }
    .room-topbar-left {
        flex-shrink: 0;
        gap: 6px;
    }
    .room-topbar-left .btn {
        padding: 8px;
        min-width: 36px;
        min-height: 36px;
        border-radius: var(--radius);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .room-topbar-left .room-topbar-btn-text {
        display: none;
    }
    .room-topbar-left .room-topbar-btn-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .room-topbar-left .room-topbar-btn-icon svg {
        display: block;
        width: 18px;
        height: 18px;
    }
    .room-topbar-center {
        flex: 1;
        min-width: 0;
        margin: 0 8px;
    }
    .room-topbar-center .room-topbar-title {
        font-size: 1rem;
    }
    .room-topbar-right {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .room-topbar-friend-btn {
        display: inline-flex !important;
        padding: 8px 10px;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }
    .room-topbar-friend-btn svg {
        display: block;
    }
    /* Arkadas listesi: odada mobilde overlay olarak acilir/kapanir */
    body.friend-sidebar-open .rooms-friend-sidebar {
        display: flex !important;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(280px, 85vw);
        max-width: none;
        z-index: 220;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35);
        border-left: 1px solid var(--border);
    }
    body.friend-sidebar-open .friend-sidebar-backdrop {
        display: block;
    }
    .friend-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 219;
    }
    /* voice-status-panel: odada mobilde ekranin en altinda sabit */
    .voice-status-panel.in-sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding-bottom: max(env(safe-area-inset-bottom, 0), 8px);
        z-index: 140;
    }
    .room-screen .user-sidebar {
        padding-bottom: 100px;
    }
    /* Sohbet paneli: mobilde gizli, ikonla acilir (overlay) */
    .room-chat-panel {
        display: none !important;
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        top: 40%;
        height: auto !important;
        min-height: 60vh;
        z-index: 210;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
    }
    .room-chat-panel.room-chat-panel-open {
        display: flex !important;
    }
    .room-chat-close-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .control-btn.chat-btn {
        display: flex !important;
    }
    .room-chat-panel-open-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 209;
    }
    .room-chat-panel-open-backdrop.active {
        display: block;
    }
    body.room-chat-overlay-open {
        overflow: hidden;
        touch-action: none;
    }
    body.room-chat-overlay-open .room-chat-panel,
    body.room-chat-overlay-open .room-chat-messages {
        touch-action: pan-y;
    }
    /* rooms-header mobil: filtreler yatay kayar, tek satir; Yeni Oda sabit */
    .rooms-header {
        flex-wrap: nowrap;
        gap: 10px;
        margin-bottom: 12px;
        align-items: stretch;
    }
    .room-filters {
        flex: 1;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .room-filters::-webkit-scrollbar {
        display: none;
    }
    .room-filter-btn {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 12px;
        min-height: 40px;
    }
    .rooms-header .btn-primary {
        flex-shrink: 0;
        min-height: 40px;
    }

    .room-layout {
        flex-direction: column;
    }
    /* Katilimcilar: sadece listede goster, asagidaki buyuk kartlari gizle */
    .participants-grid {
        display: none;
    }
    .room-main {
        flex: 0 0 auto;
        padding: 12px 16px;
    }
    /* room-main ve room-controls voice-status-panel'in ustunde kalsin (panel fixed altta) */
    .room-screen .room-right-column {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0));
    }
    /* Katilimci listesi: ince satir, 4 kullanici sonra scroll */
    .user-sidebar {
        width: 100%;
        min-width: 100%;
        max-height: 220px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
    }
    .user-list {
        max-height: 164px;
        overflow-y: auto;
        min-height: 0;
    }
    .user-item {
        padding: 5px 12px;
    }
    .user-item-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .user-item-name {
        font-size: 12px;
    }
    .user-item-icons .user-item-mic,
    .user-item-icons .user-item-deafen {
        width: 18px;
        height: 18px;
    }
    .sidebar-header {
        padding: 10px 12px;
    }
    .sidebar-header h3 {
        font-size: 12px;
    }
    /* DM ekrani mobil */
    .dm-conversation-list-wrap {
        max-width: none;
        width: 100%;
    }
    .dm-chat-panel .dm-chat-form {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    .dm-message {
        max-width: 85%;
    }
    /* Sohbet paneli: kalan tum yuksekligi doldurur, ekranin altina kadar iner */
    .room-chat-panel {
        flex: 1;
        min-height: 160px;
        height: auto;
    }
    .room-controls {
        padding: 8px 0 4px;
    }
    .control-btn {
        padding: 6px 12px;
        min-width: 64px;
    }
    .control-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    #auth-screen {
        padding: 16px;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
        overflow-x: hidden;
        overflow-y: auto;
    }
    .auth-container {
        flex-direction: column;
        width: 100%;
        max-width: 380px;
        min-width: 0;
        margin: 0 auto;
        padding: 28px 20px;
        box-sizing: border-box;
    }
    .auth-left {
        padding-right: 0;
        padding-bottom: 24px;
        border-right: none;
        border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
        max-width: none;
        flex: none;
    }
    .auth-left .logo-auth-desktop {
        display: none;
    }
    .auth-left .logo-auth-mobile {
        display: block;
    }
    .auth-right {
        padding-left: 0;
        padding-top: 24px;
        text-align: center;
        flex: none;
    }
    .auth-right .auth-form,
    .auth-right .error-msg {
        text-align: left;
    }
    #welcome-screen {
        padding: 16px;
        overflow-x: hidden;
        overflow-y: auto;
    }
    .welcome-container {
        flex-direction: column;
        max-width: 380px;
        padding: 28px 20px;
    }
    .welcome-left {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 24px;
    }
    .welcome-logo-desktop {
        display: none;
    }
    .welcome-logo-mobile {
        display: block;
    }
    .welcome-right {
        flex: none;
        padding-left: 0;
        padding-top: 24px;
        width: 100%;
    }
    .welcome-actions {
        max-width: none;
    }
    .rooms-main { padding: 0; width: 100%; min-height: 0; }
    .rooms-voice-wrap-mobile {
        display: block;
        flex-shrink: 0;
        margin-top: 8px;
    }
    .rooms-content { padding: 18px; }
    .rooms-header .room-filter-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-height: 36px;
    }
    .rooms-header .btn-primary {
        padding: 6px 10px;
        font-size: 11px;
        min-height: 36px;
    }
    /* Mobil: çıkış yap yerine kırmızı daire + logout ikon */
    .logout-btn-with-icon .logout-btn-text {
        display: none;
    }
    .logout-btn-with-icon .logout-btn-icon {
        display: block;
    }
    #logout-btn.logout-btn-with-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--danger);
        color: #fff;
        border-color: var(--danger);
    }
    #logout-btn.logout-btn-with-icon:hover {
        background: #d63639;
        border-color: #d63639;
        color: #fff;
    }
    #logout-btn.logout-btn-with-icon .logout-btn-icon {
        fill: #fff;
        width: 20px;
        height: 20px;
    }
    /* Anasayfa: logout, DM ve arkadas ikonlari ayni boyut (40px daire, 20px ikon), sadece mobilde */
    #logout-btn.logout-btn-with-icon,
    .dm-open-btn-icon,
    .rooms-friend-toggle-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    #rooms-screen .topbar-right .rooms-friend-toggle-btn.hidden {
        display: inline-flex !important;
    }
    .dm-open-btn-icon svg,
    .rooms-friend-toggle-btn svg { width: 20px; height: 20px; }
    /* Arkadas ikonu mavi */
    #rooms-screen .topbar-right .rooms-friend-toggle-btn {
        background: #3b82f6;
        color: #fff;
        border-color: #3b82f6;
    }
    #rooms-screen .topbar-right .rooms-friend-toggle-btn:hover {
        background: #2563eb;
        border-color: #2563eb;
        color: #fff;
    }
    #rooms-screen .topbar-right .rooms-friend-toggle-btn svg {
        fill: #fff;
    }
    /* Oda ekrani: DM ikonu arkadasin solunda, sadece mobilde */
    .room-dm-open-btn.hidden {
        display: inline-flex !important;
    }
    .room-topbar-friend-btn {
        display: inline-flex !important;
    }
    .topbar { padding: 10px 16px; }
    .profile-modal-content { max-width: 95vw; }

    /* voice-status-panel mobil: bottom sheet (ince cubuk -> tiklayinca acilir) */
    .voice-status-panel:not(.in-sidebar) {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding-bottom: max(env(safe-area-inset-bottom, 0), 8px);
        transition: box-shadow 0.25s ease;
    }
    .voice-status-panel:not(.in-sidebar) .voice-panel-sheet-toggle {
        display: flex;
    }
    /* Kapali: sadece ust satir (baglanti) gorunur, ince cubuk */
    .voice-status-panel:not(.in-sidebar).voice-sheet-collapsed .voice-panel-user {
        display: none !important;
    }
    .voice-status-panel:not(.in-sidebar).voice-sheet-collapsed .voice-panel-connection {
        border-bottom: none;
    }
    .voice-status-panel:not(.in-sidebar).voice-sheet-collapsed .voice-panel-leave-btn {
        display: none !important;
    }
    .voice-status-panel:not(.in-sidebar).voice-sheet-collapsed .voice-panel-row {
        padding: 10px 12px;
    }
    /* Acik: chevron asagi donsun */
    .voice-status-panel:not(.in-sidebar).voice-sheet-expanded .voice-panel-sheet-chevron {
        transform: rotate(180deg);
    }
    .voice-status-panel:not(.in-sidebar).voice-sheet-expanded {
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
    }
    .voice-status-panel .voice-panel-row {
        padding: 8px 12px;
    }
    .voice-status-panel .voice-panel-connection {
        min-height: 40px;
    }
    .voice-status-panel .voice-panel-avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 12px;
    }
    .voice-status-panel .voice-panel-username {
        font-size: 13px;
    }
    .voice-status-panel .voice-panel-status-msg {
        font-size: 11px;
    }
    .voice-status-panel .voice-panel-control-btn {
        width: 40px;
        height: 40px;
    }
    .voice-status-panel.in-sidebar {
        margin: 8px;
        width: calc(100% - 16px);
    }
    /* Oda sayfasinda da bottom sheet: in-sidebar iken chevron goster, collapsed/expanded ayni */
    .voice-status-panel.in-sidebar .voice-panel-sheet-toggle {
        display: flex !important;
    }
    .voice-status-panel.in-sidebar.voice-sheet-collapsed .voice-panel-user {
        display: none !important;
    }
    .voice-status-panel.in-sidebar.voice-sheet-collapsed .voice-panel-connection {
        border-bottom: none;
    }
    .voice-status-panel.in-sidebar.voice-sheet-collapsed .voice-panel-leave-btn {
        display: none !important;
    }
    .voice-status-panel.in-sidebar.voice-sheet-expanded .voice-panel-sheet-chevron {
        transform: rotate(180deg);
    }

    /* DM ekrani mobil: topbar altinda konusma listesi, altta voice panel sabit (alttan padding yok) */
    #dm-screen.screen.active {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }
    #dm-screen.screen.active .dm-layout {
        flex: 1;
        min-height: 0;
        flex-direction: column;
        padding-bottom: 0;
    }
    #dm-screen.screen.active .dm-conversation-list-wrap {
        width: 100%;
        max-width: none;
        flex: 1;
        min-height: 0;
        overflow: hidden;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    /* Liste gorunumunde sadece listeyi goster; sohbet alani secilince acilir */
    #dm-screen.screen.active:not(.dm-mobile-chat-open) .dm-chat-main {
        display: none !important;
    }
    /* Voice panel DM mobilde ekranin en altinda sabit, alttan padding yok */
    .dm-voice-wrap:not(:empty) {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 140;
        padding: 0;
    }
    .dm-voice-wrap .voice-status-panel {
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding-bottom: 0;
    }
    /* Konusma listesi uzerinde icerik; voice panel yuksekligi kadar alt padding */
    #dm-screen.screen.active .dm-layout {
        padding-bottom: 72px;
    }

    /* Konusma secildiginde: listeyi gizle, sohbet ekrani + sol ustte Geri */
    #dm-screen.dm-mobile-chat-open .dm-conversation-list-wrap {
        display: none !important;
    }
    #dm-screen.dm-mobile-chat-open .dm-chat-main {
        flex: 1;
        display: flex !important;
        flex-direction: column;
        min-height: 0;
    }
    .dm-chat-back-bar {
        display: none;
        flex-shrink: 0;
        padding: 8px 12px;
        border-bottom: 1px solid var(--border);
        background: var(--bg-secondary);
    }
    /* Sohbet acikken ust topbar gizle; geri icin dm-chat-back-bar kullanilir */
    #dm-screen.dm-mobile-chat-open .dm-topbar {
        display: none !important;
    }
    #dm-screen.dm-mobile-chat-open .dm-chat-back-bar {
        display: flex !important;
    }
    /* DM geri butonlari (topbar + sohbet icinde) biraz kucuk */
    .dm-topbar .room-back-btn,
    .dm-chat-back-bar .room-back-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px;
        font-size: 12px;
    }
    .dm-topbar .room-back-btn .room-topbar-btn-icon svg,
    .dm-chat-back-bar .room-back-btn .room-topbar-btn-icon svg {
        width: 16px;
        height: 16px;
    }
}
