* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: 'Source Sans Pro', sans-serif;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  color: #ecf0f1;
  overflow: hidden;
}

.main {
  position: absolute;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title {
  font-family: 'Poiret One', cursive;
  font-size: 4rem;
  margin-bottom: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.title:hover {
  transform: scale(1.05);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.sub-title {
  border-top: 0.1rem solid #fff;
  padding: 1rem 4rem;
  text-align: center;
}

.stars,
.stars2,
.meteorites {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: strict;
}

.star {
  position: absolute;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0.6) 40%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.meteorite {
  position: absolute;
  width: 300px;
  height: 1px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

.meteorite::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8), 0 0 20px 4px rgba(255, 255, 255, 0.4);
}

@keyframes fall {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translate3d(0, 100vh, 0);
    opacity: 0;
  }
}

@keyframes meteor {
  0% {
    transform: translateX(0) translateY(0) rotate(var(--angle)) translateX(-100%);
    opacity: 1;
  }

  100% {
    transform: translateX(0) translateY(0) rotate(var(--angle)) translateX(200vh);
    opacity: 0;
  }
}

.game-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.game-overlay.hidden {
  display: none;
}

.game-ui {
  position: absolute;
  top: 20px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 30px;
  pointer-events: none;
}

.score-board {
  font-family: 'Poiret One', cursive;
  font-size: 2rem;
  color: #fff;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  pointer-events: auto;
  line-height: 0.5;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  touch-action: none;
}

#gameOverScreen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem 4rem;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#gameOverScreen.hidden {
  display: none;
}

#gameOverScreen h2 {
  font-family: 'Poiret One', cursive;
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ff4444;
}

#gameOverScreen p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

#restartBtn {
  padding: 10px 30px;
  font-size: 1.2rem;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-family: 'Source Sans Pro', sans-serif;
  transition: transform 0.2s;
}

#restartBtn:hover {
  transform: scale(1.1);
}