:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: #f4f4f4;
  background: #111;
  line-height: 1.5;
  accent-color: #8cbcff;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1 { margin: 0 0 16px; font-size: clamp(24px, 4vw, 32px); line-height: 1.2; }
p { margin: 0 0 24px; }
button, input { font: inherit; border-radius: 8px; min-height: 48px; }
button { padding: 10px 20px; cursor: pointer; border: 1px solid #777; color: #f4f4f4; background: #242424; }
button:hover { background: #363636; }
button:active { background: #444; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #8cbcff; outline-offset: 4px; }
::selection { background: #8cbcff; color: #111; }
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-box { width: min(100%, 400px); padding: clamp(24px, 4vw, 32px); background: #1c1c1c; border-radius: 14px; }
.login-box p, .hint { color: #bbb; }
label { display: block; }
input[type="password"] { width: 100%; padding: 12px; margin: 8px 0 24px; background: #111; border: 1px solid #777; color: #f4f4f4; }
.primary { width: 100%; background: #8cbcff; border-color: #8cbcff; color: #111; font-weight: 700; }
.primary:hover { background: #b6d4ff; }
.login-box .error { color: #ff9999; }
header { padding: 16px clamp(16px, 3vw, 32px); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #1c1c1c; }
header h1 { font-size: 20px; margin: 0; }
.watch-page { max-width: 1400px; margin: auto; padding: clamp(16px, 3vw, 32px); }
video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; }
.stream-info { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 20px 0 12px; }
#status { margin: 0; flex: 1 1 240px; }
#status[data-state="live"] { color: #8cbcff; }
.hint { font-size: 14px; }

/* Account login and stream management */
a { color: #8cbcff; }
.button-link, a.button-link {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid #8cbcff;
  background: #8cbcff;
  color: #111;
  font-weight: 700;
}
.button-link:hover { background: #b6d4ff; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: #888; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #3a3a3a; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.header-actions form { margin: 0; }
.link-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #777;
  text-decoration: none;
  color: #f4f4f4;
}
.link-button:hover { background: #363636; }
.dashboard-page { max-width: 980px; margin: auto; padding: clamp(16px, 3vw, 32px); display: grid; gap: 20px; }
.panel { background: #1c1c1c; border-radius: 14px; padding: clamp(18px, 3vw, 26px); }
.panel h2 { margin: 0 0 12px; font-size: clamp(18px, 2.4vw, 22px); }
.panel.highlight { border: 1px solid #8cbcff; }
.muted { color: #bbb; font-size: 14px; }
.inline-form { display: grid; gap: 10px; max-width: 480px; }
input[type="text"] { width: 100%; padding: 12px; background: #111; border: 1px solid #777; color: #f4f4f4; }
input[readonly] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #333; vertical-align: top; }
th { font-weight: 600; color: #bbb; font-size: 14px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
button.danger { border-color: #a55; color: #ffb3b3; }
button.danger:hover { background: #3a2222; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin-bottom: 6px; }
.stream-switch { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.stream-switch a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid #777; border-radius: 8px; text-decoration: none; color: #f4f4f4; }
.stream-switch a[aria-current="page"] { border-color: #8cbcff; color: #8cbcff; }
