:root {
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(232, 255, 239, 0.68);
  --quiet: rgba(232, 255, 239, 0.5);
  --green: #50f26f;
  --blue: #0a84ff;
  --line: rgba(210, 255, 222, 0.34);
  --shadow: rgba(0, 0, 0, 0.42);
  --card-width: min(560px, calc(100vw - 36px));
  --top-pill-gap: 104px;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  overflow: hidden;
  background: #020603;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.liquid-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.page-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 34px;
  isolation: isolate;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: -10vmax;
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56)),
    url("fern-background.jpg") center / cover no-repeat;
  transform: rotate(-3deg) scale(1.08);
}

.page-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 38%, rgba(91, 255, 122, 0.16), transparent 34%),
    radial-gradient(circle at 74% 16%, rgba(10, 132, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.48));
  pointer-events: none;
}

.brand-pill,
.liquid-button,
.key-card {
  position: relative;
  overflow: hidden;
  color: inherit;
}

.glass-fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  border-radius: inherit;
  background: transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  transform: translateZ(0);
}

.brand-pill,
.download-button {
  position: fixed;
  top: 24px;
  z-index: 4;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.brand-pill {
  left: max(24px, calc((100vw - var(--card-width)) / 2 - var(--top-pill-gap)));
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px 0 10px;
}

.brand-pill img {
  position: relative;
  z-index: 1;
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.brand-pill span:not(.glass-fill) {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.94);
  font-size: 17px;
  font-weight: 780;
  line-height: 1;
  text-shadow: 0 5px 18px var(--shadow);
  white-space: nowrap;
}

.download-button {
  right: max(24px, calc((100vw - var(--card-width)) / 2 - var(--top-pill-gap)));
  display: grid;
  width: 58px;
  place-items: center;
  text-decoration: none;
}

.download-button svg {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.key-card {
  width: var(--card-width);
  border: 1px solid var(--line);
  border-radius: 30px;
}

.card-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 18px;
  padding: 28px;
}

h1 {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 10px 32px var(--shadow);
}

p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.key-form {
  display: grid;
  gap: 9px;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.17),
    inset 0 -12px 20px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  backdrop-filter: blur(12px) saturate(130%);
}

input {
  height: 50px;
  border-radius: 16px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 700;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.get-button,
.copy-button {
  height: 50px;
  border: 0;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.96);
  background: rgba(80, 242, 111, 0.26);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.25),
    0 10px 28px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-size: 14px;
  font-weight: 860;
}

.get-button {
  min-width: 84px;
  padding: 0 18px;
}

.get-button:disabled,
.copy-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.turnstile-slot {
  min-height: 0;
}

.status {
  min-height: 20px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.35;
}

.status.error {
  color: #ffd0d8;
}

.status.success {
  color: #c8ffd3;
}

.loader {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 22px;
}

.loader[hidden] {
  display: none;
}

.loader span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  animation: pulse 0.9s ease-in-out infinite;
}

.loader span:nth-child(2) {
  animation-delay: 0.14s;
}

.loader span:nth-child(3) {
  animation-delay: 0.28s;
}

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

.result[hidden] {
  display: none;
}

textarea {
  min-height: 118px;
  resize: none;
  border-radius: 18px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.45;
}

.copy-button {
  justify-self: end;
  min-width: 96px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.18);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(-4px) scale(1);
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 22px 18px;
  }

  .download-button {
    top: 14px;
    right: 14px;
    width: 50px;
    height: 50px;
  }

  .brand-pill {
    top: 14px;
    left: 14px;
    height: 50px;
    gap: 9px;
    padding: 0 14px 0 8px;
  }

  .brand-pill img {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .brand-pill span:not(.glass-fill) {
    font-size: 15px;
  }

  .card-content {
    padding: 22px;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
