:root {
  --blue: #0e72ed;
  --blue-d: #0b5cc0;
  --orange: #f26d21;
  --green: #23d959;
  --red: #e02828;
  --bg: #1a1a1a;
  --bg2: #242424;
  --bg3: #2f2f2f;
  --line: #3a3a3a;
  --text: #f5f5f5;
  --muted: #a6a6a6;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: var(--font); }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
.mirror { transform: scaleX(-1); }

/* ---------- butonlar ---------- */
.btn { border: 1px solid var(--line); background: var(--bg3); color: var(--text); border-radius: 8px; padding: 8px 14px; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; padding: 8px 18px; }
.btn-lg { padding: 12px 22px; font-size: 16px; font-weight: 600; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.form-error { color: #ff6b6b; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ===================== ANA SAYFA ===================== */
body.home { background: #f7f8fa; color: #232333; }
.home-header { padding: 18px 32px; background: #fff; border-bottom: 1px solid #e6e6ea; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.teacher-bar { display: flex; align-items: center; gap: 14px; font-size: 14px; color: #555; }
.link-btn { background: none; border: 0; color: var(--blue); font-size: 14px; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.stack-form { display: flex; flex-direction: column; gap: 8px; }
.stack-form input { padding: 12px 14px; border: 1px solid #d5d5dd; border-radius: 8px; font-size: 15px; }
.my-rooms .live { color: #1a9d45; font-style: normal; font-size: 12.5px; margin-left: 6px; }
.my-rooms .empty-li { color: #777; justify-content: center; }
@media (max-width: 600px) { .home-header { padding: 14px 16px; } .hero h1 { font-size: 30px; } .home-main { padding: 28px 16px; } }
.logo { font-weight: 800; font-size: 22px; color: var(--blue); display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 15px; }
.home-main { max-width: 980px; margin: 0 auto; padding: 56px 16px; }
.hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 14px; }
.hero p { font-size: 17px; color: #5b5b6b; max-width: 620px; line-height: 1.5; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 40px; }
.card { background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 2px 14px rgba(0,0,0,.06); }
.card h2 { margin: 14px 0 6px; font-size: 20px; }
.card p { color: #6b6b7b; margin: 0 0 20px; }
.card-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; color: #fff; }
.card-icon.orange { background: var(--orange); }
.card-icon.blue { background: var(--blue); }
.join-form { display: flex; gap: 8px; }
.join-form input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid #d5d5dd; border-radius: 8px; font-size: 15px; }

.my-rooms { margin-top: 36px; }
.my-rooms h2 { font-size: 20px; }
.my-rooms ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.my-rooms li { background: #fff; border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.mr-info { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.mr-info span { color: #777; font-size: 13px; word-break: break-all; }
.mr-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.home .btn:not(.btn-blue):not(.btn-primary) { background: #f0f1f4; color: #232333; border-color: #dcdde3; }
.mr-del { color: #c33 !important; }

/* ===================== ODA ===================== */
body.room { background: var(--bg); color: var(--text); overflow: hidden; }

/* ---------- katılmadan önce ---------- */
.prejoin { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.prejoin-box { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 28px; width: min(1000px, 100%); align-items: center; }
.preview-wrap { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; }
.preview-wrap video { width: 100%; height: 100%; object-fit: cover; }
.preview-off { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 18px; }
.preview-controls { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; }
.round-btn { width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(40,40,40,.75); color: #fff; display: grid; place-items: center; padding: 13px; backdrop-filter: blur(6px); }
.round-btn.off { background: var(--red); border-color: var(--red); }
.round-btn svg { width: 22px; height: 22px; }
.mic-meter { position: absolute; left: 16px; bottom: 16px; width: 70px; height: 6px; background: rgba(255,255,255,.2); border-radius: 3px; overflow: hidden; }
.mic-meter div { height: 100%; width: 0; background: var(--green); transition: width .1s; }
.prejoin-form h2 { margin: 0 0 4px; font-size: 26px; }
.room-code { color: var(--muted); margin-bottom: 18px; font-size: 14px; }
.prejoin-form label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.prejoin-form input, .prejoin-form select { width: 100%; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: 15px; }
.prejoin-form .btn-block { margin-top: 22px; }
@media (max-width: 760px) { .prejoin-box { grid-template-columns: 1fr; } }

.waiting-box { text-align: center; padding: 20px; }
.waiting-box h2 { margin: 14px 0 6px; }
.waiting-box p { color: #c7c7c7; margin: 6px 0; }
.waiting-box .hint { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.spinner { width: 42px; height: 42px; margin: 0 auto; border: 4px solid #3a3a3a; border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toplantı iskeleti ---------- */
.meeting { position: fixed; inset: 0; display: flex; flex-direction: column; }
.topbar { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-size: 13px; color: #ddd; flex-shrink: 0; }
.topbar-left { display: flex; gap: 8px; align-items: center; }
.sep { color: #666; }
.secure-dot { color: var(--green); }
.badge-red { color: #ff5a5a; font-weight: 600; margin-left: 8px; }
.time-wrap { position: relative; }
.time-left { background: #2b3a52; color: #cfe2ff; border: 1px solid #3c5579; border-radius: 6px; padding: 3px 10px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.time-left.host { cursor: pointer; }
.time-left.warn { background: #5a3a12; border-color: #a86a1c; color: #ffd28a; }
.time-left.danger { background: #5c1a1a; border-color: #b33; color: #ffb3b3; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .6; } }
#timeMenu { top: calc(100% + 6px); left: 0; }
.top-btn { background: var(--bg3); border: 1px solid var(--line); color: #eee; border-radius: 6px; padding: 4px 10px; font-size: 12px; margin-left: 6px; }

.content { flex: 1; display: flex; min-height: 0; }
.main { flex: 1; position: relative; display: flex; gap: 8px; padding: 4px 8px 8px; min-width: 0; min-height: 0; }

/* ---------- kutucuklar ---------- */
.tile { position: relative; background: #2a2a2a; border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .15s; }
.tile.speaking { outline-color: var(--green); }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.tile .avatar { position: absolute; inset: 0; display: none; place-items: center; background: #232323; }
.tile .avatar span { width: 30%; max-width: 120px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(18px, 3vw, 44px); font-weight: 700; color: #fff; }
.tile.no-video video { visibility: hidden; }
.tile.no-video .avatar { display: grid; }
.name-tag { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 5px; font-size: 13px; display: flex; align-items: center; gap: 4px; max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-tag .mic svg { width: 14px; height: 14px; color: #ff4d4d; display: block; }
.hand-badge { position: absolute; top: 8px; left: 8px; background: #f5c518; color: #000; border-radius: 6px; padding: 2px 8px; font-size: 18px; }
.conn-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); border-radius: 6px; padding: 3px 8px; font-size: 12px; color: #ffd27a; }
.reaction-layer { position: absolute; inset: 0; pointer-events: none; }
.reaction { position: absolute; top: 10px; right: 14px; font-size: 42px; animation: floatUp 4s ease-out forwards; }
@keyframes floatUp { 0% { transform: translateY(20px) scale(.6); opacity: 0; } 10% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-30px); opacity: 0; } }

.tiles { flex: 1; min-width: 0; min-height: 0; }

/* Galeri */
.gallery-mode .stage { display: none; }
.gallery-mode .tiles { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px; }
.gallery-mode .tile { width: var(--tile-w, 320px); }

/* Birebir (Zoom'un 2 kişilik görünümü): karşı taraf tam ekran, ben köşede */
.duo-mode .stage { display: none; }
.duo-mode .tiles { position: relative; }
.duo-mode .tile { display: none; }
.duo-mode .tile.duo-remote { display: block; position: absolute; inset: 0; aspect-ratio: auto; border-radius: 10px; }
.duo-mode .tile.duo-remote video { object-fit: contain; }
.duo-mode .tile.self { display: block; position: absolute; right: 16px; bottom: 16px; width: clamp(160px, 22%, 300px); z-index: 3; box-shadow: 0 6px 24px rgba(0,0,0,.6); border: 1px solid #444; }

/* Konuşmacı (3+ kişi) */
.speaker-mode .stage { display: none; }
.speaker-mode .tiles { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 8px; overflow-x: auto; }
.speaker-mode .tile { width: 190px; flex-shrink: 0; }
.speaker-mode .tile.featured { position: absolute; inset: 0 0 122px 0; width: auto; aspect-ratio: auto; }
.speaker-mode .tile.featured video { object-fit: contain; }

/* Sahne (ekran paylaşımı / beyaz tahta) + sağda film şeridi */
.stage { position: relative; flex: 1; min-width: 0; background: #111; border-radius: 10px; overflow: hidden; }
.stage-media, .stage-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-media video { object-fit: contain; background: #111; }
.board-canvas { position: absolute; inset: 0; touch-action: none; }
.board-canvas:not(.annotate) { background: #3a3a3a; }
.share-banner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(35, 217, 89, .92); color: #062; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; z-index: 4; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.share-banner button { background: var(--red); color: #fff; border: 0; border-radius: 6px; padding: 4px 10px; font-weight: 600; }
.stage-mode .tiles { flex: 0 0 220px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.stage-mode .tile { width: 100%; flex-shrink: 0; }
@media (max-width: 760px) {
  .stage-mode { flex-direction: column; }
  .stage-mode .tiles { flex: 0 0 100px; flex-direction: row; overflow-x: auto; }
  .stage-mode .tile { width: 170px; }
}

.pdf-nav { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 5; background: rgba(20,20,20,.85); border: 1px solid #444; border-radius: 10px; padding: 5px 8px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; white-space: nowrap; }
.pdf-nav button { background: #333; color: #fff; border: 0; border-radius: 6px; width: 32px; height: 28px; }
.pdf-nav button:hover { background: var(--blue); }
.pdf-nav button:disabled { opacity: .35; cursor: default; background: #333; }
.pdf-name { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- yan panel ---------- */
.waiting-sec { border-bottom: 1px solid var(--line); background: rgba(242, 109, 33, .07); }
.ws-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 4px; font-size: 13.5px; }
.waiting-sec .participant-list { flex: none; max-height: 220px; }
.w-actions { display: flex; gap: 4px; }
.w-actions button { border: 0; border-radius: 6px; padding: 5px 10px; font-size: 12.5px; color: #fff; background: #444; }
.w-actions .ok { background: var(--blue); }
.cb-badge.wait { background: var(--orange); right: auto; left: 12px; }
.side-panel { width: 330px; flex-shrink: 0; background: var(--bg2); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panel-tabs { display: flex; border-bottom: 1px solid var(--line); }
.panel-tabs button { flex: 1; background: none; border: 0; color: var(--muted); padding: 12px 6px; font-size: 14px; border-bottom: 2px solid transparent; }
.panel-tabs button.active { color: #fff; border-bottom-color: var(--blue); }
.panel-tabs .panel-close { flex: 0 0 40px; }
.panel-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.participant-list { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; flex: 1; }
.participant-list li { display: flex; align-items: center; gap: 8px; padding: 8px 14px; position: relative; font-size: 14px; }
.participant-list li:hover { background: var(--bg3); }
.participant-list li.has-hand { background: rgba(245, 197, 24, .08); }
.p-av { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.p-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-name i { color: var(--muted); font-style: normal; font-size: 12px; }
.p-ic svg { width: 17px; height: 17px; display: block; color: #ccc; }
.p-ic.off svg { color: #ff4d4d; }
.p-actions { display: none; position: absolute; right: 10px; gap: 4px; background: var(--bg3); padding-left: 6px; }
.participant-list li:hover .p-actions { display: flex; }
.p-actions button { background: #3d3d3d; border: 1px solid #555; color: #fff; border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.p-actions .menu { top: 100%; right: 0; bottom: auto; }
.host-tools { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.host-more { position: relative; }

.chat-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { font-size: 14px; }
.chat-meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.chat-meta i { color: var(--orange); font-style: normal; }
.chat-text { background: var(--bg3); padding: 8px 10px; border-radius: 8px; word-wrap: break-word; line-height: 1.4; display: inline-block; max-width: 100%; }
.chat-msg.mine { text-align: right; }
.chat-msg.mine .chat-text { background: var(--blue); text-align: left; }
.chat-text a { color: #9cc7ff; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-family: inherit; font-size: 14px; }
.badge, .cb-badge { background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 6px; }

/* ---------- alt kontrol çubuğu ---------- */
.controlbar { height: 68px; background: #121212; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; flex-shrink: 0; position: relative; z-index: 10; }
.cb-group { display: flex; align-items: center; gap: 2px; }
.cb-group.center { flex: 1; justify-content: center; }
.cb-group.right { position: relative; }
.cb-split { position: relative; display: flex; align-items: stretch; }
.cb-btn { background: none; border: 0; color: #eee; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 8px; min-width: 70px; position: relative; font-size: 12px; }
.cb-btn:hover, .cb-caret:hover { background: #2b2b2b; }
.cb-btn .ic { font-size: 20px; height: 24px; display: grid; place-items: center; }
.cb-btn .ic svg { width: 24px; height: 24px; }
.cb-btn.off .ic { color: var(--red); }
.cb-btn.share .ic { color: var(--green); font-weight: 700; }
.cb-btn.share.stop .ic { color: var(--red); }
.cb-btn.active { background: #2b2b2b; color: var(--green); }
.cb-caret { background: none; border: 0; color: #aaa; font-size: 11px; padding: 0 6px; border-radius: 6px; align-self: flex-start; margin-top: 8px; height: 22px; }
.cb-badge { position: absolute; top: 2px; right: 12px; }
@media (max-width: 900px) {
  .cb-btn { min-width: 52px; padding: 6px; }
  .cb-btn .lbl { display: none; }
  .controlbar { height: 58px; }
}
/* Telefon: cihaz seçme okları gizli, düğmeler daha dar */
@media (max-width: 520px) {
  .controlbar { padding: 0 4px; }
  .cb-caret { display: none; }
  .cb-btn { min-width: 40px; padding: 6px 3px; }
  .cb-btn .ic svg { width: 22px; height: 22px; }
  .btn-danger { padding: 8px 12px; font-size: 13px; }
  .topbar { font-size: 12px; padding: 0 8px; }
  .topbar .sep, #roomLabel { display: none; }
  .duo-mode .tile.self { width: 34%; right: 8px; bottom: 8px; }
  .anno-bar { max-width: calc(100vw - 16px); overflow-x: auto; }
}

/* ---------- menüler ---------- */
.menu { position: absolute; z-index: 50; background: #2a2a2a; border: 1px solid #444; border-radius: 10px; padding: 6px 0; min-width: 240px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.menu.up { bottom: calc(100% + 8px); left: 0; }
.menu.right { left: auto; right: 0; }
.menu-title { font-size: 12px; color: var(--muted); padding: 8px 14px 4px; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; color: #eee; padding: 8px 14px 8px 30px; font-size: 13.5px; position: relative; }
.menu-item:hover { background: var(--blue); color: #fff; }
.menu-item.checked::before { content: "✓"; position: absolute; left: 11px; }
.menu-item.danger { color: #ff6464; }
.menu-item.danger:hover { color: #fff; background: var(--red); }
.menu-check { display: flex; gap: 8px; align-items: center; padding: 8px 14px; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.menu-check:hover { background: #333; }
.menu-empty { padding: 6px 14px 6px 30px; color: var(--muted); font-size: 13px; }
.menu hr { border: 0; border-top: 1px solid #444; margin: 6px 0; }
.react-menu { min-width: 0; padding: 8px; }
.react-row { display: flex; gap: 4px; }
.react-row button { background: none; border: 0; font-size: 26px; padding: 4px 6px; border-radius: 8px; }
.react-row button:hover { background: #3a3a3a; transform: scale(1.15); }
.hand-item { padding-left: 14px; margin-top: 6px; border-radius: 6px; text-align: center; background: #3a3a3a; }
.host-tools .menu { min-width: 280px; }

/* ---------- açıklama araç çubuğu (Zoom tarzı açık gri) ---------- */
.anno-bar { position: fixed; top: 46px; left: 50%; transform: translateX(-50%); background: #f2f2f4; color: #232333; border-radius: 10px; display: flex; align-items: stretch; padding: 4px; gap: 1px; box-shadow: 0 6px 24px rgba(0,0,0,.45); z-index: 40; user-select: none; }
.anno-grip { cursor: grab; color: #999; display: grid; place-items: center; padding: 0 6px; font-size: 12px; letter-spacing: -2px; }
.anno-split { position: relative; display: flex; }
.anno-btn { background: none; border: 0; color: #232333; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 5px 8px; border-radius: 7px; font-size: 11px; min-width: 52px; }
.anno-btn:hover { background: #e2e2e8; }
.anno-btn.active { background: #dbe8fd; color: var(--blue); }
.anno-btn .ai { font-size: 18px; height: 22px; display: grid; place-items: center; line-height: 1; }
.color-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #aaa; display: block; }
.anno-sub { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #fff; border-radius: 10px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.3); display: grid; grid-template-columns: repeat(4, 38px); gap: 4px; z-index: 41; }
.anno-sub button { width: 38px; height: 38px; border: 0; background: none; border-radius: 7px; font-size: 18px; color: #232333; }
.anno-sub button:hover { background: #eef0f5; }
.anno-sub button.active { background: #dbe8fd; color: var(--blue); }
.list-sub { grid-template-columns: 1fr; min-width: 230px; }
.list-sub button { width: 100%; height: auto; text-align: left; padding: 9px 12px; font-size: 13.5px; }
.format-sub { grid-template-columns: 1fr; width: 200px; }
.fmt-title { font-size: 11.5px; color: #777; padding: 4px 4px 0; }
.color-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 4px; }
.color-grid button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #ccc; padding: 0; }
.color-grid button.active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.width-row { display: flex; gap: 4px; padding: 2px 4px; }
.width-row button { flex: 1; height: 32px; width: auto; display: grid; place-items: center; }
.width-row button span { display: block; width: 28px; background: #232333; border-radius: 4px; }
.text-editor { position: fixed; z-index: 45; background: rgba(255,255,255,.9); border: 1.5px dashed var(--blue); outline: none; resize: none; min-width: 160px; padding: 2px 4px; font-family: var(--font); line-height: 1.25; overflow: hidden; }

/* ---------- bildirimler ---------- */
.toasts { position: fixed; top: 48px; right: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: 360px; }
body.panel-open .toasts { right: 344px; }
@media (max-width: 760px) { body.panel-open .toasts { right: 14px; top: auto; bottom: 70px; } }
.toast { background: #2d2d2d; border: 1px solid #444; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; box-shadow: 0 6px 20px rgba(0,0,0,.45); animation: slideIn .2s ease-out; }
.toast span { flex: 1; min-width: 160px; }
.toast button { background: var(--blue); color: #fff; border: 0; border-radius: 6px; padding: 5px 10px; font-size: 12.5px; }
.toast button + button { background: #444; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } }

/* ---------- modallar ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 80; padding: 16px; }
.modal-box { background: #262626; border: 1px solid #3c3c3c; border-radius: 14px; padding: 22px; width: min(520px, 100%); color: var(--text); }
.modal-box.wide { width: min(900px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; }
.modal-x { background: none; border: 0; color: #aaa; font-size: 18px; }
.modal-box p { color: #c7c7c7; line-height: 1.5; }
.copy-row { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.copy-row input { flex: 1; min-width: 0; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: #fff; font-size: 14px; }
.share-quick { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.bg-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-top: 16px; }
.bg-preview { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden; }
.bg-preview video { width: 100%; height: 100%; object-fit: cover; }
.bg-loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); }
.bg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bg-opt { aspect-ratio: 16/9; border-radius: 8px; border: 2px solid transparent; background: #3a3a3a; color: #fff; display: flex; align-items: flex-end; padding: 6px; font-size: 12px; position: relative; cursor: pointer; text-shadow: 0 1px 3px #000; }
.bg-opt.blur { background: radial-gradient(circle at 50% 60%, #666 0 22%, #4a4a4a 40%, #333 100%); filter: none; }
.bg-opt.blur::after { content: ""; position: absolute; inset: 0; backdrop-filter: blur(2px); border-radius: 6px; }
.bg-opt.blur.strong::after { backdrop-filter: blur(5px); }
.bg-opt span { position: relative; z-index: 1; }
.bg-opt.active { border-color: var(--blue); }
.bg-opt.upload { border: 1px dashed #777; background: none; justify-content: center; align-items: center; }
.hint { font-size: 12.5px; color: var(--muted) !important; }
@media (max-width: 760px) { .bg-layout { grid-template-columns: 1fr; } .side-panel { position: absolute; right: 0; top: 38px; bottom: 58px; z-index: 20; width: 100%; } }
