:root {
  --bg: #0a0a0c;
  --card-bg: #16161a;
  --text-main: #ffffff;
  --text-dim: #94a3b8;
  --accent: #6366f1;
  --border: #27272a;
}

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

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Hero Style */
.hero {
  text-align: center;
  max-width: 900px;
}

.app-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
}

h1 {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.accent {
  color: var(--accent);
}

.tagline {
  font-size: 1.4rem;
  color: var(--text-dim);
  margin-bottom: 4rem;
  font-weight: 300;
}

/* Minimal Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-item {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

.grid-item:hover {
  border-color: var(--accent);
}

.grid-item span {
  display: block;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.grid-item p {
  font-size: 0.95rem;
  color: var(--text-dim);
}

/* Footer & Snap Attribution */
footer {
  padding: 2rem 5%;
}

.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin-bottom: 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-separator {
  margin-inline: 5px;
}

.copyright p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.snap-badge {
  height: 25px; /* Tamaño ideal para el logo xl */
  width: auto;
  display: block;
  opacity: 0.6;
  transition: opacity 0.5s ease-in-out;
}

.snap-badge:hover {
  opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

/* Estilos para Páginas Legales */
.container-legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
  flex: 1;
}

.simple-nav {
  padding: 2rem 5%;
  display: flex;
  justify-content: flex-start;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: var(--text-main);
  transition: opacity 0.3s ease;
}

.nav-brand:hover {
  opacity: 0.8;
}

.nav-icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.2));
}

/* Reutilizamos el estilo del logo del index principal */
.nav-brand .logo {
  font-size: 1.2rem;
  font-weight: 700;
}

.nav-brand .logo span {
  color: var(--accent);
}

.legal-content h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

.last-updated {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 3rem;
  display: block;
}

.legal-block {
  margin-bottom: 2.5rem;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.legal-block h2 {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.legal-block p,
.legal-block li {
  color: var(--text-dim);
  line-height: 1.8;
}

.legal-block ul {
  margin-top: 1rem;
  list-style: none;
  padding-left: 0;
}

.legal-block li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
}

.legal-block li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.accent-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: 0.3s;
}

.accent-link:hover {
  border-bottom-color: var(--accent);
}

/* Botón Volver Arriba */
.to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--accent);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  opacity: 0; /* Oculto por defecto */
  visibility: hidden;
}

.to-top-btn:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-5px);
  border-color: var(--accent);
}

/* Clase para mostrar el botón mediante JS */
.to-top-btn.show {
  opacity: 1;
  visibility: visible;
}
