:root {
    --neon-pink: #ff2fd4;
    --neon-blue: #00eaff;
    --neon-green: #00ff9d; /* Agregado para variedad */
    --dark-bg: #0b0b12;
    --card-bg: #11121a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, #151528, #05050a);
    font-family: 'Orbitron', sans-serif;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 40px;
}

/* =====================
   CARD BASE
===================== */
.cyber-card {
    width: 300px;
    min-height: 380px; /* Altura mínima consistente */
    background: linear-gradient(160deg, #15162a, #0b0b12);
    border: 2px solid var(--glow-color); /* Usa la variable dinámica */
    position: relative;
    padding: 20px;
    clip-path: polygon(0 0, 95% 0, 100% 8%, 100% 100%, 5% 100%, 0 92%);
    transition: transform 0.1s ease; /* Para el JS de inclinación */

    /* Animación de brillo */
    animation: neonPulse 3s ease-in-out infinite, fadeIn 1s ease forwards;
    opacity: 0; /* Empieza invisible para el fadeIn */
    animation-delay: 0s, 0.3s;
}

/* Decorative corners */
.cyber-card::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid var(--neon-blue);
    clip-path: inherit;
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

/* Scan Line Effect */
.cyber-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 234, 255, 0.15) 50%,
            transparent 100%
    );
    animation: scan 4s linear infinite;
    pointer-events: none;
    z-index: 2;
}

/* =====================
   TEXT STYLES
===================== */
.label {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--neon-blue);
    margin-bottom: 5px;
}

.title {
    font-size: 28px;
    font-weight: 800;
    color: var(--glow-color);
    margin: 10px 0;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    animation: flicker 4s infinite;
}

.subtitle {
    font-size: 16px;
    color: #ccc;
    line-height: 1.4;
}

.highlight {
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

/* =====================
   SPECIFIC COMPONENTS
===================== */
.discount {
    margin-top: 25px;
    padding: 15px;
    border: 1px solid var(--neon-blue);
    text-align: center;
    font-size: 20px;
    background: rgba(0, 234, 255, 0.05);
}

.discount span {
    font-size: 36px;
    font-weight: 800;
    color: var(--neon-pink);
    display: block;
}

.footer {
    margin-top: auto; /* Empuja el footer al fondo */
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 12px;
    text-align: center;
    opacity: 0.7;
}

/* =====================
   VARIANTS
===================== */
/* La clase .alt ahora se controla principalmente con la variable inline en HTML,
   pero mantenemos esto para especificidades */
.cyber-card.alt {
    border-color: var(--neon-blue);
}

/* IMAGE CARD VARIANT (Optimizada) */
.image-card {
    /* Imagen de ejemplo - Reemplaza la URL */
    background:
            linear-gradient(180deg, rgba(10,10,20,0.3), rgba(10,10,20,0.95)),
            url("https://assets.codepen.io/13471/cyber-model-01.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* Performance properties */
    contain: layout paint;
    will-change: transform;

    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Texto abajo */
}

/* =====================
   ANIMATIONS
===================== */
/* Optimizado para usar var(--glow-color) */
@keyframes neonPulse {
    0%, 100% {
        box-shadow:
                0 0 10px rgba(255, 255, 255, 0.1),
                inset 0 0 10px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow:
                0 0 20px var(--glow-color),
                0 0 40px var(--glow-color),
                inset 0 0 20px rgba(0, 234, 255, 0.2);
    }
}

@keyframes flicker {
    0%, 19%, 21%, 23%, 100% { opacity: 1; }
    20%, 22% { opacity: 0.6; }
}

@keyframes scan {
    from { transform: translateY(-100%); }
    to { transform: translateY(100%); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hover Boost - Simple CSS fallback si JS falla */
.cyber-card:hover {
    z-index: 10;
    transform: scale(1.05);
}

/*☺☺☺☺☺*/

/* =====================
   VIDEO CARD VARIANT
===================== */

.video-card {
    padding: 0; /* Quitamos el padding base para que el video toque los bordes */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Texto en la parte inferior */
    overflow: hidden; /* Asegura que el video respete el clip-path */
    /* Un degradado superpuesto para mejorar la legibilidad del texto y oscurecer el video */
    background: linear-gradient(180deg, rgba(11, 11, 18, 0.2) 0%, rgba(11, 11, 18, 0.9) 100%);
}

/* Estilo específico para el elemento de video */
.video-card .bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que el video vertical llene la tarjeta sin deformarse */
    z-index: 0; /* El video va detrás de las líneas de escaneo (que son z-index 2) */
    opacity: 0.5; /* Hacemos el video semitransparente para que se mezcle con el fondo */
    /* Opcional: Esto ayuda a que el video adopte los colores del entorno */
    mix-blend-mode: luminosity;
    filter: contrast(1.2) brightness(0.8); /* Ajuste de color para estilo cyberpunk */
}

/* Envoltura para el texto dentro de la tarjeta de video */
.video-card .content-wrapper {
    padding: 20px; /* Re-aplicamos el padding al texto */
    position: relative;
    z-index: 3; /* Asegura que el texto esté POR ENCIMA del video y las líneas de escaneo */
    /* Un ligero fondo sutil detrás del texto para mejorar contraste */
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

/* Pequeño ajuste para que el label parezca estar "grabando" */
.video-card .label {
    color: var(--neon-pink);
    animation: flicker 2s infinite;
}

/* =====================
   SOCIAL SIDEBAR
===================== */
.social-sidebar {
    position: fixed;
    left: 20px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 100;
}

.social-link {
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    transition: 0.3s;
    text-decoration: none;
    position: relative;
}

.social-link:hover {
    color: var(--hover-color);
    text-shadow: 0 0 10px var(--hover-color);
    transform: scale(1.2);
}

.vertical-line {
    width: 1px;
    height: 100px;
    background: linear-gradient(to bottom, var(--neon-blue), transparent);
    margin-top: 10px;
}

/* =====================
   MENU HAMBURGUESA
===================== */
.menu-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(17, 18, 26, 0.8);
    border: 1px solid var(--neon-blue);
    cursor: pointer;
    z-index: 1000; /* Siempre encima */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    /* Forma Cyberpunk (esquina cortada) */
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
    transition: all 0.3s ease;
    box-shadow: 0 0 5px var(--neon-blue);
}

.menu-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--neon-blue);
    transition: 0.3s;
    box-shadow: 0 0 5px var(--neon-blue);
}

/* Estado Activo (Clickeado - Cambia a Neón Rosa) */
.menu-toggle.active {
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px var(--neon-pink);
}

.menu-toggle.active .bar {
    background-color: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink);
}

/* Animación a X */
.menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =====================
   GLASS MENU (Vidrio)
===================== */
.glass-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px; /* Ancho del menú */
    height: 100vh;
    /* Efecto Vidrio */
    background: rgba(11, 11, 18, 0.65);
    backdrop-filter: blur(12px); /* Esto hace el efecto borroso */
    -webkit-backdrop-filter: blur(12px);

    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    /* Animación de entrada */
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 900;
}

/* Borde neón lateral cuando está abierto */
.glass-nav.open {
    transform: translateX(0);
    border-left: 2px solid var(--neon-pink);
    box-shadow: -5px 0 20px rgba(255, 47, 212, 0.2);
}

.nav-links {
    list-style: none;
    padding: 0;
    text-align: center;
}

.nav-links li {
    margin: 25px 0;
    opacity: 0; /* Ocultos al inicio para animar */
    transform: translateX(20px);
    transition: 0.3s ease forwards;
}

/* Animación escalonada de los links */
.glass-nav.open .nav-links li {
    animation: slideIn 0.5s ease forwards;
    animation-delay: calc(0.1s * var(--i));
}

.nav-links a {
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 3px;
    position: relative;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

.nav-decoration {
    position: absolute;
    bottom: 20px;
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 5px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
    width: 80%;
    text-align: center;
}

@keyframes slideIn {
    to { opacity: 1; transform: translateX(0); }
}

#cyber-loader {
    position: fixed;
    inset: 0;
    background: #05050a;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader-content {
    text-align: center;
    width: 300px;
}

.glitch-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--neon-blue);
    letter-spacing: 4px;
    margin-bottom: 20px;
    position: relative;
}

.scanline-bar {
    width: 100%;
    height: 4px;
    background: var(--neon-pink);
    box-shadow: 0 0 15px var(--neon-pink);
    position: relative;
    overflow: hidden;
}

.scanline-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    animation: loading-bar 1s infinite linear;
}

.loading-stats {
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    color: var(--neon-green);
    font-size: 0.9rem;
}

@keyframes loading-bar {
    0% { left: -100%; }
    100% { left: 100%; }
}

.blink { animation: flicker 0.5s infinite; }

/* Clase para ocultar el loader */
#cyber-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

#cyber-form-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.9);
    backdrop-filter: blur(10px);
    display: none; /* Se activa con JS */
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#cyber-form-modal.active { display: flex; }

.modal-content {
    width: 90%;
    max-width: 400px;
    background: var(--card-bg);
    border: 2px solid var(--neon-blue);
    padding: 30px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%);
    box-shadow: 0 0 20px var(--neon-blue);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    color: var(--neon-pink);
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: var(--neon-blue);
    font-size: 0.7rem;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--neon-blue);
    padding: 12px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 20px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: 0.3s;
}

.submit-btn:hover {
    background: var(--neon-pink);
    color: white;
    box-shadow: 0 0 15px var(--neon-pink);
}