/* Base layout */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-size: 20px;
  background: #000;
}
.container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  color: white;
  font-family: arial, sans-serif;
  overflow: hidden;
}

/* Content card (front-most) */
.content {
  position: relative;
  z-index: 3; /* front */
  width: 600px;
  max-width: 100%;
  margin: 20px;
  background: #111;
  padding: 60px 40px;
  text-align: center;
  box-shadow: -10px 10px 67px -12px rgba(0,0,0,.5);
  opacity: 0;
  animation: apparition .8s 1.2s cubic-bezier(.39,.575,.28,.995) forwards;
}
.content p {
  font-size: 1.3rem;
  margin: 0 0 .6rem;
  letter-spacing: .1rem;
  color: #eee;
}
.content button {
  display: inline-block;
  margin-top: 2rem;
  padding: .5rem 1rem;
  border: 3px solid #eee;
  background: transparent;
  font-size: 1rem;
  color: #eee;
  cursor: pointer;
  font-weight: bold;
}

/* Floating 4/0 particles (above ship, below content) */
.particle {
  position: absolute;
  display: block;
  pointer-events: none;
  font-weight: bold;
  z-index: 2;
}

/* Comet layer (rotated vertical streaks for diagonal comets) */
.comets {
  position: absolute;
  z-index: 0; /* far back */
  pointer-events: none;
  top: 0;
  left: 0;
  width: 150vw;
  height: 150vh;
  transform-origin: center;
  transform: translate3d(-25vw, -25vh, 0) rotate(65deg) scale(0.75);
}

/* Single comet streak */
.comet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 75vh; /* randomized via JS */
  background: linear-gradient(#fff, transparent);
  animation: comet 3s ease-in-out forwards;
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.35));
}

/* Animations */
@keyframes apparition {
  from { opacity: 0; transform: translateY(100px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(180px); }
}
@keyframes floatReverse {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-180px); }
}
@keyframes float2 {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(28px); }
}
@keyframes floatReverse2 {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-28px); }
}
@keyframes comet {
  0%   { opacity: 0; transform: translateY(200%) scaleY(0); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(0) scaleY(1); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .particle { animation: none !important; }
  .comet { animation: none !important; opacity: 0; }
}

/* Layer order: spaceship(1) < comets(2) < digits(3) < content(4) */
.comets  { z-index: 2 !important; }
.particle{ z-index: 3 !important; }
.content { z-index: 4 !important; }