/* ═══════════════════════════════════════════════════════════════════════
   YBD — Video Konferans Arayüzü
   Tema  : Tanıdık · Güven Veren · Kullanışlı · Premium
   Arkaplan: #18181B (antrasit) — değişmez
   Yüzeyler: #27272A / #2E2E33 / #3F3F46 — kademeli derinlik
   Aksan   : #3B82F6 (mavi) · #22C55E (yeşil) · #EF4444 (kırmızı)
   Font    : Inter (UI) · Syne (brand)
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    /* ── Arkaplan katmanları (alta → üste) */
    --bg:         #18181B;
    --surface-0:  #1F1F23;
    --surface-1:  #27272A;
    --surface-2:  #2E2E33;
    --surface-3:  #3F3F46;

    /* ── Border */
    --border-lo:  rgba(255,255,255,0.06);
    --border-md:  rgba(255,255,255,0.10);
    --border-hi:  rgba(255,255,255,0.17);
    --border-foc: rgba(59,130,246,0.55);

    /* ── Metin */
    --text-0: #F4F4F5;
    --text-1: #A1A1AA;
    --text-2: #71717A;

    /* ── Renkler */
    --blue:       #3B82F6;
    --blue-h:     #2563EB;
    --blue-bg:    rgba(59,130,246,0.12);
    --blue-ring:  rgba(59,130,246,0.28);

    --green:      #22C55E;
    --green-bg:   rgba(34,197,94,0.12);
    --amber:      #F59E0B;

    --red:        #EF4444;
    --red-h:      #DC2626;
    --red-bg:     rgba(239,68,68,0.14);
    --red-ring:   rgba(239,68,68,0.30);

    /* ── Gölgeler */
    --sh-sm: 0 1px 3px rgba(0,0,0,0.4);
    --sh-md: 0 2px 8px rgba(0,0,0,0.45), 0 1px 2px rgba(0,0,0,0.3);
    --sh-lg: 0 8px 32px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.35);
    --sh-xl: 0 20px 60px rgba(0,0,0,0.65), 0 4px 16px rgba(0,0,0,0.4);

    /* ── Layout */
    --panel-w: 316px;

    /* ── Easing */
    --ease:  cubic-bezier(0.4, 0, 0.2, 1);
    --pop:   cubic-bezier(0.34, 1.56, 0.64, 1);
    --slide: cubic-bezier(0.22, 1, 0.36, 1);

    /* ── Köşe */
    --r-xl: 16px;
    --r-lg: 12px;
    --r-md: 8px;
    --r-sm: 6px;
}

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

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text-0);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body            { overflow: hidden; }
body.lobby-active { overflow: auto; overscroll-behavior-y: contain; }

.hidden  { display: none !important; }
.mirror  { transform: scaleX(-1); }
.text-center { text-align: center; }

.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' -25, 'opsz' 24;
    font-size: 20px;
    line-height: 1;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════════════
   UYGULAMA KABUGU
   ═══════════════════════════════════════════════════════════════════════ */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}


/* ─── Top Bar ──────────────────────────────────────────────────────────  */
.top-bar {
    flex-shrink: 0;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--surface-0);
    border: 1px solid var(--border-md);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
}

.top-left { display: flex; align-items: center; gap: 10px; }

.brand-mark {
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    border: 1px solid var(--border-md);
    display: grid; place-items: center;
    overflow: hidden; flex-shrink: 0;
}
.brand-mark img { width: 22px; height: 22px; object-fit: contain; }

.brand-text {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.07em;
    color: var(--text-0);
}

.top-right {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-1); font-size: 0.78rem;
}

.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green); flex-shrink: 0;
    animation: dot-pulse 2.8s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0   var(--green-bg); }
    50%       { box-shadow: 0 0 0 4px var(--green-bg); }
}

.transport-mode {
    padding: 3px 9px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border-lo);
    font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em;
    text-transform: uppercase; color: var(--text-2);
}


/* ═══════════════════════════════════════════════════════════════════════
   WORKSPACE — flex row; panel açılınca video-area sıkışır
   ═══════════════════════════════════════════════════════════════════════ */
.video-workspace {
    flex: 1; min-height: 0;
    display: flex; flex-direction: row; gap: 6px;
}

/* ─── Video Alan ───────────────────────────────────────────────────────  */
.video-area {
    flex: 1; min-width: 0; position: relative;
    transition: flex 300ms var(--slide);
}

.video-grid {
    height: 100%; width: 100%;
    display: grid; gap: 6px;
    align-items: stretch;
    transition: grid-template-columns 300ms var(--slide),
                grid-template-rows    300ms var(--slide);
    contain: layout paint;
}

.layout-single { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.layout-split  { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }

/* ─── Video Kart ───────────────────────────────────────────────────────  */
.video-card {
    position: relative; overflow: hidden;
    border-radius: var(--r-lg);
    background: var(--surface-1);
    border: 1px solid var(--border-md);
    box-shadow: var(--sh-md);
    width: 100%; height: 100%;
    transition: border-color 280ms var(--ease), box-shadow 280ms var(--ease);
}

.video-card.speaking {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px var(--blue-ring), var(--sh-md);
}

video {
    display: block; width: 100%; height: 100%;
    object-fit: cover; background: var(--surface-1);
}

.fullscreen-btn {
    position: absolute; top: 10px; right: 10px; z-index: 8;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border-md);
    background: rgba(24,24,27,0.84);
    color: var(--text-0); display: grid; place-items: center;
    cursor: pointer; opacity: 0; transform: translateY(-4px);
    transition: opacity 180ms ease, transform 180ms ease, background 150ms ease;
    backdrop-filter: blur(8px);
}
.video-card:hover .fullscreen-btn { opacity: 1; transform: none; }
.fullscreen-btn:hover { background: rgba(39,39,42,0.95); border-color: var(--border-hi); }

.video-overlay { position: absolute; left: 12px; bottom: 12px; z-index: 7; }

.user-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px; border-radius: 999px;
    background: rgba(24,24,27,0.84);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-0); font-size: 0.73rem; font-weight: 500;
    backdrop-filter: blur(8px);
    transition: border-color 260ms ease;
}

.user-badge.highlight { border-color: var(--border-hi); }
.user-badge.speaking  { border-color: var(--blue); color: #93C5FD; }

.user-badge.speaking::after {
    content: "graphic_eq";
    font-family: "Material Symbols Rounded";
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' -25, 'opsz' 20;
    font-size: 13px; color: var(--blue);
    animation: eq-anim 1.1s ease-in-out infinite;
}

@keyframes eq-anim {
    0%, 100% { opacity: 0.4; transform: scaleY(0.7); }
    50%       { opacity: 1;   transform: scaleY(1.3); }
}

.presentation-panel {
    position: absolute; inset: 0; z-index: 6;
    background: rgba(24,24,27,0.9);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; text-align: center; padding: 24px;
    backdrop-filter: blur(6px);
}
.presentation-panel .material-symbols-rounded { font-size: 44px; color: var(--blue); }
.presentation-panel h2 { font-size: 1.05rem; font-weight: 600; }
.presentation-panel .subtext { font-size: 0.82rem; color: var(--text-1); max-width: 280px; line-height: 1.6; }

/* Ekran paylaşımı grid */
.video-grid.focus-share { display: block !important; position: relative; }
.video-grid.focus-share .video-card.share-main { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; z-index: 5 !important; }
.video-grid.focus-share .video-card.share-main video { object-fit: contain; }
.video-grid.focus-share .video-card.share-pip {
    position: absolute !important; bottom: 100px !important; right: 16px !important;
    width: 240px !important; height: auto !important; aspect-ratio: 16/9 !important;
    z-index: 10 !important; border-radius: var(--r-md) !important;
    border: 1px solid var(--border-hi) !important; box-shadow: var(--sh-lg) !important;
}
.video-grid.focus-share .video-card.share-pip video { object-fit: cover; }

/* ─── Toplantı Paylaşım Kartı ─────────────────────────────────────────  */
.meeting-ready-card {
    position: absolute; top: 12px; left: 12px; z-index: 26;
    width: min(300px, calc(100% - 24px));
    background: var(--surface-1);
    border: 1px solid var(--border-md);
    border-radius: var(--r-lg);
    padding: 12px 14px;
    box-shadow: var(--sh-lg);
}

body:has(#pendingToggleBtn.hidden) .meeting-ready-card { display: none; }
.meeting-ready-card.js-hidden { display: none !important; }

.meeting-ready-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.meeting-ready-title { font-size: 0.80rem; font-weight: 600; color: var(--text-0); }

.meeting-ready-toggle {
    width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid var(--border-md); background: transparent;
    color: var(--text-1); display: grid; place-items: center; cursor: pointer;
    transition: background 150ms ease;
}
.meeting-ready-toggle:hover { background: var(--surface-2); color: var(--text-0); }
.meeting-ready-toggle .material-symbols-rounded { font-size: 16px; transition: transform 200ms var(--ease); }
.meeting-ready-card.collapsed .meeting-ready-body { display: none; }
.meeting-ready-card.collapsed .meeting-ready-toggle .material-symbols-rounded { transform: rotate(180deg); }

.meeting-ready-body { margin-top: 10px; }
.meeting-link { font-size: 0.71rem; color: var(--text-1); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.meeting-copy-btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 12px; border-radius: 999px;
    border: 1px solid var(--border-md); background: var(--surface-2);
    color: var(--text-0); font-size: 0.72rem; font-weight: 500;
    cursor: pointer; transition: background 150ms ease, border-color 150ms ease;
}
.meeting-copy-btn:hover { background: var(--surface-3); border-color: var(--border-hi); }
.meeting-copy-btn .material-symbols-rounded { font-size: 14px; }


/* ═══════════════════════════════════════════════════════════════════════
   SIDE PANEL — slide-in animation, flex sibling (video daralır)
   ═══════════════════════════════════════════════════════════════════════ */
.utility-panels {
    width: var(--panel-w);
    min-width: var(--panel-w);
    min-height: 0;
    flex-shrink: 0;
    background: var(--surface-1);
    border: 1px solid var(--border-md);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: panel-in 280ms var(--slide) both;
}

#utilityPanels.hidden { display: none !important; }

@keyframes panel-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: none; }
}

.utility-panel {
    height: 100%; display: flex; flex-direction: column;
    padding: 0; gap: 0; overflow: hidden;
}

.panel-head {
    flex-shrink: 0; padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border-lo);
    background: var(--surface-1);
}

.panel-head h3 {
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-1);
}

.panel-list {
    list-style: none; display: flex; flex-direction: column; gap: 2px;
    overflow-y: auto; flex: 1; min-height: 0; padding: 8px;
    scrollbar-width: thin; scrollbar-color: var(--border-md) transparent;
}
.panel-list::-webkit-scrollbar { width: 4px; }
.panel-list::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 2px; }

.panel-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 11px; border-radius: var(--r-md);
    background: var(--surface-2); border: 1px solid var(--border-lo);
    transition: background 150ms ease, border-color 150ms ease;
}
.panel-item:hover { background: var(--surface-3); border-color: var(--border-md); }
.panel-item-title { font-size: 0.82rem; font-weight: 500; color: var(--text-0); }
.panel-item-sub   { font-size: 0.69rem; color: var(--text-2); margin-top: 2px; }

.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 999px;
    font-size: 0.62rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
    background: var(--surface-3); border: 1px solid var(--border-md); color: var(--text-1);
    flex-shrink: 0;
}
.badge.host { background: var(--blue-bg); border-color: var(--blue-ring); color: #93C5FD; }
.badge.you  { background: var(--red-bg);  border-color: var(--red-ring);  color: #FCA5A5; }

.item-actions { display: flex; gap: 4px; flex-shrink: 0; }

.item-btn {
    height: 28px; padding: 0 10px; border-radius: var(--r-sm);
    border: 1px solid transparent; background: transparent;
    font-size: 0.73rem; font-weight: 500; font-family: inherit;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease,
                color 140ms ease, transform 100ms var(--pop);
}
.item-btn:active { transform: scale(0.94); }
.item-btn.accept { color: #4ADE80; border-color: rgba(74,222,128,0.20); }
.item-btn.accept:hover { background: rgba(74,222,128,0.10); border-color: rgba(74,222,128,0.35); }
.item-btn.reject { color: #F87171; border-color: rgba(248,113,113,0.20); }
.item-btn.reject:hover { background: rgba(248,113,113,0.10); border-color: rgba(248,113,113,0.35); }

/* ─── Sohbet ─────────────────────────────────────────────────────────── */
.chat-messages {
    flex: 1; min-height: 0; overflow-y: auto;
    display: flex; flex-direction: column; gap: 6px;
    padding: 10px 10px 6px;
    scrollbar-width: thin; scrollbar-color: var(--border-md) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 2px; }

.chat-bubble {
    max-width: 88%;
    background: var(--surface-2);
    border: 1px solid var(--border-lo);
    border-radius: var(--r-lg); border-bottom-left-radius: 4px;
    padding: 8px 12px;
    animation: bubble-in 160ms var(--ease) both;
}

@keyframes bubble-in {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

.chat-bubble.me {
    align-self: flex-end;
    background: var(--blue-bg); border-color: var(--blue-ring);
    border-bottom-left-radius: var(--r-lg); border-bottom-right-radius: 4px;
}

.chat-meta  { font-size: 0.62rem; color: var(--text-2); margin-bottom: 3px; }
.chat-text  { font-size: 0.82rem; color: var(--text-0); line-height: 1.5; word-break: break-word; }

.chat-form {
    display: flex; gap: 6px; flex-shrink: 0;
    padding: 8px 10px; border-top: 1px solid var(--border-lo);
    background: var(--surface-1);
}

.chat-form input {
    flex: 1; height: 38px;
    border: 1px solid var(--border-md); border-radius: var(--r-md);
    background: var(--surface-2); color: var(--text-0);
    padding: 0 12px; font-size: 0.82rem; font-family: inherit; outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.chat-form input::placeholder { color: var(--text-2); }
.chat-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }

.icon-btn {
    width: 38px; height: 38px; border-radius: var(--r-md);
    border: 1px solid var(--border-md); background: var(--surface-2);
    color: var(--text-1); display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
    transition: background 150ms ease, border-color 150ms ease,
                color 150ms ease, transform 100ms var(--pop);
}
.icon-btn:hover { background: var(--blue-bg); border-color: var(--blue-ring); color: #93C5FD; }
.icon-btn:active { transform: scale(0.90); }

.pending-empty { height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.pending-empty-icon { font-size: 34px; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' -25, 'opsz' 40; color: var(--text-2); opacity: 0.5; }
.pending-empty-text { font-size: 0.76rem; color: var(--text-2); }


/* ═══════════════════════════════════════════════════════════════════════
   KONTROL DOCK — Belirgin, geniş tıklama alanları, Zoom tanıdıklığı
   ═══════════════════════════════════════════════════════════════════════ */
.controls-wrapper {
    flex-shrink: 0;
    display: flex; justify-content: center; align-items: center;
    padding-bottom: max(2px, env(safe-area-inset-bottom));
}

.glass-controls {
    display: inline-flex; align-items: center; gap: 4px;
    height: 78px; padding: 0 20px;
    border-radius: 20px;
    background: var(--surface-0);
    border: 1px solid var(--border-md);
    box-shadow: var(--sh-lg), 0 0 0 0.5px rgba(255,255,255,0.03) inset;
}

.ctrl-group { display: flex; align-items: center; gap: 2px; }

.ctrl-divider {
    width: 1px; height: 36px;
    background: var(--border-md); border-radius: 1px;
    margin: 0 10px; flex-shrink: 0;
}

.ctrl-btn {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px;
    width: 62px; height: 62px;
    border-radius: var(--r-lg); border: 1px solid transparent;
    background: transparent; color: var(--text-1);
    cursor: pointer; position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: background 160ms var(--ease), border-color 160ms var(--ease),
                color 160ms var(--ease), transform 120ms var(--pop);
}

.ctrl-btn .material-symbols-rounded { font-size: 22px; }

.ctrl-label {
    font-size: 0.58rem; font-weight: 500; letter-spacing: 0.03em;
    line-height: 1; white-space: nowrap;
    transition: color 160ms ease;
}

.ctrl-btn:hover  { background: var(--surface-2); border-color: var(--border-md); color: var(--text-0); }
.ctrl-btn:active { transform: scale(0.93); }

.ctrl-btn.utility.active {
    background: var(--blue-bg); border-color: var(--blue-ring); color: #93C5FD;
}
.ctrl-btn.utility.active .ctrl-label { color: #93C5FD; }

.ctrl-btn.off {
    background: var(--red-bg); border-color: var(--red-ring); color: #FCA5A5;
}
.ctrl-btn.off .ctrl-label { color: #FCA5A5; }

/* Kapat — kırmızı, ayrışık, belirgin */
.ctrl-btn.hangup {
    width: 74px;
    background: var(--red); border-color: transparent; color: #fff;
    box-shadow: 0 2px 12px rgba(239,68,68,0.45);
}
.ctrl-btn.hangup .ctrl-label { color: rgba(255,255,255,0.85); }
.ctrl-btn.hangup:hover {
    background: var(--red-h); color: #fff; border-color: transparent;
    box-shadow: 0 4px 20px rgba(239,68,68,0.55);
}
.ctrl-btn.hangup:active { transform: scale(0.91); }

.ctrl-btn.has-unread::after {
    content: ''; position: absolute; top: 9px; right: 11px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--red); border: 2px solid var(--surface-0);
    animation: dot-pulse 2s ease-in-out infinite;
}


/* ═══════════════════════════════════════════════════════════════════════
   OVERLAY'LER
   ═══════════════════════════════════════════════════════════════════════ */
.full-overlay {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    animation: overlay-in 200ms ease both;
}

@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

#waitingOverlay { z-index: 160; }


/* ─── Hazırlık Odası ─────────────────────────────────────────────────── */
.green-room-overlay {
    z-index: 140; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 20px 16px; align-items: flex-start;
    background: rgba(0,0,0,0.82);
}

.lobby-socket-hint {
    position: fixed; top: 14px; right: 16px; z-index: 165;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.28);
    color: var(--amber); font-size: 0.72rem; font-weight: 500;
    backdrop-filter: blur(8px);
}

/* Kart — gerçek bir uygulama penceresi */
.green-room-card {
    width: min(860px, 96vw);
    background: var(--surface-1);
    border: 1px solid var(--border-md);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-xl);
    overflow: hidden;
    margin: auto;
    animation: card-in 280ms var(--slide) both;
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.green-room-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border-lo);
}

.green-room-brand {
    font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: 0.70rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--blue); margin-bottom: 6px;
}

.green-room-header h2 {
    font-size: 1.4rem; font-weight: 600; color: var(--text-0);
    margin-bottom: 4px; line-height: 1.25;
}

.green-room-header p { font-size: 0.84rem; color: var(--text-1); }

/* İki sütun gövde */
.green-room-body { display: grid; grid-template-columns: 1.05fr 1fr; }

.green-room-left {
    padding: 22px 18px 22px 28px;
    display: flex; flex-direction: column; gap: 14px;
    border-right: 1px solid var(--border-lo);
}

.green-room-right {
    padding: 22px 28px 22px 18px;
    display: flex; flex-direction: column;
}

/* Kamera önizleme */
.green-room-preview-wrap {
    position: relative; border-radius: var(--r-lg); overflow: hidden;
    background: var(--bg); border: 1px solid var(--border-md);
    aspect-ratio: 16/10; box-shadow: var(--sh-sm);
}

#greenRoomPreview {
    width: 100%; height: 100%; object-fit: cover;
    transform: scaleX(-1); background: var(--bg); display: block;
}

.green-room-preview-label {
    position: absolute; left: 10px; bottom: 10px;
    padding: 3px 9px; border-radius: 999px;
    background: rgba(24,24,27,0.85); border: 1px solid var(--border-md);
    color: var(--text-1); font-size: 0.64rem; font-weight: 500;
    letter-spacing: 0.06em; text-transform: uppercase; backdrop-filter: blur(6px);
}

/* Mikrofon meter */
.green-room-meter { display: flex; flex-direction: column; gap: 7px; }

.green-room-meter-title {
    font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-2);
    display: flex; align-items: center; gap: 4px;
}

.green-room-meter-track {
    width: 100%; height: 5px; border-radius: 999px;
    background: var(--surface-3); overflow: hidden; border: 1px solid var(--border-lo);
}

.green-room-meter-fill {
    width: 0%; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--green), var(--blue));
    transition: width 80ms linear;
}

/* Cihaz formu */
.green-room-devices { display: flex; flex-direction: column; gap: 14px; }

.green-room-field { display: flex; flex-direction: column; gap: 5px; }

.green-room-field > span {
    font-size: 0.67rem; font-weight: 600; letter-spacing: 0.07em;
    text-transform: uppercase; color: var(--text-2);
}

.green-room-field input,
.green-room-field select {
    height: 42px; border-radius: var(--r-md);
    border: 1px solid var(--border-md); background: var(--surface-2);
    color: var(--text-0); padding: 0 13px;
    font-size: 0.84rem; font-family: 'Inter', sans-serif; outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.green-room-field input::placeholder { color: var(--text-2); }

.green-room-field input:focus,
.green-room-field select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-bg);
}

/* Birincil buton — Katıl */
.green-room-join {
    width: 100%; height: 46px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: var(--r-md); border: none;
    background: var(--blue); color: #fff;
    font-family: 'Inter', sans-serif; font-size: 0.90rem; font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(59,130,246,0.40);
    transition: background 160ms ease, box-shadow 160ms ease, transform 120ms var(--pop);
}
.green-room-join:hover:not(:disabled) {
    background: var(--blue-h);
    box-shadow: 0 4px 18px rgba(59,130,246,0.50);
}
.green-room-join:active:not(:disabled) { transform: scale(0.97); }
.green-room-join:disabled { opacity: 0.42; cursor: not-allowed; box-shadow: none; }

/* İkincil buton — Host Başlat */
.green-room-start-host {
    width: 100%; height: 40px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border-radius: var(--r-md); border: 1px solid var(--border-md);
    background: transparent; color: var(--text-1);
    font-family: 'Inter', sans-serif; font-size: 0.84rem; font-weight: 500;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease,
                color 160ms ease, transform 120ms var(--pop);
}
.green-room-start-host:hover:not(:disabled) {
    background: var(--surface-2); border-color: var(--border-hi); color: var(--text-0);
}
.green-room-start-host:active:not(:disabled) { transform: scale(0.97); }
.green-room-start-host:disabled { opacity: 0.38; cursor: not-allowed; }

.green-room-status {
    font-size: 0.73rem; color: var(--text-2);
    margin-top: auto; padding-top: 14px;
}

.green-room-warning {
    font-size: 0.72rem; font-weight: 500; color: var(--amber); padding-top: 6px;
}


/* ─── Modal (Onay Bekleniyor) ────────────────────────────────────────── */
.modal-content {
    width: min(380px, 92vw);
    background: var(--surface-1); border: 1px solid var(--border-md);
    border-radius: var(--r-xl); padding: 36px 28px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    box-shadow: var(--sh-xl);
    animation: card-in 260ms var(--slide) both;
}
.modal-content h2 { font-size: 1.1rem; font-weight: 600; color: var(--text-0); }
.modal-content p  { font-size: 0.84rem; color: var(--text-1); line-height: 1.65; }

.loader-ring {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2.5px solid var(--border-md); border-top-color: var(--blue);
    animation: spin 0.85s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Yeniden bağlanma ───────────────────────────────────────────────── */
.connection-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); pointer-events: none;
}

.connection-overlay-card {
    min-width: min(340px, 90vw);
    background: var(--surface-1); border: 1px solid var(--border-md);
    border-radius: var(--r-xl); padding: 28px 24px;
    display: grid; justify-items: center; gap: 12px;
    box-shadow: var(--sh-xl); pointer-events: auto;
    animation: card-in 240ms var(--slide) both;
}
.connection-overlay-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-0); }
.connection-overlay-card p  { font-size: 0.80rem; color: var(--text-1); }

/* ─── Host Toast ─────────────────────────────────────────────────────── */
.host-toast-layer {
    position: fixed; top: 64px; right: 16px; z-index: 130;
    display: flex; flex-direction: column; gap: 6px; pointer-events: none;
}

.host-toast {
    min-width: 230px; max-width: 310px;
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    border-radius: var(--r-lg); border: 1px solid var(--border-md);
    background: var(--surface-1); color: var(--text-0);
    box-shadow: var(--sh-lg); pointer-events: auto;
    animation: toast-in 220ms var(--slide) both;
}

.host-toast.leaving { animation: toast-out 200ms var(--ease) forwards; }

@keyframes toast-in  { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

.host-toast-icon { font-size: 18px; color: var(--blue); flex-shrink: 0; }
.host-toast-text { font-size: 0.80rem; font-weight: 500; color: var(--text-0); flex: 1; }


/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

/* Tablet: panel alta kayar */
@media (max-width: 900px) {
    .video-workspace { flex-direction: column; }

    .utility-panels {
        width: 100%; min-width: 0; height: 44%;
        flex-shrink: 0;
        border-radius: var(--r-lg) var(--r-lg) 0 0;
        animation: panel-in-btm 260ms var(--slide) both;
    }

    @keyframes panel-in-btm {
        from { opacity: 0; transform: translateY(20px); }
        to   { opacity: 1; transform: none; }
    }
}

/* Mobil */
@media (max-width: 700px) {
    .app-container { padding: 6px; gap: 5px; }
    .top-bar { height: 46px; padding: 0 12px; }

    .glass-controls { height: 70px; padding: 0 12px; border-radius: var(--r-xl); gap: 2px; }
    .ctrl-btn { width: 54px; height: 54px; }
    .ctrl-btn .material-symbols-rounded { font-size: 20px; }
    .ctrl-label { display: none; }
    .ctrl-btn.hangup { width: 64px; }
    .ctrl-divider { margin: 0 6px; }

    .layout-split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }

    .green-room-body { grid-template-columns: 1fr; }
    .green-room-left { border-right: none; border-bottom: 1px solid var(--border-lo); padding: 16px 20px; }
    .green-room-right { padding: 16px 20px; }
    .green-room-header { padding: 18px 20px 14px; }

    .video-grid.focus-share .video-card.share-pip { width: 160px !important; right: 10px !important; bottom: 82px !important; }

    .meeting-ready-card { top: 8px; left: 8px; width: calc(100% - 16px); }

    .host-toast-layer { right: 8px; left: 8px; }
    .host-toast { min-width: 0; width: 100%; max-width: 100%; }
}

@media (pointer: coarse) {
    .ctrl-btn { min-width: 48px; min-height: 48px; }
    .controls-wrapper { padding-bottom: max(6px, env(safe-area-inset-bottom)); }
}
