:root {
  --bg: #020202;
  --fg: #f2f2f2;
  --muted: #f7f7f7;
  --soft: #f3f3f3;
  --line: #d8d8d8;
  --focus: #010101;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--fg);
  background: var(--bg);
  font-family: "Courier New", Courier, monospace;
}

button,
input {
  font-family: inherit;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  color: var(--fg);
  font-size: clamp(34px, 7vw, 84px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.link {
  color: var(--fg);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--fg);
}

.link:hover {
  color: var(--muted);
  border-bottom-color: var(--muted);
}

.player-card {
  border: 1px solid var(--fg);
  background: var(--bg);
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(45deg, var(--soft) 25%, transparent 25%),
    linear-gradient(-45deg, var(--soft) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--soft) 75%),
    linear-gradient(-45deg, transparent 75%, var(--soft) 75%);
  background-size: 24px 24px;
  background-position:
    0 0,
    0 12px,
    12px -12px,
    -12px 0;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
}

.empty-state {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: clamp(14px, 2vw, 18px);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.empty-state.is-hidden {
  display: none;
}

.controls {
  padding: 18px;
  border-top: 1px solid var(--fg);
  background: var(--bg);
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--fg);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--fg);
  border-radius: 0;
  padding: 14px;
  color: var(--fg);
  background: var(--bg);
  font-size: 15px;
  outline: none;
}

input::placeholder {
  color: var(--muted);
}

input:focus {
  box-shadow: 0 0 0 1px var(--focus);
}

button {
  border: 1px solid var(--fg);
  border-radius: 0;
  padding: 0 22px;
  color: var(--bg);
  background: var(--fg);
  font-size: 15px;
  cursor: pointer;
}

button:hover {
  color: var(--fg);
  background: var(--bg);
}

button:active {
  transform: translateY(1px);
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 20px, 1120px);
    padding: 20px 0;
  }

  .header {
    display: block;
  }

  .link {
    display: inline-block;
    margin-top: 18px;
  }

  .controls {
    padding: 14px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  button {
    min-height: 48px;
  }

  .footer {
    justify-content: flex-start;
  }
}
