html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

body {
  font-family: "Times New Roman", Times, serif;
  overflow-x: hidden;
  /* background-color: black; */
  background: radial-gradient(circle at center, #c99393 0%, #000000 100%);
  cursor: pointer;
  min-height: 100vh;
  position: relative;
}

.birthday-header {
  text-align: center;
  margin: 40px 0;
}

.birthday-header h1 {
  text-shadow: 0 0 10px #ff69b4, 0 0 20px #ff1493;
}

.birthday-line {
  border: none;
  /* border-top: 4px solid rgb(139, 95, 95); */
  width: 60%;
  margin: 20px auto;
  opacity: 0.6;
}

.main-img {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  margin-top: 30px;
  padding: 0 10px;
}

.my-img {
  max-width: calc(100% - 20px);
  width: 500px;
  height: auto;
  z-index: 21;
  position: relative;
}

@media (max-width: 768px) {
  .my-img {
    width: 90%; /* Shrinks image to 90% of container */
  }
}

/* Mobile (widths less than 480px) */
@media (max-width: 480px) {
  .my-img {
    width: 100%; /* Full width of container */
  }

  .main-img {
    margin-top: 20px; /* Reduced from 30px */
  }
}

.photo-booth {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  margin-top: 20px;
  position: relative;
  will-change: auto;
}

.cake,
.lays,
.stars {
  width: 100%;
  max-width: 400px;
  height: 500px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cake:hover,
.lays:hover,
.stars:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

section {
  position: static;
  width: 100%;
  z-index: 1;
}

.top {
  width: 100%;
  z-index: 100;
}

.middle {
  z-index: 100;
}

h1 {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 100;
  font-size: 40px;
  color: whitesmoke;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.3),
    0 0 40px rgba(255, 182, 193, 0.2);
  margin: 20px 0;
  text-align: center;
  position: relative;
  padding: 20px 15px;
  animation: gentle-glow 3s ease-in-out infinite alternate;
}

h2 {
  font-weight: 100;
  font-style: italic;
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  color: rgb(255, 255, 255);
  position: relative;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.4);
  padding: 15px 20px;
  margin: 15px auto;
  max-width: 1200px;
}

h3 {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
  margin: 15px auto;
  padding: 10px 20px;
  max-width: 1200px;
}

.dotted {
  width: 40%;
  position: static;
  border: none;
  height: 4px;
  background: linear-gradient(
    to right,
    rgba(255, 182, 193, 0.8),
    rgba(173, 216, 230, 0.8),
    rgba(255, 182, 193, 0.8)
  );
  margin: 20px auto;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(255, 182, 193, 0.3);
  animation: pulse-line 2s ease-in-out infinite;
}

p {
  font-weight: 200;
  font-style: italic;
  color: rgb(227, 255, 254);
  padding: 15px 25px;
  margin: 15px auto;
  max-width: 1200px;
  line-height: 1.6;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4), 0 0 10px rgba(227, 255, 254, 0.3);
  position: relative;
  text-align: center;
}

p::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(227, 255, 254, 0.5),
    transparent
  );
  opacity: 0.6;
}

/* Special paragraph variants */
.para {
  text-align: center;
  position: static;
  padding: 20px;
  border-radius: 20px;
  margin: 20px auto;
}

.quote-text {
  font-size: 18px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.95);
  border-left: 3px solid rgba(255, 215, 0, 0.6);
  padding-left: 20px;
  margin: 20px auto;
  position: relative;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.05), transparent);
}

.highlight-text {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 300;
  text-shadow: none;
  animation: gradient-shift 3s ease-in-out infinite;
}

/* Birthday Elements - Balloons and Confetti */
.floating-element {
  position: fixed;
  z-index: 10;
  animation: fall linear infinite;
  pointer-events: none;
}

/* Balloon styles */
.balloon-element {
  width: 40px;
  height: 50px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0.9;
  transition: transform 0.3s ease;
}

.balloon-element::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 100px;
  left: 50%;
  bottom: -100px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom,
    #999,
    #999 2px,
    #ccc 2px,
    #ccc 4px
  );
  background-size: 100% 10px;
  animation: wave 2s infinite ease-in-out;
}

.balloon-element::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 8px;
  background: linear-gradient(145deg, #8b4513, #d2691e);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  left: 50%;
  bottom: -108px;
  transform: translateX(-50%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Confetti styles */
.confetti-element {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transition: transform 0.3s ease;
}

/* Click confetti styles */
.click-confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 1000;
}

/* Static span elements for initial balloons/confetti */
span {
  position: fixed;
  z-index: 10;
  animation: fall linear infinite;
  pointer-events: none;
}

/* Balloon styles for odd spans */
span:nth-child(odd) {
  width: 40px;
  height: 50px;
  background: linear-gradient(145deg, #ff6b6b, #ee5a52);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0.9;
}

span:nth-child(odd)::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 100px;
  left: 50%;
  bottom: -100px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom,
    #999,
    #999 2px,
    #ccc 2px,
    #ccc 4px
  );
  background-size: 100% 10px;
  animation: wave 2s infinite ease-in-out;
}

span:nth-child(odd)::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 8px;
  background: linear-gradient(145deg, #8b4513, #d2691e);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  left: 50%;
  bottom: -108px;
  transform: translateX(-50%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Confetti styles for even spans */
span:nth-child(even) {
  width: 8px;
  height: 8px;
  background: #ffe066;
  border-radius: 2px;
}

span:nth-child(2) {
  background: #4ecdc4;
}
span:nth-child(4) {
  background: #6bcf7f;
}
span:nth-child(6) {
  background: #a8edea;
}
span:nth-child(8) {
  background: #ff9a56;
}
span:nth-child(10) {
  background: #ff8a80;
}

/* Different balloon colors for odd spans */
span:nth-child(3) {
  background: linear-gradient(145deg, #4ecdc4, #44a08d);
}
span:nth-child(5) {
  background: linear-gradient(145deg, #ffe066, #ffd93d);
}
span:nth-child(7) {
  background: linear-gradient(145deg, #6bcf7f, #4bc857);
}
span:nth-child(9) {
  background: linear-gradient(145deg, #a8edea, #fed6e3);
}

/* Positioning for static spans */
span:nth-child(1) {
  top: -50px;
  left: 5%;
  animation-delay: 0s;
  animation-duration: 8s;
}
span:nth-child(2) {
  top: -50px;
  left: 15%;
  animation-delay: 0.2s;
  animation-duration: 6s;
}
span:nth-child(3) {
  top: -50px;
  left: 25%;
  animation-delay: 0.4s;
  animation-duration: 7s;
}
span:nth-child(4) {
  top: -50px;
  left: 35%;
  animation-delay: 0.6s;
  animation-duration: 5s;
}
span:nth-child(5) {
  top: -50px;
  left: 45%;
  animation-delay: 0.8s;
  animation-duration: 9s;
}
span:nth-child(6) {
  top: -50px;
  left: 55%;
  animation-delay: 1s;
  animation-duration: 7s;
}
span:nth-child(7) {
  top: -50px;
  left: 65%;
  animation-delay: 1.2s;
  animation-duration: 6s;
}
span:nth-child(8) {
  top: -50px;
  left: 75%;
  animation-delay: 1.4s;
  animation-duration: 8s;
}
span:nth-child(9) {
  top: -50px;
  left: 85%;
  animation-delay: 1.6s;
  animation-duration: 5s;
}
span:nth-child(10) {
  top: -50px;
  left: 95%;
  animation-delay: 1.8s;
  animation-duration: 7s;
}

/* Enhanced Animations */
@keyframes gentle-glow {
  0% {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5),
      0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 182, 193, 0.2);
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.2);
  }
  100% {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5),
      0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 182, 193, 0.4);
    box-shadow: 0 8px 25px rgba(255, 182, 193, 0.3);
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes pulse-line {
  0%,
  100% {
    opacity: 0.8;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.2);
  }
}

@keyframes fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(calc(100vh + 200px)) rotate(360deg);
    opacity: 0;
  }
}

@keyframes wave {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }
  50% {
    transform: translateX(-50%) rotate(3deg);
  }
  100% {
    transform: translateX(-50%) rotate(-3deg);
  }
}

@keyframes confetti-burst {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--end-x, 0px), var(--end-y, 200px))
      rotate(var(--rotation, 360deg)) scale(0.1);
    opacity: 0;
  }
}

/* Hover effects */
.balloon-element:hover,
.confetti-element:hover,
span:hover {
  transform: scale(1.1);
  cursor: pointer;
  transition: transform 0.2s ease;
}

/* Birthday Elements - Dynamic classes */
.floating-element {
  position: absolute;
  z-index: 50;
  animation: fall linear infinite;
}

.balloon-element {
  width: 40px;
  height: 50px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0.9;
  transition: transform 0.3s ease;
}

.balloon-element::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 100px;
  left: 50%;
  bottom: -100px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom,
    #999,
    #999 2px,
    #ccc 2px,
    #ccc 4px
  );
  background-size: 100% 10px;
  animation: wave 2s infinite ease-in-out;
}

.balloon-element::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 8px;
  background: linear-gradient(145deg, #8b4513, #d2691e);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  left: 50%;
  bottom: -108px;
  transform: translateX(-50%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.confetti-element {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transition: transform 0.3s ease;
}

.click-confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 1000;
}

::placeholder {
  color: #000000;
  text-align: center;
}

button {
  position: absolute;
  background-color: rgb(0, 0, 0);
  border: 3px solid rgb(90, 191, 191);
  border-radius: 50%;
  right: 0px;
  width: 40px;
  height: 40px;
  left: 120px;
  top: 0px;
  cursor: pointer;
}

button:hover {
  border-color: #f1ff5c;
  box-shadow: 0 0.5em 0.5em -0.4em #f1ff5c;
}

.glyphicon {
  color: rgb(90, 191, 191);
  font-size: 20px;
}

@keyframes bounce {
  0%,
  20%,
  60%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  80% {
    transform: translateY(-10px);
  }
}

/* Birthday message styling */
.birthday-message {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin: 20px auto;
  max-width: 600px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.click-instruction {
  font-size: 1rem;
  margin-top: 20px;
  opacity: 0.8;
  animation: pulse 2s infinite;
}

/* Media Queries for Responsive Design */
@media screen and (min-width: 100px) and (max-width: 390px) and (orientation: portrait) {
  .birthday-header {
    margin: 20px 0;
  }

  .main-img {
    margin-top: 20px;
  }

  p {
    font-size: 15px;
    padding: 15px 20px;
    margin: 15px auto;
    text-align: center;
    max-width: 100%;
  }

  h1,
  h2,
  h3 {
    padding: 15px 20px;
    margin: 15px auto;
    text-align: center;
    max-width: 90%;
  }
}

@media screen and (min-width: 390px) and (max-width: 750px) and (orientation: portrait) {
  .birthday-header {
    margin: 30px 0;
  }

  .main-img {
    margin-top: 25px;
  }

  p {
    font-size: 15px;
    padding: 15px 20px;
    margin: 15px auto;
    text-align: center;
    max-width: 100%;

  h1,
  h2,
  h3 {
    padding: 15px 20px;
    margin: 15px auto;
    text-align: center;
    max-width: 90%;
  }
}

@media screen and (min-width: 751px) and (max-width: 800px) and (orientation: portrait) {
  h1 {
    font-size: 50px;
  }

  p {
    font-size: 30px;
  }
}

@media screen and (min-width: 1000px) and (max-width: 1190px) and (orientation: portrait) {
  h1 {
    font-size: 50px;
  }

  p {
    font-weight: 200;
    font-style: italic;
    font-size: 35px;
    color: rgb(227, 255, 254);
    padding: 20px;
    margin: 20px auto;
    text-align: center;
     max-width: 100%;
}

@media screen and (min-width: 350px) and (max-width: 640px) and (orientation: landscape) {
  p {
    font-size: 10px;
    text-align: center;
    padding: 10px 15px;
    margin: 10px auto;
    max-width: 100%;
  }

  body {
    overflow-x: hidden;
  }
}

@media screen and (min-width: 1401px) and (max-width: 2048px) and (orientation: landscape) {
  h1 {
    font-size: 40px;
  }
}

/* Photo booth responsive styles */
@media screen and (min-width: 100px) and (max-width: 390px) and (orientation: portrait) {
  .photo-booth {
    flex-direction: column;
    gap: 15px;
    padding: 10px;
    margin-top: 10px;
  }

  .cake,
  .lays,
  .stars {
    width: 100%;
    max-width: 280px;
    height: 350px;
    margin: 0 auto;
  }
}

@media screen and (min-width: 390px) and (max-width: 750px) and (orientation: portrait) {
  .photo-booth {
    flex-direction: column;
    gap: 18px;
    padding: 15px;
    margin-top: 15px;
  }

  .cake,
  .lays,
  .stars {
    width: 100%;
    max-width: 350px;
    height: 400px;
    margin: 0 auto;
  }
}

@media screen and (min-width: 751px) and (max-width: 800px) and (orientation: portrait) {
  .photo-booth {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    margin-top: 20px;
  }

  .cake,
  .lays,
  .stars {
    width: 100%;
    max-width: 400px;
    height: 450px;
    margin: 0 auto;
  }
}

@media screen and (min-width: 801px) and (max-width: 1024px) {
  .photo-booth {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    margin-top: 20px;
    justify-content: space-around;
  }

  .cake,
  .lays,
  .stars {
    width: 45%;
    max-width: 300px;
    height: 400px;
  }
}

@media screen and (min-width: 1000px) and (max-width: 1190px) and (orientation: portrait) {
  .photo-booth {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 25px;
    padding: 30px;
    margin-top: 25px;
    justify-content: center;
  }

  .cake,
  .lays,
  .stars {
    width: 30%;
    max-width: 350px;
    height: 450px;
    min-width: 280px;
  }
}

/* Landscape Tablets and Small Laptops */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .photo-booth {
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    margin-top: 20px;
    justify-content: center;
  }

  .cake,
  .lays,
  .stars {
    width: 30%;
    max-width: 280px;
    height: 350px;
    min-width: 200px;
  }
}

/* Phone Landscape */
@media screen and (min-width: 350px) and (max-width: 640px) and (orientation: landscape) {
  .photo-booth {
    flex-direction: row;
    gap: 10px;
    padding: 10px;
    margin-top: 10px;
    justify-content: center;
    align-items: center;
  }

  .cake,
  .lays,
  .stars {
    width: 30%;
    max-width: 180px;
    height: 220px;
    min-width: 150px;
  }
}

/* Large Screens and Desktops */
@media screen and (min-width: 1025px) and (max-width: 1400px) {
  .photo-booth {
    flex-direction: row;
    gap: 25px;
    padding: 30px;
    margin-top: 25px;
    justify-content: center;
  }

  .cake,
  .lays,
  .stars {
    width: 30%;
    max-width: 380px;
    height: 480px;
    min-width: 300px;
  }
}

@media screen and (min-width: 1401px) and (max-width: 2048px) and (orientation: landscape) {
  .photo-booth {
    flex-direction: row;
    gap: 30px;
    padding: 40px;
    margin-top: 30px;
    justify-content: center;
  }

  .cake,
  .lays,
  .stars {
    width: 28%;
    max-width: 400px;
    height: 500px;
    min-width: 320px;
  }
}

/* Ultra-wide screens */
@media screen and (min-width: 2049px) {
  .photo-booth {
    flex-direction: row;
    gap: 40px;
    padding: 50px;
    margin-top: 40px;
    justify-content: center;
  }

  .cake,
  .lays,
  .stars {
    width: 25%;
    max-width: 450px;
    height: 550px;
    min-width: 350px;
  }
}

