:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0e0e10;
  color: #efeff1;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #0e0e10;
}

.toolbar {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-bottom: 1px solid #2f2f35;
  background: #18181b;
}

.brand {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.regions {
  display: flex;
  gap: 4px;
}

.regions button {
  min-width: 38px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid #3d3d45;
  border-radius: 5px;
  background: #26262c;
  color: #dedee3;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.regions button:hover {
  background: #33333a;
}

.regions button[aria-pressed="true"] {
  border-color: #a970ff;
  background: #772ce8;
  color: white;
}

.regions button:focus-visible {
  outline: 2px solid #bf94ff;
  outline-offset: 2px;
}

.status {
  color: #adadb8;
  font-size: 11px;
  white-space: nowrap;
}

.stream-link {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #bf94ff;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-link:hover,
.stream-link:focus-visible {
  color: #d8bfff;
  text-decoration: underline;
}

.player-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
}

#player {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: black;
}

.error {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  text-align: center;
  background: #0e0e10;
}

.error[hidden] {
  display: none;
}

.error h1 {
  margin: 0 0 8px;
  font-size: 22px;
}

.error p {
  margin: 0;
  color: #adadb8;
}

@media (max-width: 520px) {
  .brand,
  .status {
    display: none;
  }

  .toolbar {
    gap: 6px;
  }
}
