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

body {
  font-family: 'Poppins', sans-serif;
  color: #4a148c;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Fixed video background covering entire viewport */
.background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* Light overlay to soften the video */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: -1;
}

/* Home page layout */
.home-header {
  text-align: center;
  padding: 5rem 1rem 2rem;
}

.home-header h1 {
  font-size: 3rem;
  color: #880e4f;
  margin-bottom: 1rem;
}

.home-header p {
  font-size: 1.2rem;
  color: #6a1b9a;
  margin-bottom: 2rem;
}

.menu-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.menu-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: #d81b60;
  color: #ffffff;
  border-radius: 30px;
  font-weight: 600;
  transition: background 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.menu-btn:hover {
  background-color: #b71c50;
}

.apology-note {
  font-size: 0.8rem;
  color: #6a1b9a;
  margin-top: 1rem;
  text-align: center;
}

/* Common page header used on subpages */
.page-header {
  text-align: center;
  padding: 4rem 1rem 2rem;
}

.page-header h2 {
  font-size: 2.5rem;
  color: #880e4f;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #6a1b9a;
  margin-bottom: 2rem;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: #d81b60;
  text-decoration: none;
  font-weight: 600;
}

/* Game page */
/* Game container now has a green background so you can't see through to the video */
.game-container {
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  background-color: #C8E6C9; /* light green */
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

#flappyCanvas {
  width: 100%;
  height: 300px;
  background-color: #A5D6A7; /* green canvas background */
  border: 2px solid #f8bbd0;
  border-radius: 8px;
}

/* Note beneath the game */
.game-note {
  text-align: center;
  font-size: 0.9rem;
  color: #6a1b9a;
  margin-top: 1rem;
}

.flappy-ui {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.flappy-ui button {
  padding: 0.75rem 1.5rem;
  background-color: #d81b60;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flappy-ui button:hover {
  background-color: #b71c50;
}

/* Gallery page */
.gallery-container {
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.gallery-display {
  position: relative;
  width: 100%;
  overflow: hidden;
}

#galleryImage {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery-instruction {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #6a1b9a;
}

/* Letters page */
.letters {
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
}

.letter {
  margin-bottom: 1rem;
  border: 1px solid #f8bbd0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.letter-btn {
  width: 100%;
  background-color: #fce4ec;
  color: #880e4f;
  padding: 1rem;
  text-align: left;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.letter-btn:hover {
  background-color: #f8bbd0;
}

.letter-content {
  display: none;
  padding: 1rem;
  background-color: #fff7fb;
  color: #6a1b9a;
}

/* Surprise page */
.cake-container {
  width: 90%;
  max-width: 400px;
  margin: 2rem auto;
  text-align: center;
}

/* Cake: larger and more rounded shape */
/* Cake: even larger and more rounded */
.cake {
  position: relative;
  margin: 0 auto;
  width: 350px;
  height: 250px;
  background-color: #f8bbd0;
  border-radius: 30px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Cake layers */
/* Adjusted layers for the larger cake */
.cake-layer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 50px;
  border-radius: 20px 20px 0 0;
}
.cake-layer.layer1 {
  top: 0;
  width: 100%;
  background-color: #f48fb1;
}
.cake-layer.layer2 {
  top: 50px;
  width: 85%;
  background-color: #f06292;
}
.cake-layer.layer3 {
  top: 100px;
  width: 70%;
  background-color: #e91e63;
}

/* Candles */
/* Candles row */
.candles {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

/* Individual candle, larger */
.candle {
  width: 12px;
  height: 30px;
  background-color: #ffd54f;
  position: relative;
  border-radius: 3px;
}

/* Flame on top of candle, larger */
.flame {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 18px;
  background-color: #ff7043;
  border-radius: 50%;
  animation: flicker 1s infinite;
}

@keyframes flicker {
  0% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.6; transform: translateX(-50%) scale(0.9); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

.cake-text {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-weight: 600;
  color: #ffffff;
}

/* Small prompt inside the cake */
.tap-me {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8rem;
  color: #880e4f;
  font-style: italic;
  pointer-events: none;
}

.call-reminder {
  text-align: center;
  margin-top: 2rem;
  color: #6a1b9a;
}