/* MaxHub client viewer — same palette/typeface as the staff portal
   (pulled from nature.com.au's own compiled CSS, see portal's style.css
   header comment for the source). Dark theme here rather than the
   portal's light theme — this page is watched full-screen/projector-style
   in a dim room, not worked in like an admin tool. */

:root {
  --brand-green: #0a3b26;
  --brand-green-light: #12583a;
  --accent: #d23445;
  --accent-hover: #b12a39;
  --ink: #0e2227;
  --paper: #0e1a16;
  --card: #123024;
  --border: #234436;
  --muted: #9db3a8;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.page__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2rem;
  background: var(--brand-green);
  flex-shrink: 0;
}

.brand-logo {
  height: 26px;
  display: block;
}

.brand__sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.page__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Password gate */
.gate {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.gate h1 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
}

.gate p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

.gate input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 0.75rem;
}

.gate input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.gate button {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.gate button:hover {
  background: var(--accent-hover);
}

.gate button:disabled {
  opacity: 0.6;
  cursor: default;
}

.gate .error {
  color: var(--accent);
  font-size: 0.9rem;
  min-height: 1.2em;
  margin-top: 0.75rem;
}

/* Viewer */
.viewer {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.viewer[hidden] {
  display: none;
}

.channels {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.channel-box {
  flex: 1;
  min-width: 140px;
  max-width: 220px;
  padding: 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--card);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.channel-box:hover {
  border-color: var(--brand-green-light);
}

.channel-box.active {
  border-color: var(--accent);
  background: var(--brand-green-light);
}

.channel-box .channel-name {
  display: block;
}

.channel-box .channel-status {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.25rem;
}

.player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player video {
  width: 100%;
  height: 100%;
}

.player .player-message {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 2rem;
}
