#splash-screen {
  --splash-text-shift-x: 0px;
  --splash-text-shift-y: 0px;
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  overflow: hidden;
  background: #0a0a0a;
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.start-splash #splash-screen {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

body.splash-leaving #splash-screen {
  opacity: 0;
  pointer-events: none;
}

#splash-particles {
  position: absolute;
  inset: 0;
}

#splash-particles canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#splash-overlay-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + var(--splash-text-shift-x)), calc(-50% + var(--splash-text-shift-y)));
  width: min(94vw, 44rem);
  max-width: 94vw;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

#splash-overlay-content h1 {
  color: #fff;
  font-size: clamp(3rem, 8vw, 4.6rem);
  max-width: 100%;
  margin-bottom: 0.5rem;
  line-height: 1.02;
  text-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.splash-title span { display: inline; }
.splash-title span + span::before { content: " "; }

#splash-overlay-content p {
  color: #64ffda;
  font-size: 1.2rem;
  max-width: 100%;
  margin: 0 auto 2rem;
  line-height: 1.35;
  white-space: normal;
}

#splash-overlay-content a {
  pointer-events: auto;
  color: #64ffda;
  border: 1px solid #64ffda;
  padding: 0.8rem 2rem;
  border-radius: 5px;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.3s;
}

#splash-overlay-content a:hover {
  background: rgba(100,255,218,0.1);
}

@media (max-width: 700px) and (orientation: portrait) {
  #splash-screen { --splash-text-shift-x: 0vw; --splash-text-shift-y: -1vh; }
  #splash-overlay-content h1 { font-size: clamp(3.4rem, 16vw, 5rem); }
  .splash-title span { display: block; }
  .splash-title span + span::before { content: ""; }
  #splash-overlay-content p { font-size: 1.05rem; max-width: 18rem; line-height: 1.35; }
  #splash-overlay-content a { padding: 0.7rem 1.6rem; font-size: 1.05rem; }
}

@media (max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {
  #splash-screen { --splash-text-shift-x: 0vw; --splash-text-shift-y: -1vh; }
  #splash-overlay-content h1 { font-size: clamp(2.8rem, 7vw, 4rem); }
  #splash-overlay-content p { margin-bottom: 1rem; }
}

@media (max-width: 500px) and (orientation: portrait) {
  #splash-overlay-content {
    width: 94vw;
    box-sizing: border-box;
    padding: 0 1rem;
    overflow: hidden;
  }
}
