html, body {
  overflow: hidden;
  background-color: #000;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Press Start 2P', monospace;
  color: white;
}

/* ---------- Canvas Setup ---------- */
#holder {
  width: 100%;
  height: 100%;
  position: relative;
}

canvas {
  width: 100vw;
  height: 100vh;
}

#effect {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ---------- Centered Container ---------- */
.container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw; /* 10% margin on each side */
  text-align: center;
  z-index: 10;
}

/* ---------- Buzz & Chat Wrapper ---------- */
.buzz-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0vw; /* space between image and chat bubble */
  flex-wrap: wrap;
}

/* ---------- Buzz Images ---------- */
.buzz {
  width: 40vw; /* 40% of screen width */
  height: auto;
  max-width: 40vh;
  object-fit: contain;
  image-rendering: pixelated;
  display: none;
}

/* ---------- Chat Bubble ---------- */
.chat-bubble {
  display: none;
  width: 30%; /* occupies 30% width */
  padding: 2vh 2vw;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  color: #000;
  font-size: 1vw;
  word-wrap: break-word;
  white-space: normal;
  line-height: 1.5;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  text-align: left;
}

/* ---------- Button ---------- */
.start-button {
  display: none;
  margin-top: 4vh;
  padding: 2.5vh 5vw;
  font-family: 'Press Start 2P', monospace;
  font-size: 1.5vw;
  background: rgba(255, 255, 255, 0.8); /* 80% opaque white */
  border: none;
  border-radius: 15px;
  color: #000;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.start-button:hover {
  background: rgba(255, 255, 255, 0.6); /* drop to 60% opacity */
  transform: scale(1.05);
}


/* ---------- Invite Section --------------- */
.invite-display {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 70vh;
  line-height: 2rem;
  opacity: 0;
  animation: fadeIn 1.5s ease-in forwards;
  padding: 0 5vw; /* adds breathing space on mobile */
}

.invite-display h2 {
  max-width: 70%;
  font-size: 1rem;
  margin-bottom: 10px;
}

.invite-display h3 {
  font-size: 0.9rem;
  margin-top: 10px;
}

.invite-display a {
  margin-top: 4%;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* RSVP Button */
.rsvp-btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: #fff;
  background: #3d0e94;
  border: 3px solid #fff;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 0 20px #7428ee52;
  transition: all 0.3s ease;
}

.rsvp-btn:hover {
  background: #5710ca4b;
  box-shadow: 0 0 30px #7700ff;
  transform: scale(1.05);
}

/* Location link */
.location-link {
  display: inline-flex;         /* keeps icon and text in a row */
  align-items: center;
  gap: 8px;                     /* space between icon and text */
  font-family: 'Press Start 2P', cursive;
  color: #00ffe0;
  text-decoration: none;
  font-size: 0.7rem;
  text-shadow: 0 0 10px #00ffe0;
  transition: all 0.3s ease;

  white-space: nowrap;          /* prevent text from wrapping below the icon */
}

.location-link svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 5px #00ffe0);
}

.location-link:hover {
  color: #80fffb;
  text-shadow: 0 0 15px #80fffb, 0 0 25px #00ffe0;
  transform: scale(1.05);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .location-link {
    font-size: 0.6rem;
    gap: 6px;
  }

  .location-link svg {
    width: 16px;
    height: 16px;
  }
}


/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .invite-display {
    height: auto;
    line-height: 1.4rem;
    padding: 10vh 5vw;
  }

  .invite-display h2 {
    max-width: 100%;
    font-size: 0.8rem;
  }

  .invite-display h3 {
    font-size: 0.4rem;
  }

  .rsvp-btn {
    padding: 10px 20px;
    font-size: 0.65rem;
  }

  .location-link {
    font-size: 0.65rem;
  }

  .location-link svg {
    width: 30px;
    height: 30px;
  }
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 768px) {
  .buzz-chat {
    flex-direction: column;
    gap: 2vh;
  }

  .buzz {
    width: 60vw;
    max-width: 60vh;
  }

  .chat-bubble {
    width: 80%;
    font-size: 2.8vw;
    padding: 2vh 4vw;
    text-align: center;
    margin-top: 0;
  }

  .start-button {
    font-size: 4vw;
    padding: 2vh 10vw;
    margin-top: 6vh;
    border-radius: 12px;
  }
}
