:root {
  color-scheme: dark;
  --bg: #050505;
  --text: #f6f6f2;
  --muted: #9b9b94;
  --line: rgba(255, 255, 255, 0.15);
  --panel: rgba(255, 255, 255, 0.065);
  --panel-2: rgba(255, 255, 255, 0.105);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, transparent 0 35%, rgba(255, 255, 255, 0.045) 35% 35.3%, transparent 35.3%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #050505;
  background-size: auto, 46px 46px, 46px 46px, auto;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at 78% 42%, rgba(255, 255, 255, 0.13), transparent 20rem);
}

body.is-booting {
  overflow: hidden;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: block;
  padding: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px),
    #020202;
  color: #f2f2ed;
  font-family: "Courier New", Courier, monospace;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.boot::before {
  position: fixed;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 50% 50%, transparent 0 58%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.boot.is-finished {
  visibility: hidden;
  opacity: 0;
}

.boot-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.boot-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  max-height: 100vh;
  min-height: 100vh;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  color: #f2f2ed;
  font-size: clamp(0.82rem, 1.45vw, 1rem);
  line-height: 1.38;
  white-space: pre-wrap;
}

.page {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms ease 180ms, transform 700ms ease 180ms;
}

body.is-booting .page {
  opacity: 0;
  transform: translateY(18px);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 34px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 40px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.42);
}

.brand {
  gap: 10px;
  padding: 4px 14px 4px 7px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: lowercase;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.home-link {
  padding: 0 14px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.home-link:hover,
.home-link:focus-visible {
  color: var(--text);
  outline: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 520px);
  grid-template-areas:
    "copy mascot"
    "terminal mascot";
  align-items: center;
  gap: 28px 52px;
  min-height: calc(100vh - 104px);
  padding-top: 28px;
}

.copy {
  grid-area: copy;
  align-self: end;
  margin-bottom: -8px;
}

.tag {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(3rem, 8.2vw, 7.2rem);
  line-height: 0.88;
  text-transform: lowercase;
}

.subcopy {
  max-width: 510px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.terminal {
  grid-area: terminal;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(10, 10, 10, 0.76);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
}

.terminal-top {
  display: flex;
  gap: 7px;
  padding-bottom: 2px;
}

.terminal-top span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.field {
  display: grid;
  gap: 9px;
}

.field span,
.select-wrap small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  background: #050505;
  color: var(--text);
  font-size: 1rem;
}

.field input:focus {
  border-color: rgba(255, 255, 255, 0.75);
}

.field input::placeholder {
  color: #666;
}

.actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
}

.actions button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  font-weight: 900;
}

#paste-btn {
  background: var(--panel);
  color: var(--text);
}

.convert-btn {
  background: var(--text);
  color: #050505;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr 140px;
  gap: 10px;
}

.choices label {
  cursor: pointer;
}

.choices input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choices label > span,
.select-wrap {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.choices b {
  font-size: 1.15rem;
}

.choices small {
  color: var(--muted);
  font-size: 0.78rem;
}

.choices input:checked + span {
  border-color: var(--text);
  background: var(--text);
  color: #050505;
}

.choices input:checked + span small {
  color: #333;
}

.select-wrap select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 900;
}

.select-wrap option {
  color: var(--text);
  background: #111;
}

.status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.mascot {
  grid-area: mascot;
  align-self: center;
  justify-self: end;
  width: min(430px, 100%);
}

.plate {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.04);
}

.plate::before,
.plate::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.plate::before {
  inset: 34px;
  border-radius: 28px;
}

.plate::after {
  right: -52px;
  bottom: 74px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
}

.plate img {
  position: absolute;
  right: 28px;
  bottom: 42px;
  width: min(330px, 78%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.22));
}

.mascot p {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "mascot"
      "terminal";
    align-items: stretch;
    min-height: auto;
  }

  .mascot {
    justify-self: stretch;
    width: 100%;
  }

  .plate {
    min-height: 260px;
  }

  .plate img {
    right: 20px;
    bottom: 18px;
    width: min(280px, 62%);
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 22px, 1160px);
  }

  .header {
    align-items: flex-start;
  }

  .layout {
    gap: 18px;
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 4.6rem);
  }

  .terminal {
    padding: 12px;
    border-radius: 20px;
  }

  .actions,
  .choices {
    grid-template-columns: 1fr;
  }

  .status {
    text-align: center;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}
