:root {
  --bg-0: #04090a;
  --bg-1: #06100d;
  --panel: linear-gradient(160deg, rgba(8, 22, 17, 0.86), rgba(5, 12, 10, 0.8));
  --line: rgba(5, 212, 113, 0.085);
  --line-strong: rgba(5, 212, 113, 0.24);
  --primary: #05d471;
  --primary-strong: #0edb7b;
  --text: rgba(244, 250, 247, 0.94);
  --muted: rgba(223, 233, 229, 0.72);
  --dim: rgba(223, 233, 229, 0.58);
  --radius-xl: 26px;
  --radius-pill: 999px;
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
  --glow: 0 0 0 1px rgba(5, 212, 113, 0.28), 0 10px 34px rgba(5, 212, 113, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 380px at 50% -12%, rgba(5, 212, 113, 0.2), transparent 62%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
  padding: 20px 16px 28px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(30deg, var(--line) 12%, transparent 12.5%, transparent 87%, var(--line) 87.5%, var(--line)),
    linear-gradient(150deg, var(--line) 12%, transparent 12.5%, transparent 87%, var(--line) 87.5%, var(--line)),
    linear-gradient(90deg, var(--line) 2%, transparent 2.5%, transparent 97%, var(--line) 97.5%, var(--line));
  background-size: 56px 96px;
  opacity: 0.72;
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 2px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(5, 212, 113, 0.2));
  flex-shrink: 0;
}

.brand-text {
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip {
  border: 1px solid var(--line-strong);
  color: var(--primary);
  background: rgba(5, 212, 113, 0.12);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.panel {
  border: 1px solid rgba(84, 137, 114, 0.36);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(120deg, rgba(6, 20, 14, 0.76), rgba(4, 10, 8, 0.78)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(8, 35, 22, 0.45);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.hero {
  padding: 28px 24px 24px;
}

.hero-icon {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}

.hero-title {
  text-align: center;
  font-size: clamp(1.7rem, 6.6vw, 2.2rem);
  line-height: 1.06;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.hero-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.12rem);
  max-width: 31ch;
  margin: 0 auto 24px;
  line-height: 1.45;
  font-weight: 500;
}

.secret-input-wrap {
  position: relative;
}

.secret-input {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(2, 7, 6, 0.9);
  color: var(--text);
  font-family: "Space Grotesk", "DM Sans", monospace;
  font-size: 1.01rem;
  letter-spacing: 0.01em;
  padding: 0 48px 0 18px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-clear-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(2, 7, 6, 0.92);
  color: rgba(223, 233, 229, 0.86);
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.input-clear-btn:hover {
  color: var(--text);
  border-color: rgba(5, 212, 113, 0.45);
  background: rgba(5, 16, 12, 0.96);
}

.input-clear-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.input-clear-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 212, 113, 0.26);
}

.input-clear-btn[hidden] {
  display: none;
}

.secret-input::placeholder {
  color: rgba(213, 224, 220, 0.42);
}

.secret-input:focus {
  border-color: rgba(5, 212, 113, 0.58);
  box-shadow: 0 0 0 3px rgba(5, 212, 113, 0.17);
}

.secret-input.input-error {
  border-color: rgba(255, 80, 80, 0.82);
  box-shadow: 0 0 0 3px rgba(255, 80, 80, 0.2);
}

.validation-msg {
  margin-top: 10px;
  color: #ff8686;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  min-height: 1.15em;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.validation-msg.show {
  opacity: 1;
  transform: translateY(0);
}

.result-panel {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(5, 212, 113, 0.24);
  background: rgba(5, 16, 12, 0.72);
  box-shadow: inset 0 0 0 1px rgba(5, 212, 113, 0.1);
  padding: 14px 14px 12px;
}

.result-label {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.code {
  font-family: "Space Grotesk", "DM Sans", monospace;
  font-size: clamp(1.9rem, 7vw, 2.4rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #f6fef9;
  margin-bottom: 10px;
}

.timer {
  color: var(--primary);
  font-size: 0.94rem;
  font-weight: 700;
  margin-bottom: 10px;
  transition: color 160ms ease;
}

.timer.warning {
  color: #f5dd57;
}

.timer.danger {
  color: #ff7f7f;
}

.copy-btn {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(5, 212, 113, 0.34);
  background: rgba(5, 212, 113, 0.12);
  color: var(--primary);
  min-height: 40px;
  width: 100%;
  cursor: pointer;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.copy-btn:hover {
  background: rgba(5, 212, 113, 0.18);
  border-color: rgba(5, 212, 113, 0.46);
}

.copy-btn:active {
  transform: scale(0.985);
}

.generate-btn,
.message-btn,
.community-btn {
  width: 100%;
  min-height: 54px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  transform-origin: center;
}

.generate-btn,
.message-btn {
  background: linear-gradient(180deg, var(--primary-strong), #08cb6d);
  border: 1px solid rgba(5, 212, 113, 0.43);
  color: #052012;
  box-shadow: var(--glow), 0 0 26px rgba(5, 212, 113, 0.24);
}

.generate-btn {
  margin-top: 14px;
  font-size: 1.02rem;
  cursor: pointer;
  animation: none;
}

.message-btn {
  animation: button-glow 2.8s ease-in-out infinite;
}

.message-btn,
.community-btn {
  margin-top: 0;
}

.message-btn {
  margin-bottom: 12px;
  font-size: 0.98rem;
  gap: 10px;
}

.community-btn {
  border: 1px solid rgba(5, 212, 113, 0.34);
  background: rgba(5, 212, 113, 0.07);
  color: var(--primary);
  font-size: 0.9rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  animation: button-glow-subtle 3.2s ease-in-out infinite;
}

.message-btn::before,
.community-btn::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -35%;
  width: 38%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: translateX(-140%) skewX(-20deg);
  animation: glimmer-sweep 3.3s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.generate-btn::before {
  content: none;
}

.message-btn > *,
.community-btn > * {
  position: relative;
  z-index: 1;
}

.generate-btn:hover,
.message-btn:hover,
.community-btn:hover {
  transform: translateY(-2px);
}

.generate-btn:active,
.message-btn:active,
.community-btn:active {
  animation: bubble-press 240ms ease;
  transform: translateY(0) scale(0.985);
}

.generate-btn:focus-visible,
.message-btn:focus-visible,
.community-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 212, 113, 0.28), 0 0 0 1px rgba(5, 212, 113, 0.65);
}

.meta-pills {
  margin: 14px auto 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 12, 10, 0.74);
  border-radius: var(--radius-pill);
  width: min(100%, 442px);
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(5, 212, 113, 0.08);
  flex-shrink: 0;
}

.meta-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.promo {
  padding: 28px 20px 22px;
  margin-bottom: 24px;
  border-color: rgba(5, 212, 113, 0.44);
  background:
    linear-gradient(135deg, rgba(5, 26, 17, 0.9), rgba(3, 10, 8, 0.88)),
    radial-gradient(500px 200px at 10% 2%, rgba(5, 212, 113, 0.22), transparent 70%);
  box-shadow:
    0 28px 58px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(5, 212, 113, 0.18),
    inset 0 0 0 1px rgba(5, 212, 113, 0.08);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.promo::before {
  content: "";
  position: absolute;
  left: -30%;
  right: -30%;
  top: -32%;
  height: 190px;
  background: radial-gradient(circle at center, rgba(5, 212, 113, 0.32), transparent 70%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.promo > * {
  position: relative;
  z-index: 1;
}

.promo-head {
  margin-bottom: 22px;
}

.promo-kicker {
  font-size: 0.9rem;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
}

.promo-title {
  font-size: clamp(2.1rem, 8.3vw, 3.1rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
  color: #f4f9f7;
  font-weight: 800;
}

.promo-lines {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
}

.promo-lines strong {
  color: var(--text);
  font-weight: 600;
}

.wa-inline {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.footer {
  text-align: center;
  color: var(--dim);
  font-size: 0.9rem;
  padding-bottom: 6px;
  font-weight: 500;
}

@keyframes glimmer-sweep {
  0% {
    transform: translateX(-140%) skewX(-20deg);
  }
  60%,
  100% {
    transform: translateX(340%) skewX(-20deg);
  }
}

@keyframes button-glow {
  0%,
  100% {
    box-shadow: var(--glow), 0 0 12px rgba(5, 212, 113, 0.2);
  }
  50% {
    box-shadow: var(--glow), 0 0 30px rgba(5, 212, 113, 0.35);
  }
}

@keyframes button-glow-subtle {
  0%,
  100% {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34), 0 0 0 rgba(5, 212, 113, 0);
  }
  50% {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38), 0 0 22px rgba(5, 212, 113, 0.2);
  }
}

@keyframes bubble-press {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(0.985);
  }
}

@media (max-width: 620px) {
  body {
    padding: 12px 12px 22px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero {
    padding: 20px 14px 16px;
  }

  .hero-title {
    font-size: clamp(1.08rem, 8vw, 2rem);
  }

  .hero-subtitle {
    margin-bottom: 16px;
    font-size: 0.92rem;
  }

  .secret-input,
  .generate-btn,
  .message-btn,
  .community-btn,
  .copy-btn {
    min-height: 50px;
  }

  .input-clear-btn {
    width: 26px;
    height: 26px;
    right: 8px;
  }

  .validation-msg {
    font-size: 0.8rem;
  }

  .code {
    font-size: clamp(1.6rem, 10vw, 2.05rem);
  }

  .meta-pills {
    width: 100%;
    justify-content: flex-start;
    row-gap: 8px;
    margin-top: 12px;
    margin-bottom: 14px;
  }

  .meta-sep {
    display: none;
  }

  .promo {
    padding: 20px 13px 14px;
    margin-bottom: 18px;
  }

  .promo-head {
    margin-bottom: 16px;
  }

  .promo-kicker {
    font-size: 0.74rem;
  }

  .promo-title {
    font-size: clamp(1.35rem, 8.5vw, 2rem);
    margin-bottom: 6px;
  }

  .promo-lines {
    font-size: 0.84rem;
  }

  .message-btn {
    font-size: 0.9rem;
    letter-spacing: 0.07em;
  }

  .community-btn {
    font-size: 0.81rem;
    letter-spacing: 0.06em;
  }

  .footer {
    font-size: 0.86rem;
  }
}

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