:root {
  --bg: #0e0f13; --panel: #171920; --panel2: #1f222b; --line: #2b2f3a;
  --text: #eceef3; --muted: #9aa0ad; --accent: #7c5cff; --rec: #ff3b4e; --ok: #2ecc71; --warn: #f5a524;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; }
a { color: #a996ff; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 10px 16px; }
button:hover { border-color: #3c4250; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.rec { background: var(--rec); border-color: var(--rec); color: #fff; font-weight: 600; }
button.off { background: #3a1d22; border-color: #5a2a31; color: #ff9aa5; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 32px 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
h1 { font-size: 24px; margin: 0 0 6px; } h2 { font-size: 18px; margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copy { display: flex; gap: 8px; } .copy input { flex: 1; font-size: 13px; }
.hidden { display: none !important; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 8px; border-radius: 99px; background: #0009; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* Hazırlık odası */
.lobby { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.preview { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.meter { height: 6px; background: var(--panel2); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s; }
@media (max-width: 720px) { .lobby { grid-template-columns: 1fr; } }

/* Stüdyo */
.studio { display: flex; flex-direction: column; height: 100%; height: 100dvh; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.top .title { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.grid { flex: 1; display: grid; gap: 10px; padding: 10px; min-height: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-content: center; }
.tile { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; border: 2px solid transparent; }
.tile.speaking { border-color: var(--ok); }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile.me video { transform: scaleX(-1); }
.tile .label { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.tile .up { position: absolute; right: 8px; top: 8px; }
.bar { display: flex; justify-content: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); flex-wrap: wrap;
  padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.toast { position: fixed; left: 50%; top: 60px; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 12px; z-index: 10; max-width: 92vw; }
.warnbox { background: #2b2412; border: 1px solid #5a4a1c; color: #ffd78a; padding: 10px 14px; border-radius: 12px; font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
