:root {
  --bg0: #0b1020;
  --bg1: #1a0b2a;
  --card: rgba(255, 255, 255, 0.08);
  --card2: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --muted2: rgba(255, 255, 255, 0.48);
  --hot: #ff2d55;
  --hot2: #ff4d6d;
  --ok: #2ecc71;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  overflow: hidden;
  background:
    radial-gradient(1000px 800px at 10% 20%, rgba(255, 45, 85, 0.18), transparent 55%),
    radial-gradient(900px 700px at 90% 10%, rgba(255, 153, 204, 0.14), transparent 60%),
    radial-gradient(900px 700px at 70% 90%, rgba(46, 204, 113, 0.10), transparent 55%),
    linear-gradient(140deg, var(--bg0), var(--bg1));
}

#petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 18px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--card), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 0;
}

.badge {
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.hint {
  font-size: 12px;
  color: var(--muted2);
}

.rose-wrap {
  align-self: center;
  justify-self: center;
  width: min(360px, 100%);
  padding: 10px 12px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rose {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.35));
  transform-origin: 50% 60%;
  animation: roseFloat 4.8s ease-in-out infinite;
}

.petals {
  transform-origin: 50% 45%;
  animation: petalsBreathe 3.6s ease-in-out infinite;
}

.stem {
  transform-origin: 50% 85%;
  animation: stemSway 5.2s ease-in-out infinite;
}

@keyframes roseFloat {
  0% {
    transform: translateY(0) rotate(-1.2deg) scale(1);
  }
  50% {
    transform: translateY(-8px) rotate(1.6deg) scale(1.02);
  }
  100% {
    transform: translateY(0) rotate(-1.2deg) scale(1);
  }
}

@keyframes petalsBreathe {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(1.2deg) scale(1.03);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes stemSway {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-1.4deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.copy {
  padding: 10px 10px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 320px;
}

.title {
  margin: 0;
  font-size: clamp(22px, 3.1vw, 34px);
  line-height: 1.12;
}

.title-strong {
  display: inline-block;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.74));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-soft {
  color: var(--muted);
}

.typewriter {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1.8;
  min-height: 5.2em;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.typewriter::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 18px;
  margin-left: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.72);
  vertical-align: -3px;
  animation: caret 0.9s steps(1) infinite;
}

@keyframes caret {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  border-color: rgba(255, 45, 85, 0.55);
  background: linear-gradient(180deg, rgba(255, 45, 85, 0.95), rgba(201, 24, 74, 0.92));
  box-shadow: 0 14px 30px rgba(255, 45, 85, 0.18);
}

.btn-primary:hover {
  background: linear-gradient(180deg, rgba(255, 77, 109, 0.98), rgba(201, 24, 74, 0.92));
  border-color: rgba(255, 77, 109, 0.7);
}

.btn-ghost {
  background: transparent;
}

.btn-icon {
  padding: 10px 12px;
  min-width: 44px;
}

.btn-icon[aria-pressed="true"] {
  border-color: rgba(46, 204, 113, 0.55);
  background: rgba(46, 204, 113, 0.16);
}

.icon {
  font-weight: 900;
}

.footer {
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.74);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.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;
}

/* Modal */
.modal {
  border: none;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}

.modal-inner {
  width: min(520px, calc(100vw - 32px));
  border-radius: 20px;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  color: var(--text);
}

.modal-rose {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 45%),
    radial-gradient(circle at 40% 40%, rgba(255, 45, 85, 0.92), rgba(201, 24, 74, 0.92));
  box-shadow: 0 16px 30px rgba(255, 45, 85, 0.18);
  margin-bottom: 10px;
}

.modal-title {
  margin: 6px 0 6px;
  font-size: 20px;
}

.modal-text {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }
  #petals {
    position: fixed;
  }
  .card {
    grid-template-columns: 1fr;
  }
  .rose-wrap {
    width: min(420px, 100%);
  }
}


