:root {
  --accent: #a743e6;

  --bg: #111111;
  --panel: #151515;
  --text: var(--accent);
  --muted: color-mix(in srgb, var(--accent) 74%, #111 26%);
  --shadow: color-mix(in srgb, var(--accent) 25%, transparent);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--accent) 8%, transparent), transparent 34rem),
    var(--bg);
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.stage {
  width: min(100%, 72rem);
  min-height: calc(100svh - 4rem);
  display: grid;
  place-items: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.window {
  width: min(100%, 42rem);
  background: var(--panel);
  border: 2px solid var(--accent);
  box-shadow: 0 0 2.5rem var(--shadow);
}

.titlebar {
  background: var(--accent);
  color: var(--bg);
  min-height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  border-bottom: 2px solid var(--accent);
  user-select: none;
}

.titlebar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.75rem;
  font-size: 0.95rem;
  line-height: 1;
}

.titlebar-button {
  width: 2.75rem;
  align-self: stretch;
  border: 0;
  border-left: 2px solid var(--bg);
  background: var(--accent);
  color: var(--bg);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.titlebar-button:hover,
.titlebar-button:focus-visible {
  background: var(--bg);
  color: var(--accent);
  outline: none;
}

.content {
  min-height: 22rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(2rem, 8vw, 5rem);
}

.tool {
  font-size: clamp(4.5rem, 16vw, 8rem);
  line-height: 1;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 0 0.75rem var(--shadow));
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  letter-spacing: 0.03em;
}

p {
  margin: 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.45;
  font-weight: 700;
}

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

hr {
  width: min(100%, 24rem);
  margin: 1.75rem auto;
  border: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--muted),
    var(--accent),
    var(--muted)
  );
  box-shadow: 0 0 0.75rem var(--shadow);
}

@media (max-width: 640px), (max-height: 520px) {
  body {
    padding: 1rem;
  }

  .stage {
    width: 100%;
    min-height: calc(100svh - 2rem);
    border: 2px solid var(--accent);
    padding: 1.25rem;
  }

  .window {
    width: 100%;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .titlebar {
    display: none;
  }

  .content {
    min-height: auto;
    padding: 2rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}
