body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', 'Open Sans', sans-serif;
  background: linear-gradient(-45deg, #FCCFEE, #FFF5F8, #F9A8D4, #FCCFEE);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

main {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

header {
  z-index: 1;
  transform-style: preserve-3d;
  padding: 10px;
}

header>h1 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  text-align: center;
  color: #4A2333;
  font-weight: 700;
  margin-top: 15px;
  margin-bottom: 0;
  transform: translateZ(40px);
  text-shadow: 1px 1px 5px rgba(255, 255, 255, 0.7);
}

.subtitle {
  font-family: 'Segoe UI', 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #4A2333;
  text-align: center;
  margin: 5px auto 0 auto; /* Centrado absoluto horizontal */
  transform: translateZ(40px);
  min-height: 20px;
  display: block; /* Cambiamos a block + fit-content para centrado real */
  width: fit-content;
}

.typewriter {
  border-right: 2px solid transparent;
  padding-right: 4px;
  animation: blink-caret 0.8s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #4A2333; }
}

.img {
  transform: translateZ(30px);
  width: 180px;
  height: 180px;
  margin: 10px auto 0;
  background-color: #F4BBE1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 20px rgba(249, 168, 212, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible; /* Asegura que no se corte nada */
}

#center {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 10px;
}

img {
  display: block;
  width: 70%;  /* El logo ocupa solo el 70% del círculo */
  height: 70%;
  object-fit: contain;
}

.btn {
  width: 85%;
  height: 50px;
  max-width: 350px;
  margin-top: 15px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(252, 207, 238, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: background-color 0.4s ease-in, transform 0.1s ease-out, box-shadow 0.4s ease;
}

.btn:nth-child(1) { animation-delay: 1.1s; }
.btn:nth-child(2) { animation-delay: 1.25s; }
.btn:nth-child(3) { animation-delay: 1.4s; }
.btn:nth-child(4) { animation-delay: 1.55s; }
.btn:nth-child(5) { animation-delay: 1.7s; }
.btn:nth-child(6) { animation-delay: 1.85s; }
.btn:nth-child(7) { animation-delay: 2.0s; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) {
  .btn:hover {
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(252, 207, 238, 0.8);
  }
}

.btn:active {
  transform: scale(0.95);
  background-color: rgba(255, 255, 255, 0.9);
}

.btn>a {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  color: #4A2333;
  font-family: 'Segoe UI', 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.5px;
}

svg {
  margin-right: 12px;
}

/* PWA Instruction Overlay */
#install-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#install-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.install-card {
  background: white;
  width: 85%;
  max-width: 400px;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  text-align: center;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

#install-overlay.active .install-card {
  transform: translateY(0);
}

.install-card h2 {
  font-family: 'Playfair Display', serif;
  color: #4A2333;
  margin-top: 0;
  margin-bottom: 15px;
}

.install-card p {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 20px;
  text-align: left;
}

.install-card .icon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  background: #f8f8f8;
  padding: 10px;
  border-radius: 10px;
}

.close-overlay {
  background: #f372c8;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
