*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  background: #0d1117;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */

header {
  background: #161b22;
  padding: 8px 16px;
  border-bottom: 1px solid #30363d;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.title {
  font-size: 16px;
  font-weight: 600;
  color: #e6edf3;
  margin: 0;
}

.subtitle {
  font-size: 12px;
  color: #8b949e;
}

.gh-link {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #8b949e;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #30363d;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.gh-link:hover {
  color: #e6edf3;
  background: #21262d;
  border-color: #484f58;
}

.gh-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Main / Canvas ── */

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

#screen-canvas {
  max-width: 100vw;
  max-height: calc(100vh - 60px);
  border: 1px solid #30363d;
  display: block;
  object-fit: contain;
  background: #000;
}

/* ── Status bar ── */

#status-bar {
  height: 40px;
  background: #161b22;
  border-top: 1px solid #30363d;
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  gap: 8px;
  flex-shrink: 0;
  z-index: 100;
}

#status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-online {
  background: #3fb950;
  box-shadow: 0 0 6px rgba(63, 185, 80, 0.5);
}

.dot-away {
  background: #d29922;
  box-shadow: 0 0 6px rgba(210, 153, 34, 0.5);
}

.dot-connecting {
  background: #8b949e;
}

#status-text {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 13px;
  color: #8b949e;
  white-space: nowrap;
}

#last-updated {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 13px;
  color: #8b949e;
  margin-left: auto;
  white-space: nowrap;
}
