:root {
  --bg-1: #0b0f14;
  --bg-2: #0c1220;
  --grad-a: #00d4ff;
  --grad-b: #ff0080;
  --grad-c: #7cff96;
  --text: #e9eef5;
  --muted: #93a0b3;
  --ring: rgba(255, 255, 255, 0.12);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Inter,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 900px at 70% -10%, #15203a 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ribbon bg */
.ribbon {
  position: absolute;
  inset: auto -20vw 50% -20vw;
  height: 44vh;
  pointer-events: none;
  filter: blur(24px) saturate(1.3) contrast(1.05);
  background:
    radial-gradient(60% 140% at 10% 40%, rgba(0, 212, 255, 0.45), transparent 60%),
    radial-gradient(60% 140% at 90% 60%, rgba(255, 0, 128, 0.45), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.65;
  animation: float 14s ease-in-out infinite;
  transform: translateY(10vh) rotate(-6deg);
}
@keyframes float {
  0%,
  100% {
    transform: translateY(10vh) rotate(-6deg);
  }
  50% {
    transform: translateY(14vh) rotate(-8deg);
  }
}

/* card */
.card {
  position: relative;
  width: min(860px, 92vw);
  padding: 48px 28px;
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px var(--ring);
  backdrop-filter: blur(14px) saturate(1.2);
}

.logo {
  display: inline-flex;
  gap: 0.6ch;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--ring);
  font-weight: 600;
  letter-spacing: 0.4px;
}
.logo b {
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

h1 {
  margin: 18px 0 6px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.05;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: hue 10s linear infinite;
}
@keyframes hue {
  from {
    filter: hue-rotate(0);
  }
  to {
    filter: hue-rotate(360deg);
  }
}

.lead {
  margin: 0 auto 18px;
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(15px, 2.6vw, 18px);
}
.typing {
  display: inline-block;
  border-right: 2px solid rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation:
    type 3.8s steps(36, end) forwards,
    blink 0.9s step-end infinite;
}
@keyframes type {
  to {
    width: 36ch;
  }
}
@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  text-decoration: none;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #0b0f14;
  cursor: pointer;
  border: 0;
  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    box-shadow 0.15s ease;
}
.btn.grad {
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  box-shadow: 0 6px 18px rgba(0, 212, 255, 0.25);
}
.btn.grad:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn.with-play {
  position: relative;
  padding-left: 18px;
}
.btn.with-play::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
  margin-right: 8px;
  transform: translateY(1px);
}

.msg {
  font-size: 14px;
  margin-top: 12px;
}
.msg.ok {
  color: #7cff96;
}
.msg.err {
  color: #ff7a7a;
}

footer {
  position: fixed;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  color: #94a2b8;
  font-size: 12px;
}

/* Modal (<dialog>) */
.modal {
  border: 0;
  padding: 20px;
  inset: 0;
  display: none; /* скрыто, пока нет [open] */
  place-items: center; /* центрируем .modal-card */
  background: transparent; /* фон в ::backdrop */
  z-index: 50;
}
.modal[open] {
  display: grid;
}

/* затемнение и blur теперь на backdrop диалога */
.modal::backdrop {
  background: rgba(5, 8, 13, 0.55);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(460px, 92vw);
  border-radius: 16px;
  padding: 22px;
  text-align: left;
  position: relative;
  background: rgba(255, 255, 255, 0.07);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px var(--ring);
  backdrop-filter: blur(14px) saturate(1.2);
}
.modal-title {
  margin: 4px 0 6px;
  font-size: 22px;
  font-weight: 700;
}
.modal-sub {
  margin: 0 0 14px;
  color: var(--muted);
}
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  align-items: center;
}
.input {
  flex: 1;
  border: 1px solid var(--ring);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.input::placeholder {
  color: #b6c2d4;
}
.close-x {
  position: absolute;
  right: 14px;
  top: 14px;
  background: transparent;
  border: 0;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 18px;
}
