:root {
  --bg-color: #0d0e12;
  --card-bg: #16181f;
  --primary-color: #ff3366; /* Rosa Neón inspirado en MascaTinder */
  --primary-hover: #e02855;
  --text-main: #ffffff;
  --text-muted: #a0a5b5;
  --border-radius: 16px;
  --card-height: 480px;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  background-color: rgba(13, 14, 18, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  margin-left: 1.8rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Botón Menú Hamburguesa (Oculto por defecto en desktop) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 1rem 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.8rem; /* Margen para evitar colisiones */
  line-height: 1.2;
}

.hero h1 span {
  color: var(--primary-color);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Showcase Section - Steam Style */
.showcase-container {
  max-width: 1100px;
  margin: 1rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
}

.showcase-card {
  display: grid;
  grid-template-columns: 65% 35%;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  height: var(--card-height);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.main-display {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
}

.main-display img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.main-display:hover img {
  transform: scale(1.03);
}

.click-badge {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Sidebar */
.sidebar {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, #1c1f2b 0%, var(--card-bg) 100%);
  overflow-y: auto;
}

.sidebar h2 {
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.game-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0.8rem 0 1.2rem; /* Margen inferior preventivo */
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sub-images Grid */
.sub-images-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0.8rem 0;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 4px;
}

.sub-images-grid::-webkit-scrollbar {
  width: 6px;
}

.sub-images-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.sub-images-grid::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.sub-images-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

.sub-images-grid img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.2s;
}

.sub-images-grid img:hover {
  opacity: 1;
  transform: scale(1.03);
}

/* Controls - Con márgenes dinámicos */
.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 1.8rem; /* Margen para despegar del showcase card */
}

.nav-arrow {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.3s;
}

.nav-arrow:hover {
  background: var(--primary-color);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

.dot.active {
  background-color: var(--primary-color);
  transform: scale(1.3);
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  text-decoration: none;
  text-align: center;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-download {
  display: block;
  background: linear-gradient(90deg, #ff3366, #ff6b35);
  color: white;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 0.8rem;
  transition: opacity 0.3s;
}

.btn-download:hover {
  opacity: 0.9;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.85rem;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 2rem;
  background-color: #08090b;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-access-panel {
  margin-top: 1rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 450px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-modal {
  position: absolute;
  top: 15px; right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-form input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d0e12;
  color: white;
  margin-bottom: 10px;
}

.hidden {
  display: none !important;
}

/* --- DISEÑO RESPONSIVE (MÓVILES Y TABLETS) --- */
@media (max-width: 468px) {
  /* Habilitar botón hamburguesa y menú flotante */
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(22, 24, 31, 0.98);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    margin: 0.8rem 0;
    font-size: 1.1rem;
  }

  /* Ajustes de tipografía y márgenes para prevenir solapamiento */
  .hero {
    padding: 2.5rem 1rem 1.5rem;
  }

  .hero h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem; /* Espaciado extra con la descripción */
  }

  .hero p {
    font-size: 0.95rem;
    padding: 0 10px;
  }

  .showcase-card {
    grid-template-columns: 1fr;
    height: auto;
  }

  .main-display {
    height: 240px;
  }

  .sidebar {
    height: auto;
    padding: 1.2rem;
  }

  .carousel-controls {
    margin-top: 1.5rem;
    gap: 12px;
  }
}

.footer-credits {
    text-align: center;
    margin-top: 10px;
}

.credit-link {
    color: #888;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Espacio entre el texto y el icono */
    transition: color 0.2s ease;
}

.credit-icon {
    font-size: 0.75rem; /* Un poco más pequeño que el texto para no distraer */
    opacity: 0.8;
}

/* Efecto al pasar el cursor */
.credit-link:hover {
    color: #4a90e2; /* Cambia a un azul suave o el color primario de tu tema */
}

.credit-link:hover .credit-icon {
    opacity: 1;
}