/* =========================================
   [1] CONFIGURACIÓN Y VARIABLES
   ========================================= */
:root {
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --ease-kawaii: cubic-bezier(.34, 1.56, .64, 1);

  /* Tu paleta original */
  --pink-bg: #f27ca5;
  --pink-soft: #f8b6cb;
  --pink-dark: #e55c8a;
  --white: #ffffff;
  --text: #6d2f44;
}

* {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  margin: 0;
  background: var(--pink-bg);
  /* PATRÓN PIXEL 90s */
  background-image: radial-gradient(var(--pink-soft) 20%, transparent 20%),
                    radial-gradient(var(--pink-soft) 20%, transparent 20%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  
  /* RESPONSIVE ADD: Evita scroll horizontal indeseado en móviles */
  overflow-x: hidden;
  width: 100%;
}

/* Fuentes Pixeladas */
h1, h2, .nav a, .phone, .btn, .btn-horario, .tagline {
  font-family: 'Silkscreen', cursive;
  text-transform: uppercase;
  /* RESPONSIVE ADD: Evita que palabras largas rompan el diseño en pantallas pequeñas */
  overflow-wrap: break-word; 
}

/* =========================================
   [2] ESTRUCTURA PRINCIPAL (PÁGINA)
   ========================================= */
.page {
  /* RESPONSIVE FIX: Ancho fluido con tope máximo */
  width: 92%; 
  max-width: 1200px;
  
  margin: 30px auto;
  background: var(--white);
  padding: 25px;
  
  /* Estilo Ventana 90s */
  border-radius: 40px; 
  border: 4px double var(--pink-dark);
  box-shadow: 12px 12px 0px rgba(0,0,0,0.1);
}

/* Grilla principal de contenido */
.content {
  display: grid;
  /* La definición original se mantiene para Desktop */
  grid-template-columns: 1.2fr .8fr 1fr;
  gap: 30px;
}

/* =========================================
   [3] HEADER Y NAVEGACIÓN
   ========================================= */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* RESPONSIVE ADD: Permite que los elementos bajen si no caben */
  flex-wrap: wrap; 
  gap: 15px; /* Espacio si se apilan */
}

.logo {
  background: var(--pink-soft);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0; /* Evita que el logo se aplaste */
}

.nav {
  background: var(--white);
  border-radius: 30px;
  padding: 6px;
  border: 1px solid var(--pink-soft);
  
  /* RESPONSIVE ADD: Para que los botones se acomoden en móviles */
  display: flex;
  flex-wrap: wrap; 
  justify-content: center;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap; /* Mantiene el texto en una línea */
}

.nav a.active {
  background: var(--pink-dark);
  color: white;
}

.phone {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  text-align: right; /* Alineación original */
}

.phone span {
  font-size: 11px;
  opacity: .6;
  font-family: 'Poppins', sans-serif;
}

/* =========================================
   [4] SECCIÓN HERO (BANNER Y CHAT)
   ========================================= */
.hero-chat {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 25px;
  align-items: center;
  margin: 25px 0;
}

.hero-image {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  border: 3px solid var(--pink-dark);
}

.hero-image img {
  width: 100%;
  height: auto; /* Mantiene proporción */
  display: block;
}

.hero-text {
  position: absolute;
  bottom: 30px;
  left: 35px;
  right: 20px; /* Asegura margen derecho en móvil */
  color: white;
  text-shadow: 4px 4px 0px var(--pink-dark);
  z-index: 2; /* Asegura que esté sobre la imagen */
}

.hero-text h1 {
  /* RESPONSIVE FIX: Clamp ajusta el tamaño entre un mínimo y un máximo automáticamente */
  font-size: clamp(28px, 5vw, 60px); 
  margin: 0;
  letter-spacing: 3px;
  line-height: 1.1;
}

.tagline {
  font-size: clamp(12px, 3vw, 14px);
  opacity: .9;
}

.chat-box {
  background: var(--pink-soft);
  border-radius: 25px;
  padding: 12px;
  box-shadow: 6px 6px 0px rgba(229,92,138,.25);
  border: 2px solid var(--pink-dark);
  height: 100%; /* Ocupa altura disponible */
  min-height: 300px; /* Altura mínima segura */
}

.chat-box iframe {
  width: 100%;
  height: 10%; /* Se adapta al contenedor */
  min-height: 200px;
  border-radius: 18px;
  border: none;
}

/* =========================================
   [5] SECCIONES INDIVIDUALES (KITCHEN/SPECIALTY)
   ========================================= */
.kitchen h2, .specialty h2, .news h2 {
  color: var(--pink-dark);
  letter-spacing: 2px;
}

.kitchen img {
  /* RESPONSIVE FIX: Cambiado width fijo por max-width */
  width: 45%; 
  max-width: 100%; /* Antes era 40%, en móvil debe ser grande */
  border-radius: 20px;
  margin: 15px 0;
  border: 3px solid var(--pink-soft);
}

/* Recuperamos el estilo de escritorio con media query abajo */

.specialty {
  background: var(--pink-soft);
  border-radius: 30px;
  padding: 25px;
  text-align: center;
  border: 2px solid var(--pink-dark);
}

.drink-preview img {
  width: 100%;
  border-radius: 20px;
  margin: 15px 0;
}

/* =========================================
   [6] CHISMECITOS (NEWS SECTION)
   ========================================= */
.news {
  max-height: 580px;
  overflow-y: auto;
  padding-right: 8px;
}

.news-item {
  background: var(--white);
  border: 3px outset var(--pink-soft); 
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .35s var(--ease-kawaii), box-shadow .35s ease;
}

.news-item:hover {
  background: rgba(248,182,203, 0.1);
  transform: scale(1.03);
  box-shadow: 6px 6px 0px var(--pink-soft);
}

.news-item time {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--pink-dark);
  font-weight: bold;
}

/* =========================================
   [7] BOTONES (GENERAL Y HORARIO)
   ========================================= */
.btn {
  display: inline-block;
  background: var(--pink-dark);
  color: white;
  padding: 10px 22px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 12px;
  border: 2px solid var(--white);
  box-shadow: 4px 4px 0px var(--text);
}

.btn-horario {
  display: inline-block;
  margin-top: 15px;
  padding: 18px 30px;
  position: relative;
  background: var(--pink-dark);
  color: white;
  font-size: 16px;
  text-decoration: none;
  
  /* Efecto 3D */
  border-top: 4px solid #ff9eb5;
  border-left: 4px solid #ff9eb5;
  border-right: 4px solid #9c3a5a;
  border-bottom: 4px solid #9c3a5a;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.2);
  transition: 0.1s;
  
  /* RESPONSIVE: Ancho completo en móviles para mejor touch */
  width: 100%; 
  text-align: center;
  max-width: 350px; /* Tope para que no sea gigante en PC */
}

.btn-horario:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0px var(--text);
}

.btn-horario:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px;
}

.btn-horario::after {
  content: "NEW!";
  position: absolute;
  top: -15px;
  right: -10px;
  background: #fff;
  color: var(--pink-dark);
  font-size: 10px;
  padding: 4px 10px;
  border: 2px solid var(--pink-dark);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
  animation: pixelBounce 0.8s infinite alternate steps(2);
}

/* =========================================
   [8] ANIMACIONES
   ========================================= */
@keyframes pixelBounce { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@keyframes heroZoom { from { transform: scale(1.05); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes jelly { 0% { transform: scale(1); } 30% { transform: scale(1.1,.9); } 50% { transform: scale(.95,1.05); } 100% { transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 rgba(229,92,138,.4); } 50% { box-shadow: 0 0 25px rgba(229,92,138,.6); } }

.hero img { animation: heroZoom 1.6s ease-out; }
.nav a:hover { animation: jelly .5s; }
.kitchen img, .news article, .specialty { animation: float 6s ease-in-out infinite; }
.btn { animation: glow 3s ease-in-out infinite; }

/* =========================================
   [9] MEDIA QUERIES (AQUÍ ESTÁ LA MAGIA RESPONSIVE)
   Estas reglas modifican la estructura según el tamaño de pantalla
   ========================================= */

/* TABLETS Y MÓVILES (Menos de 1024px) */
@media (max-width: 1024px) {
  .content {
    grid-template-columns: 1fr 1fr; /* Cambia a 2 columnas */
  }
  .news {
    grid-column: span 2; /* La sección de noticias ocupa todo el ancho abajo */
    max-height: 300px;
  }
}

/* MÓVILES (Menos de 768px) */
@media (max-width: 768px) {
  /* La página ocupa casi todo el ancho */
  .page {
    width: 96%;
    padding: 15px;
    margin: 15px auto;
  }
  
  /* Stack Vertical: Todo en una sola columna */
  .content {
    grid-template-columns: 1fr; 
    gap: 40px;
  }
  
  .news {
    grid-column: span 1; /* Vuelve a 1 columna */
  }

  /* Header Vertical */
  .header {
    flex-direction: column;
    text-align: center;
  }

  .phone {
    text-align: center;
    margin-top: 10px;
  }

  /* Hero Vertical */
  .hero-chat {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-text {
    left: 20px;
    bottom: 20px;
  }

  /* Ajustes imágenes */
  .kitchen img {
    width: 80%; /* Imagen grande en móvil */
    max-width: 300px;
  }
  
  /* El chat se hace más alto para ser usable con el dedo */
  .chat-box iframe {
    height: 400px;
  }
}




.pixel-marquee {
    background: var(--pink-dark);
    color: white;
    font-family: 'Silkscreen', cursive;
    padding: 5px 0;
    border-bottom: 2px solid var(--text);
    font-size: 12px;
}


/* =========================================
   [BOTÓN FLOTANTE ANIMADO]
   ========================================= */

/* 1. Definimos las Animaciones Keyframes */

/* Animación A: Un meneo rápido tipo gelatina/vibración */
@keyframes pixel-jiggle {
  0%   { transform: rotate(0deg) scale(1); }
  25%  { transform: rotate(3deg) scale(1.02); }
  50%  { transform: rotate(0deg) scale(1); }
  75%  { transform: rotate(-3deg) scale(1.02); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Animación B: Pulso de color en el borde y sombra */
@keyframes neon-attention {
  0%, 100% {
    border-color: var(--white);
    box-shadow: 4px 4px 0px var(--text);
    background: var(--pink-dark);
  }
  50% {
    border-color: var(--pink-soft);
    /* Sombra doble para efecto neón brillante */
    box-shadow: 5px 5px 0px var(--text), 0 0 10px var(--pink-hot);
    background: var(--pink-bg); /* Se aclara un poco */
  }
}

/* 2. Estilos del Botón */
.shrine-float-btn {
  position: fixed;
  bottom: 25px; /* Un poco más arriba */
  right: 25px;
  background: var(--pink-dark);
  border: 3px solid var(--white); /* Borde más grueso */
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  z-index: 9999; /* Asegura que siempre esté encima de todo */
  border-radius: 30px; /* Más redondeado, tipo pastilla */

  /* APLICACIÓN DE LAS ANIMACIONES CONSTANTES */
  /* El meneo es rápido (0.5s), el pulso de color es más lento (1s) */
  animation:
    pixel-jiggle 0.5s infinite linear,
    neon-attention 1s infinite alternate ease-in-out;
    
  /* Suaviza la transición al hacer hover */
  transition: all 0.2s var(--ease-kawaii);
}

.shrine-float-btn img {
  width: 24px;
  height: auto;
  filter: drop-shadow(1px 1px 0px var(--text)); /* Sombra al icono */
}

.shrine-float-btn span {
  font-family: 'Silkscreen', cursive;
  font-size: 11px;
  color: var(--white);
  letter-spacing: 1px;
  text-shadow: 2px 2px 0px var(--text);
}

/* 3. Estado Hover (Cuando pasas el mouse) */
.shrine-float-btn:hover {
  /* PAUSAMOS el meneo para que no maree al intentar hacer clic */
  animation-play-state: paused;
  
  /* Aplicamos una transformación fija y más grande */
  transform: scale(1.15) rotate(-5deg) !important; /* !important sobrescribe la animación */
  background: var(--pink-soft);
  border-color: var(--text);
  box-shadow: 8px 8px 0px var(--text);
  cursor: pointer;
}




.gacha-container {
  background: var(--white);
  border-radius: 20px;
  padding: 5px;
  text-align: center;
  max-width: 280px;
  position: relative;
}

.gacha-title {
  font-family: 'Silkscreen', cursive;
  font-size: 14px;
  color: var(--pink-dark); /* Tu rosa oscuro */
  text-transform: uppercase;
}

.gacha-box {
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s;
}

/* Imagen de la caja */
#gacha-img {
  width: 100px; /* Ajusta este tamaño según tu imagen */
  height: auto;
  display: block;
  image-rendering: pixelated; /* Efecto retro nítido */
  transition: filter 0.3s;
}

/* Animación de meneo al pasar el mouse */
.gacha-box:hover #gacha-img {
  animation: wiggle 0.3s infinite;
  filter: brightness(1.1);
}

@keyframes wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
}

/* Animación cuando se hace clic (Pop!) */
.open-anim {
  animation: pop-effect 0.5s ease-out;
}

@keyframes pop-effect {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.gacha-result {
  background: var(--pink-soft);
  color: var(--text);
  border: 2px dashed var(--pink-dark);
  border-radius: 15px;
  padding: 1px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 10px;
}

.gacha-hint {
  font-size: 9px;
  color: var(--pink-dark);
  margin-top: 8px;
  font-family: sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.intro-text {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  line-height: 1.6;
  text-align: center;
  background: white; /* O un rosa muy clarito */
  padding: 15px;
  border-left: 4px solid var(--pink-dark);
  border-right: 4px solid var(--pink-dark);
  font-size: 14px;
}

/* Para resaltar palabras clave como "Nanni" o "Sekai" */
.intro-text b {
  color: var(--pink-dark);
  text-shadow: 1px 1px 0px var(--pink-soft);
}