@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;700&family=Open+Sans:wght@400;600&display=swap');

/* === Paleta clara y moderna === */
:root{
  --accent: #E0415F;
  --accent-hover: #c73752;
  --text-dark: #2b2b2b;
  --text-muted: #666;
  --bg-light: #ffffff;
  --bg-alt: #f7f7f7;
  --border-soft: #e9e9e9;
}

/* Global */
html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 0;
  top: -40px;
  background: #222;
  color: #fff;
  padding: 8px 12px;
  z-index: 2000;
  border-radius: 0 0 6px 0;
  transition: top .25s ease;
}
.skip-link:focus { top: 0; }

/* Navbar */
.navbar {
  background-color: var(--bg-light) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.navbar-brand {
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  color: var(--accent) !important;
  font-size: 1.5rem;
}
.nav-link {
  color: var(--text-dark) !important;
  font-weight: 600;
  padding: .5rem .75rem !important;
  border-radius: 10px;
  transition: all .18s ease;
}
.nav-link:hover, .nav-link:focus {
  color: var(--accent) !important;
  background: rgba(224,65,95,0.08);
}

/* Banner */
.game-banner { 
  padding: 0; 
  line-height: 0; 
  border-bottom: 4px solid var(--accent); 
}

/* Sombras suaves */
.shadow-cozy {
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border-radius: 12px;
}

/* Sections */
section { 
  padding: 4.5rem 0; 
  background: var(--bg-light);
  border-top: 1px solid var(--border-soft);
}
section:nth-of-type(odd) { 
  background: var(--bg-alt);
}
h2 {
  font-family: 'Comfortaa', cursive;
  font-size: 2.4rem;
  color: var(--accent);
  margin-bottom: 2.5rem;
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--accent);
}

/* Alerts */
.alert-danger {
  background-color: var(--accent) !important;
  color: #fff;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

/* Buttons */
.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  padding: .8rem 1.6rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-primary:hover, .btn-primary:focus {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-patreon {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-radius: 30px;
  font-weight: 700;
}
.btn-patreon:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.btn-discord {
  background: #5865F2;
  border-color: #5865F2;
  color: #fff;
  border-radius: 30px;
  font-weight: 700;
}
.btn-discord:hover {
  background: #4753d7;
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* Modal */
.modal-content { 
  border-radius: 18px; 
  border: none; 
  font-family: 'Open Sans', sans-serif; 
  overflow: hidden; 
  background-color: var(--bg-light);
  color: var(--text-dark);
}
.modal-header {
  background: var(--accent);
  color: #fff;
  border-bottom: none;
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
}
.modal-body { 
  padding: 1.5rem; 
  font-size: 1rem; 
}
.modal-footer { 
  background: var(--bg-alt); 
  border-top: none; 
  padding: 1.25rem; 
}

/* Footer */
footer {
  background-color: var(--border-soft) !important;
  color: var(--text-muted) !important;
  padding: 2.5rem 0;
  border-top: 2px solid var(--accent);
  text-align: center;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}
footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 767px) {
  h2 { font-size: 1.9rem; margin-bottom: 1.5rem; }
  .navbar-brand { font-size: 1.2rem; }
  section { padding: 3rem 0; }
}

/* Utilities */
.visually-hidden-focusable {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.visually-hidden-focusable:focus {
  position: static !important;
  width: auto; height: auto; margin: 0;
  clip: auto; background: #111; color: #fff;
  padding: .5rem .75rem; border-radius: .25rem;
}

/* Images */
img { max-width: 100%; height: auto; display: block; }

/* === (NUEVO) Estilos para la página de Galería === */

.gallery-item {
  display: block;
  overflow: hidden; /* Oculta el zoom de la imagen */
  border-radius: 12px; /* Coincide con .shadow-cozy */
  box-shadow: 0 10px 30px rgba(0,0,0,0.06); /* Reutiliza .shadow-cozy */
  transition: transform .25s ease, box-shadow .25s ease;
}

.gallery-item img {
  transition: transform .35s ease-out; /* Animación suave de zoom */
}

.gallery-item:hover,
.gallery-item:focus {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}

.gallery-item:hover img,
.gallery-item:focus img {
  transform: scale(1.08); /* Efecto de zoom sutil */
}

/* Estilos para el Modal Lightbox */
#imageModal .modal-content {
  background-color: var(--bg-light);
  border: none;
  border-radius: 18px; /* Coincide con el modal de edad */
}

#imageModal .modal-header {
   background-color: var(--bg-alt);
   color: var(--text-dark);
   border-bottom: 1px solid var(--border-soft);
   font-family: 'Comfortaa', cursive;
}

#imageModal .modal-body {
  padding: 1rem;
  background-color: var(--bg-alt);
}

#gallery-page {
  background-color: var(--bg-light); /* Esto es #ffffff */
}

/* === (NUEVO) Estilos para la página de Descargas === */

.download-box {
  background-color: var(--bg-light); /* Fondo blanco */
  border: 1px solid var(--border-soft);
  border-radius: 12px; /* Coincide con .shadow-cozy */
  padding: 2rem;
}

/* Estilos para las listas de notas/requisitos */
.list-group-item {
  background-color: transparent !important; /* Quita el fondo de bootstrap */
  border-color: var(--border-soft) !important; /* Borde suave */
  padding-left: 0;
}

/* === (NUEVO) Estilos para botones tipo Itch.io === */

.itch-download-list .list-group-item {
  background-color: var(--bg-light); /* Fondo blanco */
  border-color: var(--border-soft);
  color: var(--text-dark);
  transition: background-color 0.2s ease, color 0.2s ease;
  padding: 2%;
}

.itch-download-list .list-group-item:hover,
.itch-download-list .list-group-item:focus {
  background-color: var(--bg-alt); /* Gris claro al pasar el mouse */
  color: var(--accent);
}

.itch-download-list .list-group-item:hover .fw-bold {
  color: var(--accent); /* Cambia color del texto al pasar el mouse */
}

/* El botón rosa de "Download" */
.btn-download-itch {
  background-color: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  /* Evita que el botón "robe" el clic del enlace <a> principal */
  pointer-events: none; 
}

/* La etiqueta "External" */
.badge-external {
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

#download-page {
  background-color: var(--bg-light); /* Esto es #ffffff */
}

/* === (NUEVO) Estilos para la página de Versiones (Devlog) === */

/* Fondo gris claro para la página de la versión, igual que :nth-of-type(odd) */
.version-page-bg {
  background-color: var(--bg-alt);
}

/* Caja principal blanca donde va el texto del post */
.post-box {
  background-color: var(--bg-light); /* Fondo blanco */
  border: 1px solid var(--border-soft);
  border-radius: 12px; /* Coincide con .shadow-cozy */
  padding: 2.5rem;
}

/* Título principal del post */
.post-title {
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  color: var(--text-dark); /* Color oscuro, no el de acento */
  font-size: 2.5rem;
  line-height: 1.2;
}

/* Estilos para el contenido de texto del post */
.post-content {
  line-height: 1.7;
  font-size: 1.05rem;
  color: var(--text-dark);
}
.post-content img {
  border-radius: 8px; /* Bordes suaves para imágenes en el post */
  margin-top: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}
.post-content h3 {
  font-family: 'Comfortaa', cursive;
  color: var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* Separador horizontal antes de la sección de archivos */
.files-separator {
   border-top: 2px solid var(--border-soft);
   margin-top: 2.5rem;
   padding-top: 2rem;
}

/* Caja de la Sidebar */
.sidebar-box {
  background-color: var(--bg-light);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 1.5rem;
  /* Efecto "Sticky": se queda fija al hacer scroll */
  position: sticky;
  top: 90px; /* Espacio para el navbar (ajusta si es necesario) */
}
.sidebar-box h4 {
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

/* Lista de info del juego en la sidebar */
.game-info-list {
  font-size: 0.9rem;
}
.game-info-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.game-info-list li:last-child {
  border-bottom: none;
}
.game-info-list .info-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-right: 1rem;
}
.game-info-list .info-value {
  color: var(--text-muted);
  text-align: right;
}
/* Para que los enlaces en la sidebar usen el color correcto */
.game-info-list .info-value a {
  color: var(--accent);
  text-decoration: none;
}
.game-info-list .info-value a:hover {
  text-decoration: underline;
}

/* Ajuste responsivo para el padding del post en móviles */
@media (max-width: 767px) {
  .post-box {
    padding: 1.5rem;
  }
  .post-title {
    font-size: 2rem;
  }
  /* En móvil, la sidebar se pone arriba, así que quitamos el sticky */
  .sidebar-box {
    position: static;
  }
}