:root {
  --bg: #313338;
  --bg-card: #2b2d31;
  --bg-input: #1e1f22;
  --text: #dbdee1;
  --text-muted: #949ba4;
  --text-strong: #f2f3f5;
  --primary: #5865f2;
  --primary-hover: #4752c4;
  --danger: #da373c;
  --danger-hover: #a12828;
  --success: #23a559;
  --link: #00a8fc;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

h1 {
  margin: 0 0 24px;
  color: var(--text-strong);
  font-size: 24px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: none;
  border-radius: 4px;
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
  text-transform: none;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--primary-hover);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:disabled:hover {
  background: var(--primary);
}

button.danger {
  background: var(--danger);
}

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

video {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  background: #000;
}

#status:empty {
  display: none;
}

.card {
  max-width: 720px;
  margin: 40px auto;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0;
}

.info p {
  margin: 0;
}

#viewer-count {
  color: var(--success);
  font-weight: 600;
}

.link-row {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.link-row a {
  flex: 1;
  min-width: 0;
  padding: 10px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-input);
  color: var(--link);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-row a:hover {
  text-decoration: underline;
}

.link-row:has(a:empty) {
  display: none;
}

.watch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
}

.watch #status {
  margin: 0;
  color: var(--text-muted);
  font-size: 18px;
}

.watch video {
  max-height: calc(100vh - 32px);
}
