:root {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8ecff;
  background: radial-gradient(circle at top, #3d1b5c, #07070c);
  line-height: 1.5;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  z-index: -1;
}

body::before {
  top: -80px;
  left: -60px;
  background: radial-gradient(circle, rgba(255, 134, 219, 0.9), rgba(91, 12, 104, 0));
}

body::after {
  bottom: -90px;
  right: -80px;
  background: radial-gradient(circle, rgba(255, 183, 106, 0.85), rgba(61, 12, 92, 0));
  animation: float 12s ease-in-out infinite;
}

.floating-hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-hearts span {
  position: absolute;
  width: 22px;
  height: 22px;
  background: rgba(255, 138, 200, 0.5);
  transform: rotate(45deg);
  top: 110%;
  left: var(--left);
  animation: heartFloat var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.floating-hearts span::before,
.floating-hearts span::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: inherit;
}

.floating-hearts span::before {
  left: -11px;
}

.floating-hearts span::after {
  top: -11px;
}

.wrap {
  width: min(640px, 100%);
  position: relative;
  z-index: 1;
}

header {
  margin-bottom: 1.5rem;
}

h1 {
  margin: 0.6rem 0;
  font-size: clamp(2rem, 5vw, 2.7rem);
}

.lede {
  margin: 0;
  color: rgba(232, 236, 255, 0.86);
}

.quote {
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.8rem;
}

.card {
  background: rgba(17, 17, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1.5rem;
  backdrop-filter: blur(18px);
  margin-bottom: 1.5rem;
  box-shadow: 0 20px 45px rgba(7, 5, 12, 0.55);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

input,
textarea {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

textarea {
  min-height: 90px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary {
  background: linear-gradient(120deg, #ff61d8, #ff914d);
  color: #0b0512;
  box-shadow: 0 12px 30px rgba(255, 97, 216, 0.35);
}

.primary::after {
  content: "";
  position: absolute;
  inset: -150%;
  background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
  opacity: 0;
  transform: scale(0.4);
  animation: none;
}

.primary.sending {
  color: #fff;
  box-shadow: 0 20px 40px rgba(255, 145, 77, 0.55);
}

.primary.sending::after {
  opacity: 0.9;
  animation: sweep 1.2s linear infinite;
}

.primary.success {
  animation: success-pop 0.6s ease;
  box-shadow: 0 25px 45px rgba(255, 145, 77, 0.6);
}

.primary.success::after {
  opacity: 0;
}

.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(255, 97, 216, 0.5);
}

.big {
  width: 100%;
  padding-block: 1.1rem;
  font-size: 1.15rem;
}

.ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.badge {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
}

.error {
  color: #ff8baa;
  min-height: 1.2em;
}

.status {
  min-height: 1.2em;
  color: rgba(255, 255, 255, 0.85);
}

.success-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(8, 3, 20, 0.85);
  backdrop-filter: blur(18px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
}

.success-overlay.show {
  animation: overlay-in 0.4s ease forwards;
  pointer-events: auto;
}

.success-card {
  width: min(360px, 90%);
  padding: 2rem 1.5rem 1.4rem;
  border-radius: 26px;
  text-align: center;
  background: linear-gradient(160deg, rgba(60, 15, 84, 0.95), rgba(18, 7, 38, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px rgba(4, 2, 12, 0.55);
  transform: translateY(24px);
  animation: card-in 0.5s ease forwards;
}

.success-card.warning {
  background: linear-gradient(160deg, rgba(84, 33, 24, 0.95), rgba(31, 9, 5, 0.9));
}

.circle-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.check-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff8bc9, #fd5f9f);
  position: relative;
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.35);
}

.success-card.warning .check-circle {
  background: radial-gradient(circle, #ffb470, #ff7a45);
}

.check-circle::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 20px;
  width: 18px;
  height: 32px;
  border: 4px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
}

.success-overlay.show .check-circle::after {
  animation: check-draw 0.4s ease forwards 0.1s;
}

.chip-title {
  margin: 0 0 0.4rem;
  font-weight: 700;
  font-size: 1.2rem;
}

.chip-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
}

.success-card button {
  margin-top: 1.2rem;
  width: 100%;
}

.permission-overlay {
  display: none !important;
}

.permission-card {
  width: min(420px, 100%);
  background: linear-gradient(160deg, rgba(24, 10, 36, 0.95), rgba(9, 3, 18, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 1.8rem;
  color: #fff;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.permission-card h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.permission-card ol {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.permission-status {
  min-height: 1rem;
  color: rgba(255, 179, 179, 0.85);
  margin-bottom: 0.8rem;
}

.permission-card button {
  width: 100%;
}

.secondary-btn {
  margin-top: 0.6rem;
}

.pulse-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
  margin-right: 0.65rem;
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  animation: pulse 1.6s infinite;
}

.primary.sending .pulse-dot::after {
  animation-duration: 0.8s;
}

.primary.success .pulse-dot {
  background: #0b0512;
}

@keyframes pulse {
  from {
    transform: scale(0.5);
    opacity: 1;
  }
  to {
    transform: scale(1.8);
    opacity: 0;
  }
}

@keyframes sweep {
  from {
    transform: scale(0.4) rotate(0turn);
  }
  to {
    transform: scale(0.4) rotate(1turn);
  }
}

@keyframes success-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes card-in {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes check-draw {
  from {
    transform: rotate(45deg) scale(0);
  }
  to {
    transform: rotate(45deg) scale(1);
  }
}

@keyframes heartFloat {
  0% {
    transform: rotate(45deg) translateY(0);
    opacity: 0;
  }
  20% {
    opacity: 0.7;
  }
  100% {
    transform: rotate(45deg) translateY(-160vh);
    opacity: 0;
  }
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, -15px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@media (max-width: 600px) {
  body {
    padding: 1.5rem 0.6rem 2rem;
  }

  .card {
    padding: 1.2rem;
  }
}
