/* RESET */
body {
  margin: 0;
  font-family: Arial, sans-serif;
}

/* 🌌 NIGHT SKY BACKGROUND */
body.night {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

  background: radial-gradient(circle at top, #1b1f3a, #05060f);
  color: white;
  overflow: hidden;

  animation: flicker 6s infinite;
}

/* ✨ DRIFTING STARS */
body.night::after {
  content: "";
  position: fixed;
  width: 200%;
  height: 200%;
  background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
  opacity: 0.2;
  animation: drift 120s linear infinite;
}

/* 🌫️ HAZY MEMORY NOISE */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-image: url("https://www.transparenttextures.com/patterns/noise.png");
  opacity: 0.06;

  pointer-events: none;
  z-index: 9999;
}

/* 📓 JOURNAL COVER */
.journal-cover {
  text-align: center;
  padding: 50px 70px;

  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);

  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 50px rgba(120,150,255,0.25);

  animation: float 6s ease-in-out infinite;
}

/* ⚡ GLITCH TEXT */
.glitch {
  font-size: 42px;
  letter-spacing: 3px;
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0.7;
}

.glitch::before {
  color: #ff6b8a;
  animation: glitch1 0.8s infinite;
}

.glitch::after {
  color: #6be3ff;
  animation: glitch2 0.8s infinite;
}

/* subtitle */
.subtitle {
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.7;
  font-style: italic;
}

/* button */
.enter {
  display: inline-block;
  margin-top: 25px;
  padding: 10px 20px;

  border-radius: 12px;
  text-decoration: none;

  background: rgba(255,255,255,0.1);
  color: white;

  transition: 0.3s;
}

.enter:hover {
  background: rgba(255,255,255,0.3);
}

/* 🌫️ FADE IN (LOADING INTO MEMORY) */
.fade-in {
  animation: fadeIn 2.5s ease forwards;
}

/* ✨ ANIMATIONS */

@keyframes fadeIn {
  from {
    opacity: 0;
    filter: blur(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-50%, -50%); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

@keyframes flicker {
  0% { opacity: 1; }
  2% { opacity: 0.95; }
  4% { opacity: 1; }
  8% { opacity: 0.96; }
  10% { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes glitch1 {
  0% { transform: translate(0); }
  25% { transform: translate(-2px, 2px); }
  50% { transform: translate(-2px, -2px); }
  75% { transform: translate(2px, 2px); }
  100% { transform: translate(0); }
}

@keyframes glitch2 {
  0% { transform: translate(0); }
  25% { transform: translate(2px, -2px); }
  50% { transform: translate(2px, 2px); }
  75% { transform: translate(-2px, -2px); }
  100% { transform: translate(0); }
}