:root {
  --text-color: #1a1a1a;
  --orange-accent: #FE6E36;
  --bg-gradient: #0E1116;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #0E1116;
  padding-top: 80px; /* La misma altura que tu navbar */
}

html, body {
  max-width: 100%;
  overflow-x: hidden; /* Prohíbe el scroll horizontal en toda la web */
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  /* Ajustamos el padding: 20px arriba/abajo para darle altura */
  padding: 20px 40px; 
  
  /* Quitamos el height: 60px fijo para que no se colapse */
  min-height: 80px; 
  
  position: fixed; 
  top: 0;
  left: 0;
  right: 0; /* Sustituye width: 100% por esto */
  z-index: 1000;
  
  /* Fondo y efecto cristal */
  background: rgba(0, 0, 0, 0.15); 
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  /* Borde sutil para definir la separación */
  border-bottom: 1px solid #272B34;
  
  /* Importante para que el width: 100% no cause scroll horizontal */
  box-sizing: border-box; 
  transition: transform 0.3s ease, background 0.3s ease; /* Suaviza el movimiento */
}

.header-hidden {
    transform: translateY(-100%);
}

.header-scrolled {
    background: rgba(14, 17, 22, 0.95) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* IMPORTANTE: Ajusta los colores de los textos para que se vean sobre el fondo oscuro */
.nav-item, .logo {
  color: white !important;
}

.arrow::after {
  border-color: white; /* Cambia el color de la flechita a blanco */
}


/* Logo Section */
.logo {
    display: flex;
    align-items: center;
    height: 100%; /* Se adapta a la altura del navbar */
}

.main-logo {
    height: 50px; /* Ajusta este valor según el alto de tu logo */
    width: auto;  /* Mantiene la proporción original */
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.05); /* Un toque sutil al pasar el mouse */
}

.brand-name {
  letter-spacing: -0.5px;
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 30px;
}

.nav-item {
  color: #333;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.arrow::after {
  content: '';
  border: solid #555;
  border-width: 0 1.5px 1.5px 0;
  display: inline-block;
  padding: 2px;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

/* Button Section */
.btn-contact {
  background-color: var(--orange-accent);
  color: white;
  padding: 15px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.2s ease;
}

.btn-contact:hover {
  opacity: 0.9;
}



/* Añade esto a tu CSS */
#machineTrack {
    display: flex;
    gap: 80px; /* El gap que definiste en JS */
    will-change: transform; /* Optimiza el renderizado por GPU */
    /* El valor inicial de transform debe coincidir con el del primer item real */
    transform: translateX(0); 
}



.machine-selector {
    /* 1. Cambiamos el color y quitamos los gradientes de la cuadrícula */
    background-color: #0b0e14; 
    
    /* 2. Añadimos tu imagen */
    background-image: url('img/bg-spin.jpg'); /* <-- Pon aquí el nombre o link de tu archivo */
    
    /* 3. Ajustes para que la imagen se vea perfecta */
    background-size: cover;      /* Hace que la imagen ocupe todo el contenedor */
    background-position: center;  /* Centra la imagen */
    background-repeat: no-repeat; /* Evita que la imagen se repita */
    background-attachment: fixed; /* Opcional: Da un efecto parallax al hacer scroll */

    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
    color: white;
}

/* Status Bar */
.status-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 10px 40px;
}

.badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #272B34;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    margin: 0 5px;

}

.center-badges {
    display: flex;
    gap: 50px;
    margin-top: 50px; /* Prueba con 30px para notar el cambio real */
}

.spacer-right {
    width: 80px; /* Ajusta este ancho para que sea igual al del botón "Back" */
    height: 40px; /* Altura similar al botón */
    visibility: hidden; /* No se ve, no se puede clickear, pero OCUPA espacio */
    pointer-events: none; /* Seguridad extra para que no estorbe */
}

.btn-back {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #272B34;
    border-radius: 20px; /* Más redondeado como en la captura */
    padding: 10px 20px;
    color: #ffffff;
    display: inline-flex; /* Para que alinee bien la flecha y el texto */
    align-items: center;
    text-decoration: none;
}



/* Carrusel Central */
.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 500px;
    overflow: hidden; 
    display: flex;
    align-items: center;
}

.machine-track {
    display: flex;
    align-items: center;
    position: absolute; /* Permite que el JS controle la posición exacta */
    left: 0; 
    gap: 80px; 
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
    padding: 0; /* Limpia paddings extra que afecten el cálculo */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.machine-item {
    text-align: center;
    width: 280px;
    flex-shrink: 0;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease, filter 0.5s ease;
    opacity: 0; /* Por defecto todos ocultos */
    transform: translateZ(0);
    will-change: transform, opacity;
}

.machine-item img {
    margin-left: 33px; /* Ajusta este valor (ej. 30px, 50px) hasta que quede donde quieres */
    position: relative; /* Por si necesitas usar 'left' en su lugar */
}

/* NUEVO: Ocultar los que no son el centro ni los laterales inmediatos */
.machine-item.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}


.machine-item.side {
    opacity: 0.5;
    transform: scale(0.8);
    filter: blur(2px);
    z-index: 1;
}

.machine-item.active {
    opacity: 1;
    transform: scale(1.15);
    z-index: 10;
    filter: none;
}

.machine-item img {
    width: 100%;
    filter: drop-shadow(0 0 30px rgba(255, 150, 0, 0.2));
    image-rendering: -webkit-optimize-contrast;
    -webkit-user-drag: none;
}

.machine-price-tag {
    background: #1a2235;
    padding: 8px 15px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 15px;
    font-weight: bold;
}

.machine-price-tag span {
    color: #64748b;
    font-size: 11px;
    margin-left: 5px;
}

/* Colores base para los porcentajes */
.machine-price-tag span {
    font-weight: bold;
    margin-left: 5px;
}

/* --- ESTILOS DE ETIQUETAS POR RAREZA --- */

/* Común - Blanco/Gris */
.rarity-common {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}
.rarity-common span { color: #ffffff; }

/* Poco Común - Verde */
.rarity-uncommon {
    border: 1px solid rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.1);
}
.rarity-uncommon span { color: #4ade80; }

/* Raro - Azul */
.rarity-rare {
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.1);
}
.rarity-rare span { color: #3b82f6; }

/* Épico - Púrpura */
.rarity-epic {
    border: 1px solid rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.1);
}
.rarity-epic span { color: #a855f7; }

/* Legendario - Naranja */
.rarity-legendary {
    border: 1px solid rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.1);
}
.rarity-legendary span { color: #f97316; }

/* Mítico - Dorado */
.rarity-mythic {
    border: 1px solid rgba(250, 204, 21, 0.4);
    background: rgba(250, 204, 21, 0.15);
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.1); /* Brillo extra por ser el mejor */
}
.rarity-mythic span { 
    color: #facc15; 
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.5);
}
/* Flechas Navegación */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10; /* Siempre por encima */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow.prev { left: 20px; }
.nav-arrow.next { right: 20px; }

.nav-arrow:hover { background: rgba(59, 130, 246, 0.5); }

/* Controles Inferiores */
.purchase-controls {
    margin-top: auto;
    text-align: center;
    padding-bottom: 40px;
}

.quantity-selector {
    background: #161b26;
    display: flex;
    align-items: center;
    border-radius: 30px;
    padding: 5px 15px;
    margin-bottom: 20px;
}

.qty-btn { background: none; border: none; color: white; font-size: 20px; padding: 0 10px; cursor: pointer; }
.quantity-selector input { background: none; border: none; color: white; width: 40px; text-align: center; font-size: 16px; }

.btn-spin-main {
    background: linear-gradient(90deg, #FE6E36, #D44517);
    color: white;
    border: none;
    padding: 15px 60px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 30px rgba(254, 110, 54, 0.6);
    margin-top: 30px;
    margin-bottom: 60px;
}










/* Add this to your .machine-item.active for high-tier machines */
.machine-item.active[data-rarity="legendary"] img {
    filter: drop-shadow(0 0 25px rgba(254, 110, 54, 0.8));
    animation: pulse-gold 2s infinite ease-in-out;
}

@keyframes pulse-gold {
    0% { transform: scale(1.15); filter: brightness(1); }
    50% { transform: scale(1.18); filter: brightness(1.3) drop-shadow(0 0 40px #FE6E36); }
    100% { transform: scale(1.15); filter: brightness(1); }
}

/* Quita el subrayado de absolutamente todos los enlaces (<a>) */
a {
    text-decoration: none !important;
    color: inherit; /* Mantiene el color que ya definiste en lugar del azul por defecto */
}

/* Opcional: Asegura que al pasar el mouse tampoco aparezca */
a:hover {
    text-decoration: none !important;
}

.btn-contact.connected {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    color: #00ff88;
    font-family: monospace; /* Las direcciones se ven mejor en mono */
}

footer {
    background-color: #0E1116; /* Color oscuro del fondo */
    padding: 30px 40px;
    border-top: 1px solid #272B34; /* Línea divisoria superior sutil */
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px; /* O el ancho máximo que estés usando */
    margin: 0 auto;
}

.footer-copyright {
    color: #94a3b8; /* Color gris suave para el texto */
    font-size: 14px;
    font-weight: 400;
}

.footer-links {
    display: flex;
    gap: 25px; /* Espaciado entre los enlaces */
}

.footer-links a {
    color: #cbd5e1; /* Color de los enlaces */
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff; /* Brillo al pasar el mouse */
}



/* --- RESPONSIVE: MACHINE SELECTOR --- */

/* 1. AJUSTES PARA TABLETS (Menos de 1024px) */
@media (max-width: 1024px) {
    .machine-track {
        gap: 40px; /* Reducimos el espacio entre máquinas */
    }
    
    .machine-item {
        width: 220px; /* Máquinas un poco más pequeñas */
    }
    
    .center-badges {
        gap: 20px;
    }
}

/* 2. AJUSTES PARA MÓVILES (Menos de 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .nav-links {
        display: none; /* Ocultamos links de navegación */
    }

    /* Status Bar y Badges */
    .status-bar {
        padding: 10px 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .center-badges {
        order: 3; /* Mandamos los badges al final en móvil */
        margin-top: 20px;
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .spacer-right {
        display: none; /* Ya no necesitamos el espacio fantasma */
    }

    /* Carrusel */
    .carousel-wrapper {
        height: 450px;
    }

    .machine-item {
        width: 200px;
    }

    .machine-item img {
        margin-left: 0; /* Quitamos el ajuste manual en móvil */
    }

    .machine-item.side {
        opacity: 0.2; /* Opacamos más los laterales para centrar la atención */
        transform: scale(0.7);
    }

    /* Flechas de navegación: Las hacemos más pequeñas */
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .nav-arrow.prev { left: 10px; }
    .nav-arrow.next { right: 10px; }
}

/* 3. AJUSTES PARA MÓVILES PEQUEÑOS (Menos de 480px) */
@media (max-width: 480px) {
    .machine-selector {
        background-attachment: scroll; /* El fixed suele dar lag en móviles viejos */
        padding: 10px;
    }

    .carousel-wrapper {
        height: 400px;
    }

    .machine-item {
        width: 180px;
    }

    .machine-item.active {
        transform: scale(1.1); /* Reducimos un poco el escalado para que no se salga */
    }

    /* Controles de compra */
    .btn-spin-main {
        width: 90%; /* Botón casi a lo ancho de la pantalla */
        padding: 15px 0;
        font-size: 16px;
    }

    .footer-container {
        flex-direction: column;
        gap: 15px;
    }

    .footer-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
}