:root{
  --bg0:#05000b;
  --bg1:#120014;
  --bg2:#270018;

  --txt: rgba(255,255,255,.95);
  --muted: rgba(255,255,255,.72);

  --hot:#ff0a62;
  --hot2:#ff4aa2;
  --wine:#8b0023;
  --gold:#ffd08a;

  --shadow: 0 34px 120px rgba(0,0,0,.68);
  --r: 30px;

  --themeA: rgba(255,10,98,.18);
  --themeB: rgba(255,208,138,.10);
  --themeC: rgba(139,0,35,.22);
}

/* ✅ FIX iOS/Android: éviter bouton "gris" / style natif */
button{
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  color: inherit;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--txt);
  background:
    radial-gradient(1100px 780px at 10% 10%, rgba(255,10,98,.34) 0%, transparent 55%),
    radial-gradient(900px 700px at 88% 20%, rgba(255,208,138,.18) 0%, transparent 58%),
    radial-gradient(1200px 900px at 50% 130%, rgba(139,0,35,.42) 0%, transparent 56%),
    linear-gradient(180deg, var(--bg0), var(--bg2));
  overflow-x:hidden;
  padding: max(14px, env(safe-area-inset-top))
           max(14px, env(safe-area-inset-right))
           max(14px, env(safe-area-inset-bottom))
           max(14px, env(safe-area-inset-left));
}

.bg{ position:fixed; inset:0; pointer-events:none; overflow:hidden; }
.blob{
  position:absolute; filter: blur(36px); opacity:.95;
  animation: drift 11s ease-in-out infinite alternate;
}
.b1{ width:560px;height:560px; left:-240px; top:-20px;
  background: radial-gradient(circle at 30% 30%, rgba(255,10,98,.98), transparent 66%);
}
.b2{ width:680px;height:680px; right:-290px; top:60px;
  background: radial-gradient(circle at 40% 40%, rgba(139,0,35,.95), transparent 68%);
  animation-duration: 13s;
}
.b3{ width:820px;height:820px; left:10%; bottom:-390px;
  background: radial-gradient(circle at 40% 40%, rgba(255,208,138,.48), transparent 70%);
  animation-duration: 15s;
}
@keyframes drift{ to { transform: translateY(28px) translateX(28px) scale(1.10); } }

.grain{
  position:absolute; inset:-30%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.20'/%3E%3C/svg%3E");
  opacity:.10; mix-blend-mode: overlay;
}
.vignette{
  position:absolute; inset:-20%;
  background: radial-gradient(circle, transparent 30%, rgba(0,0,0,.68) 74%);
  opacity:.68;
}
.scanlines{
  position:absolute; inset:0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.03), rgba(255,255,255,.03) 1px, rgba(0,0,0,0) 6px, rgba(0,0,0,0) 10px);
  opacity:.06;
}

/* Theme overlay (changes per screen) */
.themed{
  position:absolute; inset:-10%;
  background:
    radial-gradient(900px 640px at 18% 20%, var(--themeA), transparent 60%),
    radial-gradient(980px 720px at 80% 26%, var(--themeB), transparent 62%),
    radial-gradient(1100px 860px at 50% 120%, var(--themeC), transparent 58%);
  filter: blur(18px);
  opacity:.9;
  transform: rotate(2deg);
  animation: themePulse 2.4s ease-in-out infinite alternate;
}
@keyframes themePulse{
  to{ opacity:.72; transform: rotate(1deg) scale(1.02); }
}

/* Layout */
.shell{
  min-height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
}

.topbar{
  width:min(980px, 100%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 6px 6px 10px;
  flex-wrap: wrap;
}

.brand{
  border:0;
  background: transparent;
  color: rgba(255,255,255,.95);
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  padding: 6px 8px;
  border-radius: 14px;
  opacity: 1;
  -webkit-tap-highlight-color: transparent;
}
.brand:active{ transform: translateY(1px); }
.brand:hover{ background: rgba(255,255,255,.06); }

.logo{
  width:40px; height:40px; display:grid; place-items:center;
  border-radius: 15px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 80px rgba(0,0,0,.35);
  position:relative;
}
.logo::after{
  content:"";
  position:absolute; inset:-12px;
  background: radial-gradient(circle, rgba(255,10,98,.45), transparent 65%);
  filter: blur(10px);
  opacity:.95; z-index:-1;
}
.brandText{ font-weight: 950; letter-spacing:.2px; color: rgba(255,255,255,.94); font-size: 14px; }

.topActions{ display:flex; gap:10px; margin-left:auto; }
.pill{
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 900;
  cursor:pointer;
  min-height: 44px;
  box-shadow: 0 16px 70px rgba(255,10,98,.08);
}
.pill:active{ transform: translateY(1px); }

.card{
  width:min(980px, 100%);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: var(--shadow);
  position:relative;
  overflow:hidden;
  transform-style: preserve-3d;
}

.cardGlow{
  position:absolute; inset:-70%;
  background:
    radial-gradient(circle at 28% 30%, rgba(255,10,98,.36), transparent 55%),
    radial-gradient(circle at 78% 38%, rgba(255,208,138,.18), transparent 60%),
    radial-gradient(circle at 50% 85%, rgba(139,0,35,.36), transparent 60%);
  filter: blur(34px);
  opacity:.98;
  pointer-events:none;
  animation: pulseGlow 2.0s ease-in-out infinite alternate;
  transform: translateZ(-1px);
}
@keyframes pulseGlow{ to{ opacity:.82; transform: translateZ(-1px) scale(1.03); } }

.cardNoise{
  position:absolute; inset:0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.08), transparent 40%);
  opacity:.10;
  mix-blend-mode: overlay;
  pointer-events:none;
}

.content{ position:relative; padding: 22px; }

.kicker{
  display:inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,10,98,.20);
  border:1px solid rgba(255,10,98,.36);
  color: rgba(255,255,255,.95);
  font-size: 12px;
  letter-spacing:.45px;
  text-transform: uppercase;
  box-shadow: 0 20px 70px rgba(255,10,98,.10);
}

.stage{ margin-top: 10px; opacity:1; transform: translateY(0); }
.stage.out{ animation: out 220ms ease forwards; }
.stage.in{ animation: in 420ms cubic-bezier(.2,.9,.2,1) forwards; }
@keyframes out{ to{ transform: translateY(12px); opacity:.0; filter: blur(2px); } }
@keyframes in{
  from{ transform: translateY(-10px); opacity:.0; filter: blur(2px); }
  to{ transform: translateY(0); opacity:1; filter: blur(0); }
}

.title{
  margin: 12px 0 8px;
  font-size: clamp(34px, 7vw, 72px);
  line-height:1.02;
  letter-spacing:-1.2px;
  text-shadow: 0 18px 70px rgba(0,0,0,.35), 0 0 46px rgba(255,10,98,.14);
}
.subtitle{
  margin:0;
  color: var(--muted);
  font-size: clamp(15px, 2.4vw, 20px);
  line-height:1.65;
  max-width: 62ch;
}

.panel{
  margin-top: 18px;
  padding: 16px;
  border-radius: calc(var(--r) - 12px);
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    0 18px 80px rgba(0,0,0,.28) inset,
    0 18px 110px rgba(255,10,98,.07);
}
.panel p{ margin: 0 0 10px; color: rgba(255,255,255,.80); line-height:1.75; }
.panel strong{ color: rgba(255,255,255,.96); }
.panel ul{ margin: 10px 0 0; padding-left: 18px; color: rgba(255,255,255,.78); }
.panel li{ margin: 6px 0; line-height:1.55; }

.fieldRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 12px;
}
.input{
  flex: 1 1 220px;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  padding: 12px 14px;
  outline: none;
}
.input:focus{
  border-color: rgba(255,10,98,.55);
  box-shadow: 0 0 0 6px rgba(255,10,98,.14);
}
.badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding: 8px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.82);
  font-weight: 900;
  font-size: 12px;
}
.badge.ok{ border-color: rgba(70,255,170,.22); }
.badge.nope{ border-color: rgba(255,70,120,.22); }

.actions{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}
.btn{
  border:0;
  border-radius: 20px;
  padding: 16px 18px;
  font-weight: 1000;
  letter-spacing:.35px;
  cursor:pointer;
  min-height: 54px;
  user-select:none;
  position:relative;
  overflow:hidden;
  transition: transform .12s ease, filter .15s ease, box-shadow .2s ease;
}
.btn:active{ transform: translateY(1px) scale(.99); }

.primary{
  background: linear-gradient(180deg, var(--hot2), var(--hot));
  color:white;
  box-shadow: 0 24px 90px rgba(255,10,98,.30), 0 0 0 1px rgba(255,255,255,.10) inset;
}
.primary:hover{ filter: brightness(1.08); }
.ghost{
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.94);
  border:1px solid rgba(255,255,255,.20);
  box-shadow: 0 18px 80px rgba(0,0,0,.12);
}

.ripple{
  position:absolute;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events:none;
  background: radial-gradient(circle, rgba(255,255,255,.55), rgba(255,255,255,0) 70%);
  width: 12px; height: 12px;
  animation: ripple 650ms ease-out forwards;
  mix-blend-mode: screen;
}
@keyframes ripple{
  to{ width: 320px; height: 320px; opacity:0; }
}

.actions .btn{ flex: 1 1 100%; }
@media (min-width: 560px){
  .content{ padding: 30px; }
  .actions .btn{ flex: 0 0 auto; }
  .brandText{ font-size: 15px; }
}

/* Progress */
.progress{
  margin-top: 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color: rgba(255,255,255,.62);
}
.steps{ display:flex; gap:8px; align-items:center; }
.dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.12);
}
.dot.active{
  background: rgba(255,10,98,.98);
  border-color: rgba(255,10,98,.58);
  box-shadow: 0 0 0 7px rgba(255,10,98,.14);
}
.small{ font-size: 13px; }

.footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding: 14px 18px 18px;
  border-top:1px solid rgba(255,255,255,.12);
}
.link{
  border:0;
  background: transparent;
  color: rgba(255,255,255,.78);
  font-weight: 950;
  cursor:pointer;
  padding: 10px 12px;
  border-radius: 12px;
}
.link:hover{ background: rgba(255,255,255,.06); }

.curtain{
  position:absolute; inset:0;
  background: radial-gradient(circle at 50% 30%, rgba(255,10,98,.12), rgba(0,0,0,.58));
  opacity:0;
  pointer-events:none;
}
.curtain.flash{ animation: flash 420ms ease-out; }
@keyframes flash{ 0%{opacity:0} 35%{opacity:.58} 100%{opacity:0} }

.hearts,.particles,.confetti{ position:fixed; inset:0; pointer-events:none; overflow:hidden; }

.heart{
  position:absolute;
  opacity:.92;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,.35));
  animation: floatUp linear forwards;
  text-shadow: 0 0 18px rgba(255,10,98,.18);
}
@keyframes floatUp{ to{ transform: translateY(-120vh) translateX(var(--dx)) rotate(18deg); opacity:1; } }

.p{
  position:absolute;
  width:4px; height:4px;
  border-radius:999px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 0 12px rgba(255,10,98,.35);
  animation: driftP linear forwards;
  opacity:.85;
}
@keyframes driftP{ to{ transform: translateY(-110vh) translateX(var(--dx)); opacity:0; } }

.conf{
  position:absolute;
  width:10px; height:14px;
  border-radius: 3px;
  opacity:.95;
  animation: fall linear forwards;
}
@keyframes fall{ to{ transform: translateY(115vh) rotate(540deg); } }

.sparkle{
  position:fixed;
  width:10px; height:10px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 70%);
  box-shadow: 0 0 22px rgba(255,10,98,.40);
  pointer-events:none;
  animation: sparkle 700ms ease-out forwards;
}
@keyframes sparkle{ to{ transform: translate(var(--sx), var(--sy)) scale(.1); opacity:0; } }

.pop{ animation: pop 420ms cubic-bezier(.2,.9,.2,1); }
@keyframes pop{ 0%{ transform: scale(.995); } 50%{ transform: scale(1.01); } 100%{ transform: scale(1); } }

.finalBox{
  margin-top: 16px;
  padding: 14px 14px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  box-shadow: 0 18px 90px rgba(255,10,98,.06);
}
.loveType{
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: clamp(26px, 6vw, 56px);
  color: rgba(255,255,255,.97);
  text-shadow: 0 0 20px rgba(255,10,98,.22), 0 0 54px rgba(255,10,98,.16), 0 28px 100px rgba(0,0,0,.50);
}
.cursor{
  display:inline-block; width: 10px; margin-left: 6px;
  opacity:.9; animation: blink 900ms ease-in-out infinite;
}
@keyframes blink{ 50%{ opacity:.2; } }

.metaRow{ display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.chip{
  padding: 8px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  font-weight: 900;
  color: rgba(255,255,255,.86);
}

/* Overload mode */
body.overload .cardGlow{ animation-duration: .9s; }
body.overload .title{ text-shadow: 0 0 68px rgba(255,10,98,.22), 0 0 140px rgba(255,10,98,.12); }
