:root {
  --bg: #111314;
  --panel: #191c1e;
  --panel-border: #2a3033;
  --text: #f3f4f4;
  --muted: #9aa5aa;
  --accent: #f5b63b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #0f1213;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.shell {
  width: min(780px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 14px;
  align-items: start;
}

.stream-panel,
.counter-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
}

.stream-panel {
  padding: 12px;
}

.stream-wrap {
  position: relative;
  width: 100%;
}

#preview {
  display: block;
  width: 100%;
  background: #090a0b;
  border-radius: 12px;
  object-fit: contain;
}

#line-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.overlay-line {
  stroke: #28f04c;
  stroke-width: 4;
  stroke-linecap: round;
}

.counter-panel {
  min-height: 164px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.counter-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

#count {
  font-size: clamp(3rem, 7vw, 4.5rem);
  line-height: 1;
  color: var(--accent);
  font-weight: 800;
}

.round-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.timer-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
}

#round-timer {
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .counter-panel {
    min-height: 0;
    padding: 18px;
  }
}
