/* ============================================================
   Sesli Chat Panel — stil
   ============================================================ */
:root {
    --sc-bg: #0b1020;
    --sc-bg2: #111a33;
    --sc-card: #151f3d;
    --sc-border: #243152;
    --sc-text: #e8edf7;
    --sc-muted: #8b96b5;
    --sc-primary: #4f7cff;
    --sc-primary2: #6a5cff;
    --sc-danger: #ff4d6d;
    --sc-success: #22c55e;
    --sc-vip: #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.sc-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--sc-bg);
    color: var(--sc-text);
    min-height: 100vh;
}

a { color: var(--sc-primary); text-decoration: none; }

.sc-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ============ ÜST BAR ============ */
.sc-topbar {
    background: rgba(10, 15, 30, 0.9);
    border-bottom: 1px solid var(--sc-border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.sc-topbar .sc-container {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.sc-brand { font-size: 1.15rem; color: var(--sc-text); display: flex; align-items: center; gap: 6px; }
.sc-brand b { color: var(--sc-primary); }
.sc-brand span { color: var(--sc-muted); font-weight: 400; }
.sc-nav { display: flex; gap: 6px; flex: 1; }
.sc-nav a {
    color: var(--sc-muted);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all .2s;
}
.sc-nav a:hover { color: var(--sc-text); background: rgba(255,255,255,.06); }
.sc-nav a.active { color: var(--sc-text); background: var(--sc-primary); }
.sc-userbox { display: flex; align-items: center; gap: 10px; font-size: .95rem; }

/* ============ BUTONLAR ============ */
.sc-btn {
    display: inline-block;
    border: 1px solid transparent;
    background: transparent;
    color: var(--sc-text);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all .18s;
    text-align: center;
    line-height: 1.2;
}
.sc-btn:hover { transform: translateY(-1px); opacity: .92; }
.sc-btn-primary { background: linear-gradient(135deg, var(--sc-primary), var(--sc-primary2)); border: none; color: #fff; }
.sc-btn-outline { border-color: var(--sc-border); color: var(--sc-text); }
.sc-btn-ghost { background: rgba(255,255,255,.06); color: var(--sc-muted); }
.sc-btn-danger { background: var(--sc-danger); color: #fff; border: none; }
.sc-btn-lg { padding: 13px 26px; font-size: 1.05rem; border-radius: 12px; }
.sc-btn-sm { padding: 5px 10px; font-size: 0.8rem; border-radius: 7px; }
.sc-btn.active { background: var(--sc-vip); color: #1a1205; }

/* ============ ROZETLER ============ */
.sc-badge {
    background: var(--sc-danger);
    color: #fff;
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 0.75rem;
    font-weight: 700;
}
.sc-vip-badge {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #1a1205;
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: .5px;
}
.sc-admin-badge {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #fff;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: .5px;
}
.sc-live { color: var(--sc-success); font-size: .8rem; font-weight: 700; }
.sc-idle { color: var(--sc-muted); font-size: .8rem; }
.sc-hint { color: var(--sc-muted); font-size: .9rem; line-height: 1.6; }
.sc-loading { color: var(--sc-muted); padding: 40px; text-align: center; }
.sc-empty { text-align: center; padding: 60px 20px; color: var(--sc-muted); }
.sc-empty h3 { color: var(--sc-text); margin-bottom: 8px; }

/* ============ AVATAR ============ */
.sc-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--c, var(--sc-primary));
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
    user-select: none;
}

/* ============ ANA SAYFA ============ */
.sc-main { padding: 40px 16px 80px; }
.sc-hero { text-align: center; padding: 50px 20px 40px; }
.sc-hero h1 { font-size: 2.2rem; margin-bottom: 14px; background: linear-gradient(135deg, #7aa2ff, #b18cff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sc-hero p { color: var(--sc-muted); max-width: 640px; margin: 0 auto 26px; font-size: 1.05rem; line-height: 1.7; }
.sc-hero-sm { padding: 30px 20px 20px; }
.sc-hero-sm h1 { font-size: 1.6rem; }
.sc-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.sc-hero .sc-hint { margin-top: 18px; }

.sc-room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.sc-room-card {
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: 16px;
    padding: 20px;
    transition: all .2s;
}
.sc-room-card:hover { border-color: var(--sc-primary); transform: translateY(-2px); }
.sc-room-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.sc-room-head h3 { font-size: 1.15rem; }
.sc-room-desc { color: var(--sc-muted); font-size: .9rem; margin-bottom: 10px; line-height: 1.5; }
.sc-room-meta { color: var(--sc-muted); font-size: .82rem; margin-bottom: 14px; }
.sc-room-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.sc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .sc-grid-2 { grid-template-columns: 1fr; } }

.sc-card {
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: 16px;
    padding: 20px;
}
.sc-card h3 { margin-bottom: 14px; font-size: 1.05rem; }
.sc-search { position: relative; }
.sc-search input, .sc-mod-site input[type="text"] {
    width: 100%;
    background: var(--sc-bg2);
    border: 1px solid var(--sc-border);
    color: var(--sc-text);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: .95rem;
    outline: none;
}
.sc-search input:focus { border-color: var(--sc-primary); }
.sc-search-result { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }

.sc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    flex-wrap: wrap;
}
.sc-row b { flex: 1; min-width: 80px; }

/* ============ ODA SAYFASI ============ */
body.sc-room { overflow: hidden; height: 100vh; display: flex; flex-direction: column; }
.sc-room-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    background: rgba(10, 15, 30, 0.95);
    border-bottom: 1px solid var(--sc-border);
    flex-wrap: wrap;
}
.sc-room-title { flex: 1; min-width: 200px; }
.sc-room-title h1 { font-size: 1.2rem; }
.sc-room-owner { color: var(--sc-muted); font-size: .8rem; }
.sc-room-top-actions { display: flex; gap: 8px; align-items: center; }

.sc-room-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.sc-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    overflow-y: auto;
    min-width: 0;
}
.sc-chat-col {
    width: 380px;
    max-width: 42vw;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--sc-border);
    background: var(--sc-bg2);
    min-width: 0;
}
@media (max-width: 900px) {
    .sc-room-layout { flex-direction: column; }
    .sc-chat-col { width: 100%; max-width: 100%; border-left: none; border-top: 1px solid var(--sc-border); height: 45vh; }
    body.sc-room { overflow: auto; height: auto; }
    .sc-stage { max-height: 55vh; }
}

.sc-stage-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--sc-muted);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .5px;
}
.sc-stage-count { background: var(--sc-primary); color: #fff; padding: 1px 9px; border-radius: 12px; font-size: .75rem; }

/* yayıncılar (broadcast) */
.sc-broadcasters { display: flex; gap: 10px; flex-wrap: wrap; }
.sc-hint { width: 100%; }

/* ============ MİKROFON STRIP (sohbetin üstünde) ============ */
.sc-mic-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(79, 124, 255, 0.08);
    border-bottom: 1px solid var(--sc-border);
    min-height: 58px;
    overflow-x: auto;
}
.sc-mic-strip-label { color: var(--sc-muted); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.sc-mic-strip-users { display: flex; gap: 12px; align-items: center; flex-wrap: nowrap; }

.sc-speaker { text-align: center; min-width: 64px; }
.sc-speaker-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sc-speaker-avatar .sc-avatar { width: 44px; height: 44px; font-size: 18px; position: relative; z-index: 2; }
.sc-speaker-name { font-size: .7rem; color: var(--sc-muted); margin-top: 4px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ses dalgası halkaları */
.sc-wave-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--sc-primary);
    opacity: 0;
    pointer-events: none;
}
.sc-speaker-avatar.talking .sc-wave-ring.r1 { animation: scWave 1.2s ease-out infinite; }
.sc-speaker-avatar.talking .sc-wave-ring.r2 { animation: scWave 1.2s ease-out .35s infinite; }
.sc-speaker-avatar.talking .sc-wave-ring.r3 { animation: scWave 1.2s ease-out .7s infinite; }
@keyframes scWave {
    0% { transform: scale(1); opacity: .7; }
    100% { transform: scale(calc(1 + var(--wave, 1.4))); opacity: 0; }
}
.sc-speaker-avatar.talking .sc-avatar {
    box-shadow: 0 0 18px 4px color-mix(in srgb, var(--sc-primary) 60%, transparent);
}

/* ============ SOHBET ============ */
.sc-chat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--sc-border);
    font-weight: 700;
    font-size: .9rem;
}
.sc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
}
.sc-chat-sys {
    text-align: center;
    color: var(--sc-muted);
    font-size: .78rem;
    background: rgba(255,255,255,.04);
    border-radius: 8px;
    padding: 5px 10px;
    margin: 4px 0;
}
.sc-msg-row { display: flex; gap: 8px; align-items: flex-start; max-width: 92%; }
.sc-msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.sc-msg-row.them { align-self: flex-start; }
.sc-msg-row.private { max-width: 92%; }
.sc-msg-row.private .sc-msg-bubble { background: rgba(245, 158, 11, .15); border: 1px solid rgba(245, 158, 11, .4); }
.sc-msg-body { display: flex; flex-direction: column; gap: 2px; }
.sc-msg-name { font-size: .72rem; color: var(--sc-muted); }
.sc-msg-vip { color: var(--sc-vip); font-weight: 800; }
.sc-msg-bubble {
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: .92rem;
    line-height: 1.45;
    word-break: break-word;
}
.sc-msg-row.me .sc-msg-bubble { background: var(--sc-primary); border-color: var(--sc-primary); color: #fff; }
.sc-msg-time { font-size: .68rem; color: var(--sc-muted); margin-left: 6px; }

.sc-chat-input { position: relative; border-top: 1px solid var(--sc-border); padding: 10px; display: flex; gap: 8px; }
.sc-chat-input input {
    flex: 1;
    background: var(--sc-bg);
    border: 1px solid var(--sc-border);
    color: var(--sc-text);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .92rem;
    outline: none;
}
.sc-chat-input input:focus { border-color: var(--sc-primary); }
.sc-chat-input input:disabled { opacity: .5; }

.sc-emoji-panel {
    position: absolute;
    bottom: 56px;
    left: 10px;
    right: 10px;
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    z-index: 50;
    max-height: 160px;
    overflow-y: auto;
}
.sc-emoji { background: transparent; border: none; font-size: 1.3rem; cursor: pointer; border-radius: 6px; padding: 3px; }
.sc-emoji:hover { background: rgba(255,255,255,.08); }

.sc-mic-controls {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--sc-border);
    flex-wrap: wrap;
}

/* ============ EL KALDIRMA ÇEKMECESİ ============ */
.sc-queue-drawer {
    position: fixed;
    left: 18px;
    bottom: 18px;
    width: 320px;
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: 14px;
    padding: 12px;
    z-index: 200;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.sc-queue-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 10px; font-size: .9rem; }

/* ============ MOD PANELİ ============ */
.sc-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 18, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 16px;
}
.sc-modal-box {
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: 18px;
    padding: 22px;
    width: 100%;
    max-width: 460px;
    max-height: 85vh;
    overflow-y: auto;
}
.sc-modal-lg { max-width: 760px; }
.sc-modal-box h3 { margin-bottom: 16px; }
.sc-modal-box label { display: block; font-size: .85rem; color: var(--sc-muted); margin: 12px 0 5px; }
.sc-modal-box input[type="text"], .sc-modal-box input[type="number"] {
    width: 100%;
    background: var(--sc-bg2);
    border: 1px solid var(--sc-border);
    color: var(--sc-text);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .95rem;
    outline: none;
}
.sc-check { display: flex !important; align-items: center; gap: 8px; }
.sc-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.sc-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sc-modal-head h3 { margin: 0; }

.sc-mod-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.sc-mod-tabs .sc-btn.active { background: var(--sc-primary); color: #fff; }
.sc-mod-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.sc-mod-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--sc-bg2);
    border-radius: 10px;
    padding: 8px 10px;
    flex-wrap: wrap;
}
.sc-mod-info { flex: 1; min-width: 120px; font-size: .9rem; }
.sc-mod-info small { color: var(--sc-muted); }
.sc-mod-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.sc-mod-footer { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.sc-mod-site { display: flex; flex-direction: column; gap: 12px; }
.sc-mod-site h4 { margin-bottom: 4px; }

.sc-muted-badge {
    background: rgba(255, 77, 109, .15);
    color: var(--sc-danger);
    border-radius: 6px;
    padding: 1px 7px;
    font-size: .7rem;
    font-weight: 700;
}

/* ============ ROL ETİKETLERİ ============ */
.sc-role-tag { border-radius: 6px; padding: 1px 7px; font-size: .68rem; font-weight: 800; letter-spacing: .3px; }
.sc-role-super { background: linear-gradient(135deg, #a855f7, #ec4899); color: #fff; }
.sc-role-owner { background: #f59e0b; color: #1a1205; }
.sc-role-admin { background: #4f7cff; color: #fff; }
.sc-role-mod { background: #22c55e; color: #04150a; }
.sc-role-visitor { background: rgba(255,255,255,.1); color: var(--sc-muted); }

/* ============ ÖZEL MESAJ ============ */
.sc-pm-wrap { display: flex; gap: 16px; height: calc(100vh - 200px); min-height: 400px; }
.sc-pm-list {
    width: 320px;
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: 16px;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sc-pm-list-title { font-size: .8rem; color: var(--sc-muted); font-weight: 800; margin: 10px 0 4px; }
.sc-pm-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 9px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}
.sc-pm-item:hover { background: rgba(255,255,255,.05); }
.sc-pm-item.active { background: rgba(79,124,255,.15); }
.sc-pm-item b { font-size: .9rem; }
.sc-pm-item p { color: var(--sc-muted); font-size: .78rem; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sc-pm-chat {
    flex: 1;
    background: var(--sc-card);
    border: 1px solid var(--sc-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sc-pm-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--sc-border);
}
.sc-pm-head b { flex: 1; }
.sc-pm-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.sc-pm-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--sc-border); }
.sc-pm-input input {
    flex: 1;
    background: var(--sc-bg2);
    border: 1px solid var(--sc-border);
    color: var(--sc-text);
    padding: 11px 14px;
    border-radius: 10px;
    font-size: .95rem;
    outline: none;
}
.sc-pm-input input:focus { border-color: var(--sc-primary); }
.sc-pm-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--sc-muted); text-align: center; gap: 10px; }

.sc-msg { position: relative; display: flex; gap: 8px; max-width: 80%; }
.sc-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.sc-msg.them { align-self: flex-start; }
.sc-msg-bubble { background: var(--sc-bg2); border: 1px solid var(--sc-border); border-radius: 14px; padding: 9px 13px; font-size: .93rem; line-height: 1.5; word-break: break-word; }
.sc-msg.me .sc-msg-bubble { background: var(--sc-primary); border-color: var(--sc-primary); color: #fff; }
.sc-msg-meta { font-size: .68rem; color: var(--sc-muted); margin-top: 3px; }
.sc-msg.me .sc-msg-meta { color: rgba(255,255,255,.75); }
.sc-read { color: #7ee2a8; font-weight: 700; }
.sc-msg-del {
    background: transparent;
    border: none;
    color: var(--sc-muted);
    cursor: pointer;
    font-size: .85rem;
    opacity: 0;
    align-self: center;
    transition: opacity .15s;
}
.sc-msg:hover .sc-msg-del { opacity: 1; }

/* ============ EKRAN / VİDEO ============ */
.sc-screen-box { position: relative; }
.sc-screen-item { background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--sc-border); }
.sc-screen-item video { width: 100%; max-height: 45vh; display: block; background: #000; }
.sc-screen-name { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.7); padding: 4px 10px; border-radius: 8px; display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.sc-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.sc-video-item { position: relative; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--sc-border); }
.sc-video-item video { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; }
.sc-video-name { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.7); padding: 3px 8px; border-radius: 7px; display: flex; align-items: center; gap: 5px; font-size: .75rem; }

.sc-self-box { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-self-box video { width: 240px; border-radius: 10px; border: 1px solid var(--sc-border); }

/* ============ TOAST ============ */
.sc-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: .92rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all .3s;
    max-width: 340px;
    border: 1px solid var(--sc-border);
}
.sc-toast.show { opacity: 1; transform: translateY(0); }

/* scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sc-border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--sc-primary); }
