body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  background-color: #0e0f1d;
  color: #fff;
  position: relative;
  z-index: 0;
  overflow-x: hidden;
}



@keyframes parallaxStars {
  0% { transform: translate(0px, 0px); }
  100% { transform: translate(1px, 1px); }
}


@keyframes twinkle {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.2; }
}

header.hero {
  text-align: center;
  padding: 50px 20px;
  background: radial-gradient(circle, #2b2d45 0%, #0e0f1d 100%);
}

nav a {
  margin: 0 10px;
  text-decoration: none;
  color: #9f9fff;
}

nav a:hover {
  text-decoration: underline;
}

section {
  padding: 40px 20px;
  max-width: 1000px;
  margin: auto;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.placeholder, .placeholder.modal-trigger {
  width: 150px !important;
  height: 150px !important;
  min-width: 150px !important;
  min-height: 150px !important;
  max-width: 150px !important;
  max-height: 150px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid #9f9fff !important;
  background: #1e1f2e !important;
  color: #fff !important;
  font-size: 1.1em;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  outline: none;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.placeholder:focus, .placeholder:hover, .placeholder.modal-trigger:focus, .placeholder.modal-trigger:hover {
  background: #23244a !important;
  color: #9f9fff !important;
  border-color: #fff !important;
}

a.button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #9f9fff;
  color: #0e0f1d;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  text-decoration: none;
  z-index: 999;
}

.starfield {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.starfield canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 64px;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  background-color: transparent;
  pointer-events: none;
}

.starfield:hover canvas {
  opacity: 1;
}

.starfield img {
  z-index: 1;
  position: relative;
  pointer-events: none;
  transition: transform 0.2s ease-in-out;
}

.starfield:hover img {
  animation: rocketShake 0.2s infinite;
}

@keyframes rocketShake {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  10%  { transform: translate(-1px, 1px) rotate(-0.5deg); }
  20%  { transform: translate(-2px, 0px) rotate(0.5deg); }
  30%  { transform: translate(2px, 1px) rotate(0deg); }
  40%  { transform: translate(1px, -1px) rotate(-0.5deg); }
  50%  { transform: translate(-1px, 1px) rotate(0.5deg); }
  60%  { transform: translate(1px, -2px) rotate(0deg); }
  70%  { transform: translate(-2px, 1px) rotate(0.5deg); }
  80%  { transform: translate(2px, -1px) rotate(-0.5deg); }
  90%  { transform: translate(-1px, 2px) rotate(0deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}

img.playnow-hover {
  transition: transform 0.1s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.9));
  animation: rocketShake 0.15s infinite;
}

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.hero-logo .title-text {
  font-size: 2em;
  font-weight: bold;
  color: white;
}

#bgStars {
  position: fixed;
  top: 100px;
  bottom: 80px;
  left: 0;
  right: 0;
  z-index: -10;
  pointer-events: none;
}

#meteorsBg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -5;
  pointer-events: none;
  display: block;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-content {
  background: #18192a;
  color: #fff;
  padding: 32px 24px 24px 24px;
  border-radius: 12px;
  width: 480px;
  max-width: 480px;
  height: auto;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  position: relative;
  margin: 0 auto;
}
@media (max-width: 600px) {
  .modal-content {
    width: 98vw;
    max-width: 98vw;
    padding: 16px 2vw 16px 2vw;
    border-radius: 8px;
  }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 2rem;
  color: #9f9fff;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
}
.modal-close:hover {
  color: #fff;
}

.modal-content a, .modal-template a {
  color: #9f9fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}
.modal-content a:hover, .modal-template a:hover {
  color: #fff;
  text-decoration: none;
}

.modal-template hr {
  border: none;
  border-top: 1px solid #9f9fff;
  margin: 16px 0;
  opacity: 0.5;
}
