/* 오버레이 URL 만들기 화면 스타일 (OBS 오버레이와는 무관) */
:root {
  --bg: #0f1012;
  --card: #18191c;
  --line: #2a2c31;
  --text: #e8e9eb;
  --muted: #9a9ca3;
  --accent: #00ffa3;
  --danger: #ff6b6b;
  --slot-1: #00ffa3;
  --slot-2: #5fb7e8;
  --slot-3: #ffb347;
  --slot-4: #e56b79;
  --slot-5: #a983e7;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

.page { max-width: 880px; margin: 0 auto; padding: 32px 16px 64px; }
.page-header h1 { margin: 0 0 8px; font-size: 26px; }
.page-header p { margin: 0 0 24px; color: var(--muted); }

/* 상단 다락 로고: 작게, 원래 색. 누르면 다락캐스트 홈페이지 */
.brand { display: inline-block; margin-bottom: 14px; line-height: 0; }
.brand img { height: 40px; width: auto; transition: opacity 0.15s ease; }
.brand:hover img,
.brand:focus-visible img { opacity: 0.8; }
.brand:focus-visible { outline: none; }

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 { margin: 0 0 8px; font-size: 17px; }
.hint { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }

.channel-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.channel-row { display: grid; grid-template-columns: 14px 1fr 220px; gap: 12px; align-items: center; }
.slot-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--slot-color, var(--muted)); }
.channel-fields { display: grid; grid-template-columns: 1fr; gap: 8px; min-width: 0; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.toggle select { background: #0f1012; color: var(--text); border: 0; border-radius: 8px; padding: 5px 8px; font: inherit; }

input[type="text"] {
  width: 100%;
  min-width: 0;
  background: #0f1012;
  color: var(--text);
  border: 0;
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
}
/* 테두리 대신 배경을 밝혀 지금 입력 중인 칸을 알려 준다 */
input[type="text"]:focus,
.toggle select:focus { outline: none; background: #24262b; }

.channel-status { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); }
.channel-status.ok { color: var(--text); }
.channel-status.error { color: var(--danger); }
.channel-avatar { width: 24px; height: 24px; border-radius: 50%; flex: none; object-fit: cover; }
.channel-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-pill { margin-left: 4px; padding: 1px 6px; border-radius: 4px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700; }

.inline-option { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }

.result { display: flex; gap: 8px; }
.result-url { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px !important; }

.button {
  flex: none;
  background: var(--accent);
  color: #0f1012;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.button:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }

.preview-header { display: flex; justify-content: space-between; align-items: center; }
.preview-wrap { height: 420px; border-radius: 8px; overflow: hidden; }
.preview-wrap.dark { background: #2b2d31; }
.preview-wrap:not(.dark) {
  background-color: #fff;
  background-image: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.preview-frame { width: 100%; height: 100%; border: 0; background: transparent; }

.code {
  margin: 0;
  padding: 14px;
  background: #0f1012;
  border-radius: 8px;
  overflow-x: auto;
  color: #c9ccd3;
}

@media (max-width: 720px) {
  .channel-row { grid-template-columns: 14px 1fr; }
  .channel-status { grid-column: 2; }
  .channel-fields { grid-template-columns: 1fr; }
}
