:root {
  --bg-dark: #0a1a1a;
  --bg-light: #0d2a2a;
  --primary-accent: #ff8c00; /* Naranja fuego */
  --text-color: #f5d08a;
  --text-color-muted: #ffe7b0;
  --footer-bg: #081414;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Quicksand", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-color);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background: linear-gradient(to bottom, var(--bg-light), var(--bg-dark));
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* --- Header Interactivo --- */
#header {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header-content {
  position: relative;
  z-index: 2;
}

.character-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.character-img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 30px rgba(255, 140, 0, 0.5));
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#eyes-container {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 20px;
  display: flex;
  justify-content: space-between;
}

.eye {
  width: 18px;
  height: 18px;
  background: #1c1109;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.pupil {
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
}

.title-container {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

h1 {
  font-size: 4rem;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(245, 208, 138, 0.5);
}

.subtitle {
  font-size: 1.5rem;
  color: var(--text-color-muted);
}

/* --- Secciones Generales --- */
main > section {
  padding: 80px 0;
  border-bottom: 1px solid rgba(255, 140, 0, 0.1);
}
main > section:last-of-type {
  border-bottom: none;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  font-weight: 700;
  color: var(--primary-accent);
  text-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
}

/* --- Sección Leyenda --- */
.legend-entry {
  max-width: 700px;
  margin: 0 auto 30px;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.8;
}

/* --- Sección Galería --- */
.gallery-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-accent) var(--bg-dark);
  scroll-snap-type: x mandatory;
}

.gallery-container::-webkit-scrollbar {
  height: 8px;
}
.gallery-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.gallery-container::-webkit-scrollbar-thumb {
  background-color: var(--primary-accent);
  border-radius: 10px;
}

.gallery-item {
  flex: 0 0 300px;
  height: 400px;
  border-radius: 15px;
  overflow: hidden;
  scroll-snap-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}
.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.1);
}

/* --- Sección Socials --- */
.social-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.social-btn {
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.4s ease;
  background-color: transparent;
  color: var(--primary-accent);
  border: 2px solid var(--primary-accent);
}

.social-btn:hover {
  transform: scale(1.05) translateY(-5px);
  background-color: var(--primary-accent);
  color: var(--bg-dark);
  box-shadow: 0 0 20px rgba(255, 140, 0, 0.5);
}

/* --- Footer --- */
footer {
  background-color: var(--footer-bg);
  position: relative;
  color: rgba(245, 208, 138, 0.7);
}

.footer-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: translateY(-99%);
}
.footer-wave svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px;
}
.footer-wave .shape-fill {
  fill: var(--footer-bg);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 100px 20px 40px;
}

.footer-logo {
  width: 100px;
  opacity: 0.8;
}

.footer-socials {
  display: flex;
  gap: 25px;
}

.footer-socials a {
  color: var(--text-color-muted);
  transition: all 0.3s ease;
}
.footer-socials a:hover {
  color: var(--primary-accent);
  transform: scale(1.1);
}
.footer-socials svg {
  width: 28px;
  height: 28px;
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.2);
  font-size: 0.9rem;
}

/* --- Animaciones de Scroll --- */
.hidden {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(50px);
  transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Staggered animation delays */
h1.hidden {
  transition-delay: 0.1s;
}
.subtitle.hidden {
  transition-delay: 0.2s;
}
#legend .legend-entry:nth-of-type(1).hidden {
  transition-delay: 0.1s;
}
#legend .legend-entry:nth-of-type(2).hidden {
  transition-delay: 0.2s;
}
#legend .legend-entry:nth-of-type(3).hidden {
  transition-delay: 0.3s;
}
.gallery-container.hidden {
  transition-delay: 0.2s;
}
.social-links.hidden {
  transition-delay: 0.2s;
}

/* --- Language Selector --- */
.language-selector {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  gap: 10px;
}
.language-btn {
  background: rgba(13, 42, 42, 0.7);
  color: var(--text-color);
  border: 1px solid var(--text-color);
  border-radius: 20px;
  padding: 5px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Quicksand", sans-serif;
  font-weight: 500;
}
.language-btn:hover,
.language-btn.active {
  background: var(--text-color);
  color: var(--bg-dark);
}

/* --- Media Queries --- */
@media (max-width: 768px) {
  h1 {
    font-size: 2.8rem;
  }
  .subtitle {
    font-size: 1.2rem;
  }
  .character-container {
    width: 250px;
    height: 250px;
  }
  .section-title {
    font-size: 2rem;
  }
  .gallery-item {
    flex: 0 0 250px;
    height: 350px;
  }
}
