* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Edu NSW ACT Cursive', cursive;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: white;
  overflow-x: hidden;
}

.xv {
  text-align: center;
  font-size: 3rem;
  margin: 2rem 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  animation: fadeInDown 2s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Contenedor de la rosa */
.container {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%) scale(1);
  z-index: 10;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
  .container {
    transform: translate(-50%, -50%) scale(1.2);
    top: 50%;
  }
}

@media (max-width: 480px) {
  .container {
    transform: translate(-50%, -50%) scale(1.4);
    top: 52%;
  }
}

/* iPad Air 4 (820x1180) */
@media screen and (min-device-width: 820px) and (max-device-width: 820px) and (min-device-height: 1180px) and (max-device-height: 1180px) and (-webkit-device-pixel-ratio: 2) {
  .container {
    transform: translate(-50%, -50%) scale(0.75);
    top: 28%;
  }
  
  .countdown-wrapper {
    margin-top: 48% !important;
  }
}

/* iPad Pro 11" (834x1194) */
@media screen and (min-device-width: 834px) and (max-device-width: 834px) and (min-device-height: 1194px) and (max-device-height: 1194px) and (-webkit-device-pixel-ratio: 2) {
  .container {
    transform: translate(-50%, -50%) scale(0.75);
    top: 28%;
  }
  
  .countdown-wrapper {
    margin-top: 48% !important;
  }
}

/* Galaxy Tab S7 (800x1280) */
@media screen and (min-device-width: 800px) and (max-device-width: 800px) and (min-device-height: 1280px) and (max-device-height: 1280px) {
  .container {
    transform: translate(-50%, -50%) scale(0.7);
    top: 25%;
  }
  
  .countdown-wrapper {
    margin-top: 45% !important;
  }
}

/* Samsung Galaxy Z Fold (768x1024 cuando está abierto) */
@media screen and (min-device-width: 768px) and (max-device-width: 768px) and (min-device-height: 1024px) and (max-device-height: 1024px) {
  .container {
    transform: translate(-50%, -50%) scale(0.8);
    top: 30%;
  }
  
  .countdown-wrapper {
    margin-top: 52% !important;
  }
}

/* Fallback para otros tablets portrait */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .container {
    transform: translate(-50%, -50%) scale(0.75);
    top: 28%;
  }
  
  .countdown-wrapper {
    margin-top: 48% !important;
  }
}

/* Tablets landscape */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .container {
    transform: translate(-50%, -50%) scale(0.65);
    top: 35%;
  }
  
  .countdown-wrapper {
    margin-top: 40% !important;
  }
}

/* Estilos de la rosa */
.glass {
  height: 350px;
  width: 200px;
  background: #122139;
  border-radius: 300px 300px 0px 0px;
}

.glass:before {
  content: "";
  height: 10px;
  width: 10px;
  transform-origin: center;
  border: 10px solid #122139;
  border-radius: 100%;
  position: absolute;
  left: 87px;
  top: -25px;
}

.glass:after {
  content: "";
  position: absolute;
  height: 15px;
  width: 250px;
  background: #b36dff;
  top: 100%;
  left: -13%;
}

.shine {
  width: 12px;
  height: 140px;
  background: white;
  opacity: 0.2;
  position: absolute;
  left: 85%;
  top: 80px;
  border-radius: 100px;
  z-index: 10;
}

.shine:before {
  content: "";
  width: 12px;
  height: 20px;
  position: absolute;
  background: white;
  top: 160px;
  border-radius: 100px;
}

.petals > div {
  position: absolute;
  background: #a755ff;
  width: 45px;
  height: 80px;
  top: 55px;
  transition: all 0.5s ease-out;
}

.petals > div:nth-child(1) {
  border-radius: 15px;
  box-shadow: 0px 0px 30px #f594b8;
  left: 80px;
  top: 60px;
  background: #820dff;
}

.petals > div:nth-child(2),
.petals > div:nth-child(4),
.petals > div:nth-child(6) {
  background: #b36dff;
  left: 60px;
  border-radius: 0px 30px 0px 30px;
  transform-origin: bottom right;
}

.petals > div:nth-child(3),
.petals > div:nth-child(5),
.petals > div:nth-child(7) {
  background: #9736ff;
  left: 100px;
  border-radius: 30px 0px 30px 0px;
  transform-origin: bottom left;
}

.petals > div:nth-child(2) {
  z-index: 5;
  background: #9736ff;
  top: 75px;
  height: 70px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.5);
  animation: bloom2 3s ease-in-out;
  animation-fill-mode: forwards;
}

.petals > div:nth-child(3) {
  z-index: 4;
  background: #9736ff;
  top: 75px;
  height: 70px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.5);
  animation: bloom3 3s ease-in-out, glowing 2.5s ease-in-out infinite;
  animation-fill-mode: forwards;
}

.petals > div:nth-child(4) {
  z-index: 3;
  background: #8d23ff;
  top: 70px;
  height: 75px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.5);
  animation: bloom4 3s ease-in-out, glowing 2.5s ease-in-out infinite;
  animation-fill-mode: forwards;
}

.petals > div:nth-child(5) {
  z-index: 2;
  background: #8d23ff;
  top: 70px;
  height: 75px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.5);
  animation: bloom5 3s ease-in-out, glowing 2.5s ease-in-out infinite;
  animation-fill-mode: forwards;
}

.petals > div:nth-child(6) {
  z-index: 1;
  background: #8615ff;
  top: 65px;
  height: 70px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.3);
  animation: bloom6 3s ease-in-out, glowing 2.5s ease-in-out infinite;
  animation-fill-mode: forwards;
}

.petals > div:nth-child(7) {
  z-index: 0;
  background: #8615ff;
  top: 65px;
  height: 70px;
  box-shadow: 0px 0px 50px rgba(245, 148, 184, 0.3);
  animation: bloom7 3s ease-in-out, glowing 2.5s ease-in-out infinite;
  animation-fill-mode: forwards;
}

.deadPetals > div {
  position: absolute;
  background: #9736ff;
  width: 20px;
  height: 15px;
  top: 120px;
  border-radius: 0px 30px 0px 30px;
  box-shadow: 0px 0px 30px rgba(245, 148, 184, 0.5);
  transition: all 0.5s ease-out;
}

.deadPetals > div:nth-child(1) {
  left: 95px;
  transform: rotate(-30deg);
  animation: falling 20s 4s ease-in-out infinite;
}

.deadPetals > div:nth-child(2) {
  left: 62px;
  transform: rotate(-30deg);
  animation: falling 20s 8s ease-in-out infinite;
}

.deadPetals > div:nth-child(3) {
  left: 78px;
  transform: rotate(-30deg);
  animation: falling 20s 12s ease-in-out infinite;
}

.deadPetals > div:nth-child(4) {
  left: 100px;
  transform: rotate(-30deg);
  animation: falling 20s 16s ease-in-out infinite;
}

.leaves > div:nth-last-child(1) {
  position: absolute;
  width: 55px;
  height: 30px;
  background: #338f37;
  top: 120px;
  left: 75px;
  border-radius: 100px;
}

.leaves > div:nth-child(1) {
  position: absolute;
  width: 6px;
  height: 210px;
  background: #054c05;
  top: 95px;
  left: 100px;
  border-radius: 0 0 100px 100px;
}

.leaves > div:nth-child(2) {
  position: absolute;
  width: 30px;
  height: 50px;
  top: 53px;
  border-radius: 5px 40px 20px 40px;
  background: #054c05;
  transform-origin: bottom;
  transform: rotate(-30deg);
  top: 180px;
  left: 80px;
  box-shadow: inset 5px 5px #066406;
}

.leaves > div:nth-child(3) {
  position: absolute;
  width: 30px;
  height: 50px;
  top: 53px;
  border-radius: 40px 5px 40px 20px;
  background: #054c05;
  transform-origin: bottom;
  transform: rotate(30deg);
  top: 150px;
  left: 95px;
  box-shadow: inset -5px 5px #066406;
}

.thorns > div {
  position: absolute;
  width: 0;
  height: 0;
  top: 140px;
}

.thorns > div:nth-child(odd) {
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid #054c05;
  left: 105px;
}

.thorns > div:nth-child(even) {
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 5px solid #054c05;
  left: 95px;
}

.thorns > div:nth-child(1) {
  top: 200px;
}

.thorns > div:nth-child(2) {
  top: 170px;
}

.thorns > div:nth-child(4) {
  top: 230px;
}

.countdown-wrapper {
  text-align: center;
  margin: 4rem 0;
  padding: 2rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  max-width: 600px;
  margin: 4rem auto;
  margin-top: 30%;
}

.countdown-wrapper h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.timer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.time-box {
  background: rgba(255,255,255,0.2);
  padding: 1.5rem 1rem;
  border-radius: 15px;
  min-width: 80px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.3);
}

.time-box span {
  font-size: 2rem;
  font-weight: bold;
  display: block;
}

.time-box small {
  font-size: 0.8rem;
  opacity: 0.8;
}

.map-section {
  text-align: center;
  margin: 2rem 0;
}

.map-button, .map-button2 {
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Edu NSW ACT Cursive', cursive;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  margin: 1rem;
  margin-top: -5%;
}

.map-button:hover, .map-button2:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.map-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  opacity: 0;
  transition: all 0.5s ease;
}

.map-modal.show {
  display: flex;
  opacity: 1;
  justify-content: center;
  align-items: center;
}

.map-content {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  max-width: 90%;
  max-height: 90%;
  position: relative;
  transform: scale(0.7);
  transition: all 0.5s ease;
}

.map-modal.show .map-content {
  transform: scale(1);
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  color: #666;
  cursor: pointer;
}

/* Estilos para el modal de confirmación */
.confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

.confirm-modal.show {
  display: flex;
}

.confirm-content {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  max-width: 400px;
  width: 90%;
  color: #333;
  text-align: center;
}

.confirm-content h2 {
  margin-bottom: 1rem;
  color: #ff6b6b;
}

.form-group {
  margin: 1rem 0;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-family: 'Edu NSW ACT Cursive', cursive;
  font-size: 1rem;
}

.form-group input:focus, .form-group select:focus {
  border-color: #ff6b6b;
  outline: none;
}

.confirm-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-confirm, .btn-cancel {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Edu NSW ACT Cursive', cursive;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn-confirm {
  background: #ff6b6b;
  color: white;
}

.btn-cancel {
  background: #ddd;
  color: #333;
}

.btn-confirm:hover, .btn-cancel:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
  .xv {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  
  .timer {
    gap: 0.5rem;
  }
  
  .time-box {
    min-width: 60px;
    padding: 1rem 0.5rem;
  }
  
  .time-box span {
    font-size: 1.5rem;
  }
  
  .countdown-wrapper {
    margin-top: 50%;
    padding: 1.5rem;
  }

  .map-button, .map-button2 {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    margin-top: 1rem;
  }

  .map-content {
    padding: 1rem;
    max-width: 95%;
    max-height: 90%;
  }

  .confirm-content {
    padding: 1rem;
  }

  .confirm-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-confirm, .btn-cancel {
    width: 100%;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .xv {
    font-size: 1.5rem;
    padding: 0 1rem;
  }

  .countdown-wrapper {
    margin-top: 155%;
    padding: 1rem;
  }

  .countdown-wrapper h1 {
    font-size: 20px;
  }

  .time-box {
    min-width: 50px;
    padding: 0.8rem 0.5rem;
  }

  .time-box span {
    font-size: 1.2rem;
  }

  .time-box small {
    font-size: 0.7rem;
  }

  .map-button, .map-button2 {
    width: 90%;
    font-size: 1rem;
    padding: 0.8rem;
  }

  .map-content iframe {
    height: 300px;
  }
}