:root {
  --pink1: #ff8dc2;
  --pink2: #f25ca2;
  --pink3: #c83e8a;
  --glass: rgba(255, 255, 255, 0.18);
  --text: #fff7fc;
  --muted: #ffd8ea;
  --shadow: 0 20px 50px rgba(125, 14, 71, 0.28);
  --line: rgba(255, 255, 255, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 195, 226, 0.3), transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(255, 154, 214, 0.28), transparent 40%),
    linear-gradient(150deg, #591540, #8d2f68 35%, #b23c84 62%, #d65a9d);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

#fxCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-rays {
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    conic-gradient(from 160deg at 30% 40%, rgba(255, 255, 255, 0.18), transparent 22%, rgba(255, 255, 255, 0.08), transparent 56%),
    radial-gradient(circle at center, transparent 30%, rgba(255, 255, 255, 0.05) 70%, transparent 100%);
  filter: blur(18px) saturate(1.1);
  animation: sway 12s ease-in-out infinite alternate;
}

@keyframes sway {
  from {
    transform: rotate(-3deg) scale(1);
  }
  to {
    transform: rotate(4deg) scale(1.06);
  }
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-header {
  width: min(1000px, calc(100% - 24px));
  margin: 16px auto 0;
  padding-top: env(safe-area-inset-top);
}

.brand {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}

main {
  width: min(1000px, calc(100% - 24px));
  margin: 14px auto 20px;
  min-height: calc(100dvh - 130px);
  display: grid;
  place-items: center;
}

.card {
  background: linear-gradient(145deg, var(--glass), rgba(255, 255, 255, 0.07));
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero {
  width: min(760px, 100%);
  padding: clamp(26px, 5vw, 56px);
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.4rem);
  line-height: 1.05;
}

.subtitle {
  margin: 12px auto 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 2.8vw, 1.22rem);
}

.play-toggle {
  margin-top: 20px;
  width: clamp(84px, 22vw, 112px);
  height: clamp(84px, 22vw, 112px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--text);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  font: inherit;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.play-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 34px rgba(255, 148, 214, 0.75);
  border-color: rgba(255, 255, 255, 0.58);
}

.play-toggle:focus-visible {
  outline: 2px solid #ffe3f2;
  outline-offset: 2px;
}

.status {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(0.94rem, 2.5vw, 1rem);
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 12px 0 calc(20px + env(safe-area-inset-bottom));
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 30;
  background: rgba(56, 9, 33, 0.9);
  color: #ffeaf5;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
  max-width: calc(100% - 20px);
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 24px);
    margin-top: 10px;
  }

  .brand {
    font-size: 0.9rem;
  }

  main {
    width: calc(100% - 24px);
    margin-top: 8px;
    margin-bottom: 14px;
    min-height: calc(100dvh - 110px);
  }

  .hero {
    width: 100%;
    border-radius: 20px;
    padding: 24px 18px 26px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .subtitle {
    font-size: clamp(0.95rem, 4.2vw, 1.1rem);
    max-width: 28ch;
  }

  .play-toggle {
    width: clamp(88px, 24vw, 108px);
    height: clamp(88px, 24vw, 108px);
    font-size: clamp(1.9rem, 7vw, 2.2rem);
    touch-action: manipulation;
  }

  .toast {
    width: calc(100% - 24px);
    bottom: calc(12px + env(safe-area-inset-bottom));
    text-align: center;
  }
}

@media (max-width: 400px) {
  .hero {
    padding: 22px 14px 24px;
  }

  h1 {
    font-size: clamp(1.8rem, 10.8vw, 2.4rem);
  }

  .subtitle {
    font-size: 0.92rem;
  }
}

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

  .bg-rays {
    display: none;
  }
}
