:root {
  --violeta: #8a2be2;
  --fondo: #0e0e11;
  --text: #ffffff;
  --gris: #1a1a1d;
  --sombra: rgba(0,0,0,0.5);
  --gradiente: linear-gradient(90deg, #8a2be2, #a64bf4, #c084fc);
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--fondo);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Header full width, contenido centrado, padding 0 horizontal */
header {
  backdrop-filter: blur(8px);
  background-color: rgba(14,14,17,0.8);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--sombra);
  padding: 0 0rem;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

header > .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--violeta);
}

nav {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding: 0.4rem 0.6rem;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav a:hover {
  color: var(--violeta);
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text);
}

/* Menú lateral */
.sidebar {
  position: fixed;
  top: 0;
  left: -350px;
  height: 100%;
  width: 250px;
  background-color: var(--gris);
  box-shadow: 5px 0 10px var(--sombra);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: left 0.3s ease-in-out;
  z-index: 9999;
}

.sidebar a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}

.sidebar.open {
  left: 0;
}

/* Ocultar sidebar en pantallas grandes */
@media (min-width: 769px) {
  .sidebar {
    display: none;
  }
}

/* Contenedor principal mejorado */
.tos-container {
  max-width: 900px;
  margin: 6rem auto 4rem;
  padding: 2.5rem 3rem;
  background: rgba(26, 26, 29, 0.75);
  border-radius: 1.5rem;
  box-shadow:
    0 8px 24px rgba(138, 43, 226, 0.3),
    0 0 60px rgba(166, 75, 244, 0.2);
  backdrop-filter: blur(15px);
  color: #ddd;
  border: 2px solid;
  border-image-slice: 1;
  border-width: 2px;
  border-image-source: linear-gradient(90deg, #8a2be2, #a64bf4, #c084fc);
}

.tos-container h1 {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  color: var(--violeta);
  text-align: center;
  text-shadow: 0 0 5px rgba(138,43,226,0.8);
}

.tos-container section {
  margin-bottom: 2rem;
}

.tos-container h2 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--violeta);
  text-shadow: 0 0 3px rgba(138,43,226,0.7);
  border-left: 4px solid var(--violeta);
  padding-left: 0.8rem;
}

.tos-container p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #ccc;
  text-align: justify;
}

.tos-container a {
  color: var(--violeta);
  text-decoration: underline;
  transition: color 0.3s;
}

.tos-container a:hover {
  color: #a64bf4;
}

/* Footer */
footer {
  margin-top: 5rem;
  padding: 2rem 1rem;
  background-color: #131316;
  text-align: center;
  font-size: 0.9rem;
  color: #aaa;
  border-top: 1px solid #222;
}

footer .links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

footer .links a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s;
}

footer .links a:hover {
  color: var(--violeta);
}

/* Media queries */
@media (max-width: 768px) {
  header {
    padding: 0 0.5rem;
  }
  nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .tos-container {
    margin: 5rem 1rem 2rem;
    padding: 1.5rem 1.5rem;
    border-radius: 1rem;
    box-shadow:
      0 6px 20px rgba(138, 43, 226, 0.3),
      0 0 40px rgba(166, 75, 244, 0.2);
  }
}
