/* styles.css */

/* Reset + Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Segoe UI', sans-serif;
  background: #101010;
  color: #f0f0f0;
  overflow: hidden; /* ocultar scroll durante splash */
  line-height: 1.7;
}

/* Splash */
#splash {
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #000;
  z-index: 999;
}
.splash-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #00122f 0%, #000 80%);
  animation: bgPulse 4s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes bgPulse {
  from { filter: brightness(1); }
  to   { filter: brightness(1.3); }
}
.logo-wrapper {
  position: relative;
  z-index: 1;
  perspective: 800px;
}
#splash img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  opacity: 0;
  animation: logoEntry 1.6s ease-out forwards;
}
@keyframes logoEntry {
  0%   { opacity: 0; transform: rotateY(-180deg) scale(0.5); }
  50%  { opacity: 1; transform: rotateY(20deg)  scale(1.2); }
  80%  { transform: rotateY(-10deg) scale(0.95); }
  100% { opacity: 1; transform: rotateY(0deg)   scale(1); }
}
@keyframes btnEntry {
  0%   { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}
#start-btn {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  padding: 14px 40px;
  font-size: 1.2em;
  font-weight: bold;
  color: #101010;
  background: #00d9ff;
  border: none;
  border-radius: 30px;
  opacity: 0;
  transform: translateY(40px);
  animation: btnEntry 1s 1.8s ease-out forwards;
  box-shadow: 0 0 15px #00d9ff80;
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
}
#start-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px #00d9ff;
}

/* Estados JS */
.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
#menu-toggle {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#menu-toggle.visible {
  opacity: 1;
  pointer-events: auto;
}
.content.shifted {
  margin-left: 260px;
  transition: margin-left 0.5s ease;
}

/* Hamburger */
#menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 35px;
  height: 30px;
  cursor: pointer;
  z-index: 1001;
}
#menu-toggle span,
#menu-toggle span::before,
#menu-toggle span::after {
  position: absolute;
  height: 4px;
  width: 100%;
  background: #f0f0f0;
  border-radius: 2px;
  transition: all .3s ease;
}
#menu-toggle span {
  top: 50%;
  transform: translateY(-50%);
}
#menu-toggle span::before {
  content: '';
  top: -10px;
}
#menu-toggle span::after {
  content: '';
  top: 10px;
}
#menu-toggle.open span {
  background: transparent;
}
#menu-toggle.open span::before {
  transform: rotate(45deg);
  top: 0;
}
#menu-toggle.open span::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Sidebar Izquierdo */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: linear-gradient(to bottom, #0e101a, #0a0c14);
  border-right: 1px solid #1e2b3a;
  padding-top: 20px;
  overflow-y: auto;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.sidebar.open {
  transform: translateX(0);
}
.sidebar h2 {
  color: #00d9ff;
  text-align: center;
  margin: 20px 0;
  font-size: 1.8em;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  padding: 0 20px;
}
.sidebar nav a {
  color: #c9d1d9;
  text-decoration: none;
  margin: 6px 0;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.95em;
  transition: background 0.25s, color 0.25s;
}
.sidebar nav a:hover {
  background-color: #132030;
  color: #00d9ff;
}

/* Scrollbar del sidebar izquierdo */
.sidebar::-webkit-scrollbar {
  width: 8px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00d9ff 0%, #006699 100%);
  border-radius: 6px;
  box-shadow: inset 0 0 6px rgba(0, 217, 255, 0.5);
}
.sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

/* Scrollbar Global (contenido principal) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00d9ff 0%, #006699 100%);
  border-radius: 6px;
  box-shadow: inset 0 0 6px rgba(0, 217, 255, 0.5);
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

/* Content */
.content {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity .8s ease, transform .8s ease;
}
.content.show {
  opacity: 1;
  transform: translateY(0);
}
.content .container {
  max-width: 900px;
  margin: 50px auto;
  padding: 50px 30px 100px;
  background: #1a1a1a;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

/* Secciones y encabezados */
.content .container h1 {
  font-size: 2.8rem;
  margin-bottom: 30px;
  border-bottom: 3px solid #00d9ff;
  padding-bottom: 10px;
  text-align: center;
}
section {
  margin-bottom: 70px;
  padding-bottom: 35px;
  border-bottom: 1px solid #333;
}
section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
section h2 {
  font-size: 2rem;
  color: #00d9ff;
  margin-bottom: 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeUp .6s forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
section:nth-of-type(odd) h2 { animation-delay: .2s; }
section:nth-of-type(even) h2 { animation-delay: .4s; }
section p { margin-bottom: 20px; text-align: justify; }
section ul { padding-left: 25px; }
section ul li { margin-bottom: 12px; }

/* Details */
details {
  background: #222;
  padding: 15px;
  margin: 14px 0;
  border-radius: 8px;
  border: 1px solid #444;
}
summary {
  font-weight: bold;
  cursor: pointer;
}
.alert {
  color: #ff4d4d;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 767px) {
  .content .container {
    padding: 40px 20px;
    margin: 30px auto;
  }
  .sidebar {
    width: 220px;
  }
}

/* Extras: enlaces de iconos debajo */
.sidebar-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 20px auto;
  text-align: center;
}
.sidebar-links a {
  color: #ccc;
  font-size: 0.8em;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sidebar-links a span {
  margin-top: 4px;
}
.sidebar-links a:hover span {
  color: #00d9ff;
}

/* Dropdown de navegación */
.nav-dropdown {
  padding: 10px 20px;
  margin-bottom: 10px;
  background: #111a2b;
  border-radius: 10px;
  border: 1px solid #2c2c2c;
  overflow: hidden;
  transition: all 0.3s ease;
}
.nav-dropdown summary {
  font-weight: bold;
  font-size: 1.1em;
  color: #00d9ff;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s;
}
.nav-dropdown summary:hover { color: #ffffff; }
.nav-dropdown[open] nav {
  animation: fadeSlideDown 0.3s ease-out forwards;
}
.nav-dropdown nav {
  display: flex;
  flex-direction: column;
  padding-top: 10px;
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
