:root {
  --fg: #d4d4d4;
  --dim: #6f6f6f;
  --accent: #e6e6e6;
  --bg: #000000;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body {
  display: grid;
  place-items: center;
  padding: 16px;
}

.shell {
  width: min(100%, 960px, calc((100vh - 220px) * 16 / 9));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* --- TUI title --- */
.title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  font-size: clamp(18px, 4.2vw, 34px);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-shadow: 0 0 8px rgba(230, 230, 230, 0.25);
  user-select: none;
}

.title .rule {
  color: var(--dim);
  font-weight: 400;
  letter-spacing: 0;
  font-size: 0.7em;
  text-shadow: none;
}

.title .word {
  display: inline-flex;
  align-items: center;
}

.cursor {
  margin-left: 0.15em;
  animation: blink 1s steps(1, end) infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* --- video screen --- */
.screen {
  width: 100%;
  border: 1px solid var(--dim);
  padding: 8px;
  background: #050505;
}

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.frame iframe {
  position: absolute;
  /* Oversize + offset so YouTube's hover chrome is pushed outside the visible
     frame: the title bar (top-left) and logo (bottom-right) get clipped.
     pointer-events:none removes the play button / any click handling. */
  top: -14%;
  left: -13%;
  width: 125%;
  height: 125%;
  border: 0;
  pointer-events: none;
}

.status {
  margin: 0;
  color: var(--dim);
  letter-spacing: 0.1em;
}

.status.error {
  color: #ff8f8f;
}

/* --- bar --- */
.bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

button {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--dim);
  padding: 4px 10px;
  cursor: pointer;
  letter-spacing: 0.08em;
}

button:hover,
button:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.note {
  margin-left: auto;
  color: var(--dim);
  white-space: nowrap;
}
