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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: radial-gradient(ellipse at center, #0a0f1c 0%, #000 100%);
  color: #e6cfa7;
  font-family: 'Cinzel Decorative', cursive;
  cursor: url('https://i.imgur.com/icHvi7e.jpeg'), auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 1rem;
}

/* Loader */
#loader {
  position: fixed;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  color: #e6cfa7;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Cinzel Decorative', cursive;
  font-size: 1.5rem;
  transition: opacity 0.5s ease;
}

#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Capas visuales */
.stars, .backgroundvideo, .foglayer, .fogmask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  pointer-events: none;
}

.backgroundvideo {
  z-index: -4;
  filter: brightness(0.4) contrast(1.2);
}

.foglayer {
  z-index: -3;
  opacity: 0.4;
  mix-blend-mode: lighten;
}

.fogmask {
  z-index: -2;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.7) 25%, rgba(0,0,0,1) 50%);
  mix-blend-mode: destination-out;
}

/* Logo */
.logo-nox {
  width: 500px;
  max-width: 90%;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeIn 3s ease forwards;
  animation-delay: 0.5s;
  z-index: 1;
}

/* Contador y botón */
.hovergroup {
  padding: 30px;
  border-radius: 100px;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 2;
}

.hovergroup:hover .contador,
.hovergroup:hover .oculto {
  opacity: 1 !important;
}

.contador {
  font-size: 1.5rem;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: none;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

button {
  padding: 6px 14px;
  font-size: 0.85rem;
  border: 2px solid #e6cfa7;
  background-color: transparent;
  color: #e6cfa7;
  opacity: 0.3;
  cursor: not-allowed;
}

p.final {
  margin-top: 10px;
  font-style: italic;
  font-size: 0.85rem;
  color: #ccc;
}

.oculto {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Animación */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Footer */
footer {
  position: fixed;
  bottom: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 9999;
  pointer-events: auto;
}

.logo-x {
  width: 48px;
  height: 48px;
  filter: invert(100%);
  transition: transform 0.3s ease;
  cursor: pointer;
  z-index: 9999;
}

.logo-x:hover {
  transform: scale(1.1);
}

/* Control de música */
.music-control {
  position: fixed;
  bottom: 14px;
  right: 14px;
  z-index: 9999;
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.music-control:hover {
  opacity: 1;
}

.music-control input[type="range"] {
  width: 60px;
  height: 4px;
  cursor: pointer;
  background: transparent;
  accent-color: #e6cfa7;
}

/* Responsive */
@media (max-width: 768px) {
  .logo-nox { width: 300px; }
  .contador { font-size: 1.1rem; }
  button { font-size: 0.75rem; }
  p.final { font-size: 0.75rem; }
  .logo-x { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .logo-nox { width: 220px; }
  .contador { font-size: 1rem; }
  button { font-size: 0.7rem; }
  .logo-x { width: 36px; height: 36px; }
}
