:root {
  --primary: #ff4d6d;
  --secondary: #ffd1dc;
  --background: #fff0f5;
  --text: #4a2c2a;
  --font-title: 'Great Vibes', cursive;
  --font-body: 'Poppins', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--text);
  overflow-x: hidden;
}


.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  text-align: center;
  padding-bottom: 120px;
  background: linear-gradient(rgba(0,0,0,.4), rgba(0,0,0,.6)), url('images/banner.png') center/cover no-repeat;
  color: white;
  position: relative;
}

.hero-text h1 {
  font-family: var(--font-title);
  font-size: 4rem;
  margin-bottom: .5rem;
}

.hero-text p {
  font-size: 1.2rem;
}

section {
  padding: 80px 20px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

h2 {
  font-family: var(--font-title);
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.gallery-item img {
  width: 100%;
  border-radius: 12px;
  transition: transform .3s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.message {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

.message-text {
  font-size: 1.3rem;
  line-height: 1.6;
  font-style: italic;
}

footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 20px;
}

#lock-screen {
  position: fixed;
  inset: 0;
  background: 
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
    url('images/foto_torta.jpeg') center/cover no-repeat;
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
}

#lock-screen h1 { 
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

#gift {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.5s ease;
  z-index: 10000; 
}

.gift-box {
  width: 160px;
  height: 120px;
  background: var(--primary);
  border-radius: 8px;
  z-index: 1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gift-lid {
  position: absolute;
  top: 35px;
  width: 180px;
  height: 40px;
  background: var(--secondary);
  border-radius: 8px 8px 0 0;
  z-index: 3;
  transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.gift-bow {
  position: absolute;
  width: 30px;
  height: 30px;
  background: gold;
  border-radius: 50%;
  top: 25px;
  z-index: 4;
}

.gift-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 100%;
  background: var(--secondary);
}

#gift.open .gift-lid {
  transform: translateY(-100px) rotate(20deg);
}

#gift.open .gift-bow {
  opacity: 0;
  transition: opacity 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

#gift.open .gift-box {
  animation: shake 0.5s;
}

#gift-message {
  position: absolute;
  top: 220px;
  font-size: 1.2rem;
  display: block;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

#gift.ready #gift-message {
    display: none;
}

@keyframes shake-denial {
  0% { transform: translateX(0) }
  25% { transform: translateX(-5px) }
  50% { transform: translateX(5px) }
  75% { transform: translateX(-5px) }
  100% { transform: translateX(0) }
}


#gift.denied-shake {
    animation: shake-denial 0.5s ease-in-out;
}


#web-content-emerge {

    position: fixed; 
    top: 50%;
    left: 50%;
    
    transform: translate(-50%, -50%) scale(0.01); 
    opacity: 0; 
    
    width: 100vw; 
    height: 100vh; 
    pointer-events: none; 
    z-index: 9998;
    

    transition: transform 1.5s ease-out, opacity 1s ease-out; 
    transform-origin: center; 
    

    display: none; 
    justify-content: center;
    align-items: center;
}

#web-content-emerge.emerge-active {
    transform: translate(-50%, -50%) scale(1); 
    opacity: 1; 
    pointer-events: auto; 
}

#main-content-wrapper {
    display: block !important; 
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

#balloon-area {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.balloon {
  position: absolute;
  width: 60px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--primary));
  cursor: pointer;
  animation: float 10s linear forwards;
  display: flex;
  align-items: center;
  justify-content: center;
}

.balloon::after {
  content: '';
  position: absolute;
  top: 80px;
  left: 50%;
  width: 2px;
  height: 50px;
  background: #aaa;
  transform: translateX(-50%);
}

.balloon-msg {
  position: absolute;
  top: -30px;
  background: rgba(255,255,255,0.9);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #c2185b;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .3s ease;
}

.balloon.popped .balloon-msg {
  opacity: 1; 
}

@keyframes float {
  0% { transform: translateY(100vh); opacity: 1; }
  100% { transform: translateY(-200px); opacity: 0; }
}

#fireworks {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}