/* Reset & Base Styles */
* {
  margin: 10px 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #181c24;
  color: #f3f3f3;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Prevent scroll on mobile */
}

/* Container Styles */
.container {
  width: 100%;
  max-width: 1000px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Cake Container */
#cake-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#cake-canvas {
  width: 800px;
  height: 600px;
  max-width: 100%;
  max-height: 90vh; /* Keep within viewport */
  object-fit: contain;
  transition: all 0.5s ease;
}

#cake-svg-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  z-index: 1;
}



/* Text Content Container - NEW */
.text-content {
  width: 100%;
  max-width: 500px;
  margin-top: -20px; /* Pull up slightly */
  padding: 0 20px;
  position: relative;
  z-index: 3;
}

/* Enhanced Text & Messages - MOVED BELOW CAKE */
/* Enhanced Text & Messages */
#birthday-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#congrats-message {
  font-size: 1.2rem;
  color: #ffe082;
  font-weight: 400;
  margin-top: 10px;
  text-align: center;
  line-height: 1.5;
  display: block;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
}

#celebrate-message {
  text-align: center;
  display: none;
  animation: popIn 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#celebrate-message h1 {
  font-size: 2.5rem;
  color: #ff4081;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
  margin-bottom: 5px;
}

#celebrate-message p {
  font-size: 1.4rem;
  color: #b39ddb;
  font-weight: 700;
}

.container h2 {
  color: #ffe082;
  margin: 10px 0 5px; /* Reduced margin */
  font-size: 1.5rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.container p {
  color: #b0bec5;
  font-size: 1.1rem;
  margin-bottom: 8px; /* Reduced margin */
}

/* Buttons */
.btn-main {
  background: linear-gradient(135deg, #ff4081 0%, #ff9100 100%);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 12px 35px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px; /* Reduced margin */
  box-shadow: 0 5px 15px rgba(255, 64, 129, 0.4);
  transition: all 0.3s ease;
  z-index: 10;
}

.btn-main:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 64, 129, 0.6);
}

.btn-secondary {
  background: linear-gradient(135deg, #4a00e0 0%, #8e2de2 100%);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 10px 30px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px; /* Reduced margin */
  box-shadow: 0 4px 12px rgba(74, 0, 224, 0.3);
  transition: all 0.3s ease;
  display: none;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 0, 224, 0.4);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes subtleGlow {
  0% { text-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 0 10px rgba(255,224,130,0.3); }
  100% { text-shadow: 0 2px 6px rgba(0,0,0,0.4), 0 0 15px rgba(255,224,130,0.5); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Enhanced Greeting Card - POSITION ADJUSTED */
/* Greeting Card Overlay */
.greeting-card {
  position: absolute;
  top: 10%;
  width: 100%;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none; /* Let clicks pass through to canvas if needed, but buttons need pointer-events */
}

.greeting-card > div {
  pointer-events: auto; /* Enable clicks on buttons/text */
}

.greeting-card.show {
  opacity: 1;
}

/* Big Wish Input */
#wish-input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #ff4081;
  color: #fff;
  padding: 15px 25px;
  font-size: 1.3rem;
  border-radius: 50px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#wish-input:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 25px rgba(255, 64, 129, 0.3);
  transform: scale(1.02);
}

#wish-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.wish-container {
  position: absolute;
  bottom: 15%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 30;
  transition: opacity 0.5s ease;
}

/* Responsive Adjustments */
/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #2a2a2a;
  padding: 40px;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #444;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

#modal-wish-input {
  width: 100%;
  padding: 15px;
  border-radius: 10px;
  border: 2px solid #ff4081;
  background: #333;
  color: #fff;
  font-size: 1.1rem;
  resize: none;
  font-family: inherit;
  outline: none;
}

#modal-wish-input:focus {
  background: #3a3a3a;
  box-shadow: 0 0 15px rgba(255, 64, 129, 0.3);
}

/* Entry Screen Transition */
#entry-screen {
  transition: opacity 0.8s ease-out;
}

/* Animations update */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #cake-canvas {
    width: 100%;
    margin-top: 100px;
  }
  
  #celebrate-message h1 {
    font-size: 1.8rem;
  }
  
  .wish-container {
    bottom: 20%;
  }
  
  .modal-content {
    padding: 25px;
  }
}

/* Footer Signature */
.site-footer {
  position: fixed;
  bottom: 5px;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8rem;
  z-index: 2000;
  pointer-events: none;
  font-family: monospace;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  pointer-events: auto;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: #ff4081;
}
