/* ===== PÁGINA PRINCIPAL (INDEX) ===== */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  min-height: 100vh;
}

/* Sistema de páginas */
.page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s ease;
  z-index: 1;
}

.page.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

.container {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: relative;
}

.instruction {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 400;
  color: #495057;
  margin-bottom: 60px;
  opacity: 1;
  transition: all 0.5s ease;
  letter-spacing: 0.5px;
}

.flower {
  width: 400px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: none; /* Removemos transition para que no interfiera con animaciones */
  position: relative;
  outline: none; /* Quita el borde azul */
  -webkit-tap-highlight-color: transparent; /* Quita highlight en móviles */
}

.flower:focus {
  outline: none; /* Asegura que no hay outline al hacer focus */
}

.flower:active {
  transform: scale(0.98);
}

.petal {
  position: absolute;
  width: 50px;
  height: 80px;
  background: linear-gradient(180deg, #fce4ec, #f06292);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(240, 98, 146, 0.3);
}

.petal1 {
  transform: rotate(0deg) translateY(-50%);
  animation-delay: 0.1s;
}

.petal2 {
  transform: rotate(45deg) translateY(-50%);
  animation-delay: 0.2s;
}

.petal3 {
  transform: rotate(90deg) translateY(-50%);
  animation-delay: 0.3s;
}

.petal4 {
  transform: rotate(135deg) translateY(-50%);
  animation-delay: 0.4s;
}

.petal5 {
  transform: rotate(180deg) translateY(-50%);
  animation-delay: 0.5s;
}

.petal6 {
  transform: rotate(225deg) translateY(-50%);
  animation-delay: 0.6s;
}

.petal7 {
  transform: rotate(270deg) translateY(-50%);
  animation-delay: 0.7s;
}

.petal8 {
  transform: rotate(315deg) translateY(-50%);
  animation-delay: 0.8s;
}

.center {
  position: absolute;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #fff3e0, #ffcc80);
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(255, 204, 128, 0.4);
}

/* Professional Loading styles */
.loading {
  position: absolute;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: all 0.6s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading.show {
  opacity: 1;
}

.loading-text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #6c757d;
  letter-spacing: 1px;
}

.flower:hover .petal {
  animation-name: changeColor;
  animation-duration: 8s;
  animation-direction: reverse;
  animation-iteration-count: infinite;
}

.flower:hover {
  animation-name: rotateFlower;
  animation-duration: 8s;
  animation-iteration-count: infinite;
  animation-timing-function: ease;
}

@keyframes changeColor {
  0% {
    background: linear-gradient(180deg, #fcdbdf, #fd688d);
  }
  25% {
    background: linear-gradient(180deg, #fcd2e3, #fa6094);
  }
  50% {
    background: linear-gradient(180deg, #fabefc, #c34ec7);
  }
  75% {
    background: linear-gradient(180deg, #f7d6d6, #fd6a6a);
  }
  100% {
    background: linear-gradient(180deg, #fcd3fc, #e844f7);
  }
}

@keyframes rotateFlower {
  0% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.5) rotate(360deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

/* ===== PÁGINA DE MENSAJE ===== */

/* Estilos específicos para la página de mensaje */
.mensaje-container {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: relative;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  overflow-x: hidden;
}

.content {
  text-align: center;
  max-width: 800px;
  width: 100%;
  position: relative;
  animation: fadeInUp 1.2s ease-out;
}

.typing-text {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.4;
  color: #2c3e50;
  margin: 0;
  display: inline;
  letter-spacing: 0.5px;
}

.cursor {
  display: inline-block;
  background-color: #2c3e50;
  width: 3px;
  height: 50px;
  animation: blink 1.2s infinite;
  margin-left: 3px;
  vertical-align: baseline;
}

.back-btn {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: #495057;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s ease;
  opacity: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  font-family: 'Inter', sans-serif;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.back-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.2);
}

.back-btn:active {
  transform: translateX(-50%) translateY(0);
}

.back-btn:focus {
  outline: none;
}

/* Brillitos profesionales */
.sparkles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, #f8bbd9 0%, #f48fb1 50%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: sparkleFloat 4s linear infinite;
}

.sparkle:nth-child(2n) {
  width: 2px;
  height: 2px;
  background: radial-gradient(circle, #fce4ec 0%, #f06292 60%, transparent 80%);
  animation-duration: 5s;
}

.sparkle:nth-child(3n) {
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, #f8bbd9 0%, #e91e63 40%, transparent 70%);
  animation-duration: 3.5s;
}

@keyframes sparkleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) rotate(0deg) scale(0);
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) rotate(45deg) scale(1);
  }
  90% {
    opacity: 1;
    transform: translateY(10vh) rotate(315deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) rotate(360deg) scale(0);
  }
}

/* Animaciones generales */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* ===== PÁGINA TE AMO ===== */

.love-container {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 50%, #fce4ec 100%);
  position: relative;
}

.love-content {
  text-align: center;
  animation: fadeInScale 1.5s ease-out;
}

.love-text {
  font-family: 'Playfair Display', serif;
  font-size: 60px;
  font-weight: 600;
  color: #c2185b;
  margin-bottom: 40px;
  letter-spacing: 2px;
  display: inline;
}

.love-cursor {
  display: inline-block;
  background-color: #c2185b;
  width: 4px;
  height: 70px;
  animation: blink 1.2s infinite;
  margin-left: 5px;
  vertical-align: baseline;
}

.heart-svg {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  filter: drop-shadow(0 10px 20px rgba(194, 24, 91, 0.3));
}

.heart-path {
  fill: none;
  stroke: #e91e63;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawHeart 3s ease-in-out forwards;
}

@keyframes drawHeart {
  0% {
    stroke-dashoffset: 300;
    fill: transparent;
  }
  70% {
    stroke-dashoffset: 0;
    fill: transparent;
  }
  100% {
    stroke-dashoffset: 0;
    fill: #e91e63;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Responsive design for mobile */
@media screen and (max-width: 768px) {
  .instruction {
    font-size: 24px;
    margin-bottom: 50px;
  }
  
  .flower {
    width: 300px;
    height: 300px;
  }
  
  .petal {
    width: 40px;
    height: 65px;
  }
  
  .center {
    width: 32px;
    height: 32px;
  }
  
  .loading-text {
    font-size: 15px;
  }
  
  .typing-text {
    font-size: 32px;
    line-height: 1.3;
  }
  
  .cursor {
    height: 40px;
    width: 2px;
  }
  
  .mensaje-container {
    padding: 30px 15px;
  }
  
  .back-btn {
    bottom: 30px;
    padding: 10px 20px;
    font-size: 15px;
  }
  
  .love-text {
    font-size: 50px;
  }
  
  .love-cursor {
    height: 60px;
    width: 3px;
  }
  
  .heart-svg {
    width: 100px;
    height: 100px;
  }
}

@media screen and (max-width: 480px) {
  .instruction {
    font-size: 22px;
    margin-bottom: 40px;
  }
  
  .flower {
    width: 250px;
    height: 250px;
  }
  
  .petal {
    width: 35px;
    height: 55px;
  }
  
  .center {
    width: 28px;
    height: 28px;
  }
  
  .loading-text {
    font-size: 14px;
  }
  
  .typing-text {
    font-size: 26px;
    line-height: 1.25;
  }
  
  .cursor {
    height: 32px;
  }
  
  .mensaje-container {
    padding: 25px 12px;
  }
  
  .back-btn {
    bottom: 25px;
    padding: 8px 18px;
    font-size: 14px;
  }
  
  .love-text {
    font-size: 45px;
  }
  
  .love-cursor {
    height: 55px;
    width: 3px;
  }
  
  .heart-svg {
    width: 90px;
    height: 90px;
  }
}

@media screen and (max-width: 320px) {
  .instruction {
    font-size: 20px;
    margin-bottom: 35px;
  }
  
  .flower {
    width: 200px;
    height: 200px;
  }
  
  .petal {
    width: 30px;
    height: 50px;
  }
  
  .center {
    width: 25px;
    height: 25px;
  }
  
  .typing-text {
    font-size: 22px;
  }
  
  .cursor {
    height: 28px;
  }
  
  .content {
    max-width: 100%;
  }
  
  .love-text {
    font-size: 35px;
  }
  
  .love-cursor {
    height: 45px;
    width: 2px;
  }
  
  .heart-svg {
    width: 70px;
    height: 70px;
  }
}
/* Contenedor global para que se vea en todas las páginas */
.floating-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* ESTA LÍNEA ES LA CLAVE: */
    pointer-events: none; 
    /* ------------------------ */
    z-index: 9999;
    overflow: hidden;
}

.floating-emote {
    position: absolute;
    bottom: -50px;
    font-size: 24px;
    user-select: none;
    opacity: 0;
    animation: floatUp 5s linear forwards;
    text-shadow: 0 0 5px rgba(0,0,0,0.1); /* Para que resalte en el fondo blanco */
}

@keyframes floatUp {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-110vh) translateX(50px) rotate(360deg); opacity: 0; }
}