/* General reset for consistency across devices */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-color: #9b00d9;
  font-family: 'Press Start 2P', cursive;
  color: #444;
  text-align: center;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Page container */
.container {
  max-width: 500px; /* Matches common smartphone widths */
  margin: 0 auto;
  padding: 16px;
} 

#poem-container {
  font-size: 0.8rem;
  line-height: 2;
  max-width: 400px;
  margin: 20px auto;
  color: #f9ffa8;
  position: relative;
  z-index: 2;
}
.glitch {
  display: inline-block;
  position: relative;
  color: #ff64b3;
  text-shadow: 4px 2px 6px #000;
  animation: glitchColorShift 1.8s infinite ease-in-out;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: #00E3FE;
  background: transparent;
  clip-path: inset(0 0 50% 0);
  animation: glitchEffect 0.55s infinite ease-in-out alternate;
}

.glitch::after {
  color: #ff0000;
  left: 2px;
  top: 2px;
  clip-path: inset(50% 0 0 0);
}

@keyframes glitchEffect {
  0% {
    transform: translate(-4px, -2px);
  }
  50% {
    transform: translate(2px, 2px);
  }
  100% {
    transform: translate(-2px, 2px);
  }
}

@keyframes glitchColorShift {
  0%, 100% {
    color: #ff91c9;
  }
  50% {
    color: #00ff04;
  }
}

/* Sparkle Effect */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 252, 255, 0.9) 1.4px, transparent 1px);
  background-size: 6px 6px;
  z-index: 0;
  animation: sparkle 0.16s infinite linear;
}

@keyframes sparkle {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-10px, 10px);
  }
}
/* Modal Styles */
.modal {
  display: none;
  position: absolute;
  z-index: 100;
  left: -1%;
  top: 35%;
  width: 100%;
  height: 50%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 10px;
  border: 1px solid #888;
  width: 50%;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}     

/* Fullscreen container for stars */
.moving-stars {
  position: fixed;
  top: 0%;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Allows clicks to pass through */
  overflow: hidden;
  z-index: 70;
}

/* Individual star styles */
.star {
  position: absolute;
  font-size: 80px;
  color: #EFA0FF; /* Star color */
  animation: moveStar 10s ease-out infinite;
  opacity: 0.8; /* Slight transparency */
}

/* Star animation */
@keyframes moveStar {
  0% {
    transform: translateY(-20%);
    opacity: 1; /* Fade in at the top */
  }
   30% {
    opacity: 0.7; /* Fully visible during descent */
  }
  90% {
    opacity: 0.4; /* Fully visible during descent */
  }
  100% {
    transform: translateY(80vh);
    opacity: 0; /* Fade out as it exits the screen */
  }
}

/* Container for shapes */
#shapes-container {
  position: fixed;
  top: 20px;
  left: 10px;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Prevent interactions */
  overflow: hidden;
  z-index: 1;
}

/* Floating shapes styling */
.floating-shape {
  position: absolute;
  font-size: 1.5rem;
  color: 	#ff64b3;
  animation: floatShape 7s linear infinite;
  text-shadow: 1px 1px 3px #fff, -1px -1px 2px #ff00ff;
}

/* Animation for floating shapes */
@keyframes floatShape {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}