:root {
  --bg: #0d0f12;
  --panel: #15181d;
  --panel-soft: #111419;
  --line: #282d35;
  --text: #f2f4f7;
  --muted: #a8b0bd;
  --muted-2: #78818f;
  --accent: #69d2b0;
  --accent-strong: #8df2cf;
  --danger: #ff8f8f;
  --shadow: 0 22px 70px rgba(0, 0, 0, .35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(105, 210, 176, .12), transparent 38rem),
    linear-gradient(180deg, #101318 0%, var(--bg) 52%);
}

button,
textarea {
  font: inherit;
}

.shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 42px 18px 36px;
}

.hero {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 64px;
  line-height: .95;
  letter-spacing: 0;
}

.subcopy {
  max-width: 580px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.panel,
.timer,
.code-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 24, 29, .92);
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.label {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  display: block;
  border: 1px solid #323842;
  border-radius: 8px;
  padding: 15px;
  color: var(--text);
  background: #0f1217;
  outline: none;
  line-height: 1.5;
  transition: border-color .16s ease, box-shadow .16s ease;
}

textarea:focus {
  border-color: rgba(105, 210, 176, .85);
  box-shadow: 0 0 0 4px rgba(105, 210, 176, .1);
}

button:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

textarea::placeholder {
  color: #69717e;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.button,
.copy-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #07100d;
  background: var(--accent);
  cursor: pointer;
  font-weight: 750;
  transition: transform .14s ease, background .14s ease, opacity .14s ease;
}

.button:hover,
.copy-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.button:active,
.copy-button:active {
  transform: translateY(0);
}

.button-secondary {
  color: var(--text);
  background: #252a32;
}

.button-secondary:hover {
  background: #303741;
}

.status {
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.status.is-error {
  color: var(--danger);
}

.timer {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(17, 20, 25, .9);
}

.timer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.timer-top strong {
  color: var(--text);
  font-size: 18px;
}

.progress-track {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #242a32;
}

.progress-bar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #d7c984);
  transform-origin: left center;
  transition: transform .2s linear;
}

.results {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.code-card {
  padding: 16px;
  transition: none;
}

.card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-meta {
  min-width: 0;
}

.card-title {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.card-detail {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.35;
}

.copy-button {
  flex: 0 0 auto;
  min-width: 78px;
}

.copy-button.is-copied {
  background: #d7c984;
}

.copy-button:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}

.code {
  margin-top: 16px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 74px;
  font-weight: 850;
  line-height: .95;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  transition: none;
}

.card-error {
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.4;
}

.empty {
  padding: 18px;
  border: 1px dashed #303741;
  border-radius: 8px;
  color: var(--muted-2);
  text-align: center;
}

@media (max-width: 560px) {
  .shell {
    padding: 28px 14px 28px;
  }

  h1 {
    font-size: 44px;
  }

  .panel,
  .timer,
  .code-card {
    border-radius: 8px;
  }

  textarea {
    min-height: 190px;
    font-size: 16px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .status {
    text-align: left;
  }

  .card-main {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .code {
    font-size: 56px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 38px;
  }

  .code {
    font-size: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
