/* ============================= */
/* RESET GENERAL                */
/* ============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background-color: #0a0a0a;
  color: #eee;
  font-family: 'Kanit', sans-serif;
  overflow-x: hidden;
}

/* ============================= */
/* VARIABLES GLOBALES            */
/* ============================= */
:root {
  --color-accent: #00e5ff;         /* neon cyan */
  --color-accent-alt: #ff4655;     /* neon rojo secundario */
  --font-main: 'Oswald', sans-serif;
  --font-secondary: 'Kanit', sans-serif;
  --gradient-dark: rgba(10, 10, 10, 0.8);
}

/* ============================= */
/* ESCONDIDO / VISIBLE NAVBAR    */
/* ============================= */
/* La navbar se oculta con transform: translateY(-100%) */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent;
  z-index: 1000;
  padding: 15px 0;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.navbar.hidden {
  transform: translateY(-100%);
}

/* ============================= */
/* ESPACIO PARA NAVBAR           */
/* ============================= */
/* Añadimos un padding-top a <main> para que el contenido no quede oculto detrás de la navbar */
main {
  padding-top: 140px; /* Ajustar si cambias la altura del navbar */
}

/* ============================= */
/* SCROLL-UP BUTTON             */
/* ============================= */
.scroll-up {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--color-accent);
  color: #000;
  padding: 10px 18px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.scroll-up:hover {
  background-color: #fff;
  transform: scale(1.1);
}

/* ============================= */
/* NAVBAR                       */
/* ============================= */
.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column; /* Primero logo, luego enlaces centrados */
  align-items: center;
  padding: 0 20px;
}

/* Logo en la parte superior del contenedor */
.logo-container {
  text-align: center;
  margin-bottom: 12px;
}
.logo {
  font-family: var(--font-main);
  color: var(--color-accent);
  font-size: 2.4rem;
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--color-accent), 0 0 12px rgba(0,229,255,0.5);
}
.local-time {
  font-family: var(--font-secondary);
  color: #bbb;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Enlaces del menú centrados justo bajo el logo */
.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center; /* Centra horizontalmente */
}
.nav-links li {
  opacity: 0;
  transform: translateY(-20px);
  animation: navFadeIn 0.5s ease forwards;
}
.nav-links li:nth-child(1) { animation-delay: 0.15s; }
.nav-links li:nth-child(2) { animation-delay: 0.30s; }
.nav-links li:nth-child(3) { animation-delay: 0.45s; }
.nav-links li:nth-child(4) { animation-delay: 0.60s; }
.nav-links li:nth-child(5) { animation-delay: 0.75s; }
.nav-links li:nth-child(6) { animation-delay: 0.90s; }

.nav-links li a {
  font-family: var(--font-secondary);
  font-size: 1rem;
  color: #ccc;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}
.nav-links li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links li a:hover::after {
  transform: scaleX(1);
}
.nav-links li a:hover {
  color: var(--color-accent);
}

/* Botón hamburger solo en móvil (<768px) */
.hamburger {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: none;
}
@media (max-width: 768px) {
  .hamburger {
    display: block;
    position: absolute;
    top: 15px;
    right: 20px;
  }
  .nav-links {
    position: absolute;
    top: 60px;
    right: 20px;
    background: rgba(10, 10, 10, 0.95);
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    display: none;
  }
  .nav-links.active {
    display: flex;
  }
}

/* ============================= */
/* KEYFRAMES ANIMACIONES NAV     */
/* ============================= */
@keyframes navFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================= */
/* HERO (Pantalla Completa)      */
/* ============================= */
.hero {
  position: relative;
  min-height: 70vh; /* antes: height: 100vh */
  padding: 60px 20px;
  background: url('media/hero-bg.jpg') no-repeat center center/cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10,10,10,0.5) 0%, rgba(10,10,10,0.9) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px 20px 0 20px;
}
.hero-title {
  font-family: var(--font-main);
  font-size: 3.2rem;
  letter-spacing: 2px;
  margin-bottom: 15px;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.7), 0 0 20px rgba(0, 229, 255, 0.4);
}
.hero-subtitle {
  font-family: var(--font-secondary);
  font-size: 1.2rem;
  margin-bottom: 25px;
  color: #ddd;
  max-width: 600px;
  margin: 0 auto 25px;
}
.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: #000;
  font-family: var(--font-secondary);
  font-weight: 700;
  padding: 12px 30px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 1px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 10px;
}
.btn-primary:hover {
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.7), 0 0 20px rgba(0, 229, 255, 0.4);
}

/* ============================= */
/* SECCIÓN “Destacados”          */
/* ============================= */
.section-dark {
  background: #0f0f0f;
}
.section-light {
  background: #1a1a1a;
}
.section {
  padding: 60px 20px; /* antes era 80px */
}

/* Para pantallas pequeñas */
@media (max-width: 768px) {
  .section {
    padding: 50px 15px;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.section-title {
  font-family: var(--font-main);
  font-size: 2.6rem;
  margin-bottom: 5px;
  color: var(--color-accent);
  text-shadow: 0 0 8px var(--color-accent), 0 0 12px rgba(0,229,255,0.4);
}

/* ============================= */
/* PORTAFOLIO GRID              */
/* ============================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.card {
  background-color: #111;
  border: 2px solid #333;
  padding: 20px;
  border-radius: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 10px #00ffff33;
  cursor: pointer;
}
.card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 15px #00FFFFAA;
}
.card h3 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 10px;
}
.card p {
  font-size: 1rem;
  color: #bbb;
}

/* ============================= */
/* VIDEO-CONTAINER “STREAMING”    */
/* ============================= */
.video-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
}
.video-placeholder {
  background: #222;
  color: #888;
  font-family: var(--font-secondary);
  font-size: 1rem;
  padding: 60px 20px;
  border-radius: 6px;
  text-align: center;
}

/* ============================= */
/* SECCIÓN ROLEPLAY & COMUNIDAD  */
/* (Solo estilos reutilizados)   */
/* ============================= */
.section-text {
  font-family: var(--font-secondary);
  font-size: 1.1rem;
  color: #ccc;
  max-width: 800px;
  margin: 0 auto 40px;
}
.btn-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.btn-discord,
.btn-connect,
.btn-whitelist {
  padding: 12px 20px;
  font-weight: bold;
  font-family: 'Kanit', sans-serif;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: 0.3s ease;
  color: white;
}

.btn-discord {
  background: #5865F2;
}
.btn-connect {
  background: #2ECC71;
}
.btn-whitelist {
  background: #5865F2;
}

.btn-group a:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  font-family: 'Kanit', sans-serif;
}

.count-segment {
  background: #111;
  padding: 10px 15px;
  border-radius: 10px;
  text-align: center;
  color: #00fff2;
  min-width: 60px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.count-segment span {
  font-size: 1.6rem;
  font-weight: bold;
  display: block;
}

.count-segment small {
  font-size: 0.75rem;
  color: #ccc;
}

/* ============================= */
/* SECCIÓN CONTACTO (mejorada)    */
/* ============================= */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
.contact-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.field-group input {
  width: 280px;
  padding: 12px 15px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #111;
  color: #fff;
  font-family: var(--font-secondary);
  font-size: 1rem;
}
.field-message textarea {
  width: 600px;
  max-width: 100%;
  padding: 12px 15px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #111;
  color: #fff;
  font-family: var(--font-secondary);
  font-size: 1rem;
  resize: vertical;
}
.btn-contact {
  margin-top: 10px;
  background: var(--color-accent);
  color: #000;
  padding: 12px 35px;
  font-family: var(--font-secondary);
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.btn-contact:hover {
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.7), 0 0 20px rgba(0, 229, 255, 0.4);
}

/* ============================= */
/* FOOTER                        */
/* ============================= */
.main-footer {
  background-color: rgba(10, 10, 10, 0.95);
  color: #bbb;
  padding: 25px 20px;
  text-align: center;
  border-top: 1px solid var(--color-accent);
  margin-top: 40px;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}
.social-links {
  margin-top: 12px;
}
.social-links a {
  color: var(--color-accent);
  text-decoration: none;
  margin: 0 10px;
  font-family: var(--font-secondary);
  transition: color 0.3s ease;
}
.social-links a:hover {
  color: #fff;
}

/* ============================= */
/* LIVE INDICATOR (verde/rojo)   */
/* ============================= */
#live-indicator {
  font-family: var(--font-secondary);
  display: none;
  position: fixed;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 700;
}
#live-indicator.online {
  background-color: #39ff14;
  color: #000;
}
#live-indicator.offline {
  background-color: #ff5555;
  color: #fff;
}

/* ============================= */
/* VISIT COUNTER                 */
/* ============================= */
.visit-counter {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: rgba(20, 20, 20, 0.9);
  color: var(--color-accent);
  padding: 8px 12px;
  border: 2px solid var(--color-accent);
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 1000;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}

/* ============================= */
/* SCROLL-FADE ANIMACIÓN         */
/* ============================= */
.scroll-fade {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}
.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================= */
/* MODAL (VENTANA EMERGENTE)     */
/* ============================= */
.modal {
  display: none; /* oculto por defecto */
  position: fixed;
  z-index: 2000; /* más arriba que navbar y contenido */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
}
.modal-content {
  background: #111;
  margin: 6% auto;
  padding: 30px 25px;
  border-radius: 15px;
  border: 2px solid #00FFFF;
  max-width: 700px;
  width: 90%;
  color: #fff;
  box-shadow: 0 0 30px #00ffffcc;
  font-family: 'Kanit', sans-serif;
  position: relative;
}
.close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #00FFFF;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
}
.close:hover {
  color: #39FF14;
  text-shadow: 0 0 8px #39FF14;
  transform: scale(1.2);
}

/* ============================= */
/* CAROUSEL / SLIDER DISEÑO GRÁFICO */
/* ============================= */
.carousel-container {
  overflow: hidden;
  width: 100%;
  max-width: 700px;
  margin: 20px auto;
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel {
  display: flex;
  transition: transform 0.5s ease-in-out;
}
.carousel img {
  width: 100%;
  max-width: 600px;
  max-height: 400px;
  object-fit: contain;
  display: none;
  border-radius: 10px;
  box-shadow: 0 0 10px #00ffff66;
  cursor: pointer;
}
.carousel img.active {
  display: block;
  margin: auto;
}

/* Botones anterior / siguiente */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.3s ease;
}
.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}
.prev-btn {
  left: 8px;
}
.next-btn {
  right: 8px;
}

/* Puntos indicadores */
.carousel-dots {
  text-align: center;
  margin-top: 12px;
}
.carousel-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #555;
  border-radius: 50%;
  margin: 0 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.carousel-dot.active {
  background: #fff;
}

/* ========================================= */
/* LIGHTBOX (imagen ampliada)                */
/* ========================================= */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}
.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

/* ============================= */
/* GENERALES (keyframes, etc.)   */
/* ============================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slide-down {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================= */
/* MEDIA QUERIES                 */
/* ============================= */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.6rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .video-container iframe {
    height: 300px;
  }
  .carousel-container {
    height: 300px;
  }
  .field-message textarea {
    height: 200px;
  }
}
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .field-message textarea {
    height: 180px;
  }
  .news-item {
    font-size: 0.9rem;
  }
  .portfolio-grid {
    gap: 15px;
  }
  .section {
    padding: 60px 15px;
  }
  .contact-grid {
    flex-direction: column;
    gap: 10px;
  }
  .field-group input {
    width: 100%;
  }
}
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-subtitle {
    font-size: 0.85rem;
  }
  .news-item {
    font-size: 0.85rem;
  }
  .field-message textarea {
    height: 140px;
  }
}

/* ============================= */
/* BARRA DE SCROLL-PROGRESS      */
/* ============================= */
#scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  background: var(--color-accent);
  width: 0%;
  z-index: 1500;
  transition: width 0.25s ease;
}

/* ============================= */
/* LIGHTBOX ESTILO (opcional)    */
/* ============================= */
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 4000;
}
.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border: 3px solid var(--color-accent);
  border-radius: 10px;
  box-shadow: 0 0 25px var(--color-accent);
  animation: fadeInUp 0.5s ease;
}

.form-message {
  margin-top: 20px;
  padding: 12px 20px;
  font-family: var(--font-secondary);
  font-size: 1rem;
  border-radius: 8px;
  max-width: 600px;
  text-align: center;
  display: none;
}
.form-message.success {
  background: #39ff14;
  color: #000;
  border: 1px solid #39ff14;
  box-shadow: 0 0 10px #39ff14;
}
.form-message.error {
  background: #ff5555;
  color: #fff;
  border: 1px solid #ff5555;
  box-shadow: 0 0 10px #ff5555;
}

#preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: url('media/bg/preloader.jpg') no-repeat center center / cover;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.6s ease;
}

#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.preloader-logo {
  width: 220px;
  max-width: 90vw;
  margin-bottom: 25px;
  animation: fadeInUp 1s ease forwards;
}

.preloader-text {
  font-family: var(--font-secondary);
  color: var(--color-accent);
  font-size: 1.2rem;
  letter-spacing: 2px;
  animation: fadeInUp 1.5s ease forwards;
}

.roleplay-galleries {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
}
.gallery-column {
  flex: 1;
  min-height: 300px;
  display: flex;
  flex-direction: column; /* ← clave */
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 15px;
}

.gallery-column img {
  width: 100%;
  max-width: 100%;
  max-height: 400px;
  border-radius: 10px;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.rp-name {
  font-family: var(--font-main);
  font-size: 1.2rem;
  color: var(--color-accent);
  margin-top: 15px;
  text-align: center;
}

.rp-desc {
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  color: #bbb;
  text-align: center;
  margin-top: 5px;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding-top: 20px;
}
.media-grid img,
.media-grid video {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}
/* ===== Scroll Animations Mejoradas ===== */
.scroll-fade, .scroll-slide-left, .scroll-slide-right, .scroll-zoom-in, .scroll-zoom-out {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-slide-left {
  transform: translateX(-50px);
}
.scroll-slide-right {
  transform: translateX(50px);
}
.scroll-zoom-in {
  transform: scale(0.9);
}
.scroll-zoom-out {
  transform: scale(1.1);
}

.fade-in-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* ============================= */
/* NAVBAR CON FONDO ANIMADO      */
/* ============================= */
.navbar.scrolled {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.navbar.hidden {
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.navbar {
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

.preloader-bar {
  width: 0%;
  height: 8px;
  background: var(--color-accent);
  margin-top: 15px;
  border-radius: 6px;
  transition: width 0.2s ease;
  box-shadow: 0 0 10px var(--color-accent);
}

.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.clip-item {
  background: #111;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,229,255,0.1);
}

.divider-phrase {
  text-align: center;
  padding: 10px 20px 0px;
  font-family: 'Kanit', sans-serif;
  font-size: 1.1rem;
  color: var(--color-accent);
  text-shadow: 0 0 6px var(--color-accent);
  animation: fadeInUp 1s ease both;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}
.hero-buttons .btn-primary {
  margin: 0;
}