*{box-sizing:border-box}

html,body{
  margin:0;
  height:100%;
  overflow:hidden;
  background:#02030a;
  color:white;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}

.rain-page{
  position:relative;
  width:100vw;
  height:100vh;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 50% 18%, rgba(80,115,165,.20), transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(255,80,160,.09), transparent 42%),
    linear-gradient(180deg, rgba(13,52,58,1) 0%, #02030a 48%, #000 100%);
}

/* THIS is the CodePen-style rain layer: real individual drops, not stripe lines */
.rain{
  position:absolute;
  inset:0;
  z-index:2;
  pointer-events:none;
  overflow:hidden;
}

.drop{
  background:linear-gradient(to bottom, rgba(13,52,58,0), rgba(255,255,255,.58));
  width:1px;
  height:89px;
  position:absolute;
  bottom:200px;
  animation:fall .63s linear infinite;
  opacity:.48;
}

@keyframes fall{
  to{
    margin-top:900px;
  }
}

/* extra atmosphere only, no hard diagonal lines */
.rain-mist{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% 20%, rgba(120,170,255,.13), transparent 35%),
    radial-gradient(circle at 50% 90%, rgba(255,120,190,.08), transparent 38%);
  opacity:.85;
}

.window-glass{
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
  opacity:.13;
  background:
    radial-gradient(circle at 12% 25%, rgba(255,255,255,.20) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.16) 0 1px, transparent 2px),
    radial-gradient(circle at 44% 70%, rgba(255,255,255,.13) 0 1px, transparent 2px);
  background-size:160px 230px, 210px 290px, 260px 330px;
  animation:droplets 16s linear infinite;
}

@keyframes droplets{
  from{background-position:0 0,0 0,0 0}
  to{background-position:0 220px,0 280px,0 340px}
}

/* remove old rain systems completely */
.rain-layer,
.rain-layer-soft,
.visible-rain,
.heavy-rain,
.lightning-flash{
  display:none !important;
}

.rain-card{
  position:relative;
  z-index:10;
  width:min(860px,92vw);
  max-height:92vh;
  padding:24px;
  border-radius:34px;
  text-align:center;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  background:
    linear-gradient(180deg,rgba(0,0,0,.68),rgba(0,0,0,.34)),
    radial-gradient(circle at top,rgba(120,170,255,.11),rgba(255,120,190,.06),rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.16);
  box-shadow:
    0 0 32px rgba(120,170,255,.18),
    0 0 48px rgba(255,130,190,.10),
    0 22px 75px rgba(0,0,0,.65),
    inset 0 0 30px rgba(255,255,255,.03);
}

.rain-kicker{
  margin:0 0 12px;
  text-transform:uppercase;
  letter-spacing:.26em;
  font-size:.78rem;
  color:#d7e8ff;
  text-shadow:0 0 14px rgba(120,170,255,.72);
}

.memory-window{
  position:relative;
  z-index:11;
  width:min(520px,86vw);
  aspect-ratio:16/9;
  border-radius:26px;
  overflow:hidden;
  margin:0 auto 20px;
  background:#000;
  border:1px solid rgba(255,255,255,.22);
  box-shadow:
    0 0 26px rgba(120,170,255,.24),
    0 0 42px rgba(255,120,190,.14),
    0 18px 50px rgba(0,0,0,.58);
}

.rain-video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  opacity:.86;
  filter:brightness(.78) contrast(1.1) saturate(1.08);
}

.video-glow{
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at center, transparent 45%, rgba(0,0,0,.32)),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.16));
}

.rain-card h1{
  margin:0;
  max-width:720px;
  font-size:clamp(2rem,6vw,4.3rem);
  line-height:1.02;
  font-family:"Brush Script MT","Segoe Script",cursive;
  font-weight:400;
  text-shadow:
    0 0 16px rgba(255,255,255,.80),
    0 0 34px rgba(120,170,255,.62),
    0 0 62px rgba(255,105,180,.24);
}

.rain-quote{
  min-height:68px;
  margin:20px 0 22px;
  max-width:660px;
  font-size:clamp(1.02rem,3vw,1.45rem);
  line-height:1.45;
  color:#edf5ff;
  text-shadow:0 0 16px rgba(255,255,255,.26);
  opacity:1;
  transition:opacity .8s ease,transform .8s ease,filter .8s ease;
}

.rain-quote.fade{
  opacity:0;
  transform:translateY(12px);
  filter:blur(5px);
}

.rain-start,.rain-return{
  border:1px solid rgba(210,235,255,.95);
  border-radius:999px;
  padding:14px 24px;
  color:white;
  text-decoration:none;
  cursor:pointer;
  font-size:clamp(1rem,3.2vw,1.2rem);
  font-weight:900;
  background:linear-gradient(135deg,rgba(70,145,255,.52),rgba(255,120,200,.22));
  box-shadow:
    0 0 24px rgba(90,170,255,.72),
    0 0 42px rgba(255,0,160,.25),
    inset 0 0 14px rgba(255,255,255,.12);
}

.rain-start{
  animation:pulseButton 1.8s ease-in-out infinite;
}

@keyframes pulseButton{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.055)}
}

.hidden-rain{display:none!important}

.rain-bottom-message{
  position:absolute;
  left:0;
  right:0;
  bottom:18px;
  z-index:10;
  padding:0 18px;
  text-align:center;
  color:#e6f2ff;
  font-size:clamp(.92rem,2.6vw,1.1rem);
  opacity:.86;
  text-shadow:
    0 0 16px rgba(255,255,255,.42),
    0 0 28px rgba(90,170,255,.40);
}

body.rain-started .memory-window{
  box-shadow:
    0 0 34px rgba(120,170,255,.38),
    0 0 58px rgba(255,120,190,.24),
    0 18px 50px rgba(0,0,0,.58);
}

@media(max-width:640px){
  .rain-card{
    padding:20px 16px;
    width:94vw;
  }

  .memory-window{
    width:88vw;
    margin-bottom:16px;
  }

  .rain-quote{
    min-height:74px;
    margin:16px 0 18px;
  }

  .rain-bottom-message{
    bottom:10px;
  }
}
