:root {
    /* Paleta Rockstar / GTA 6 Pre-Venta */
    --bg-dark: #0f0a14;
    --panel-bg: #2b1b36; /* Morado Rockstar */
    --panel-bg-hover: #3d264c;
    
    --text-primary: #ffffff;
    --text-secondary: #d1c4e9;
    --text-muted: #9575cd;
    
    --accent-gold: #ffb700;
    --accent-gold-hover: #ffcf40;
    --accent-pink: #ff007f;
    --border-color: rgba(255, 255, 255, 0.15);
    
    --border-radius-lg: 12px;
    --border-radius-md: 8px;
    
    --font-sans: 'Inter', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- ESTRUCTURA SPLIT-SCREEN --- */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.left-panel {
    width: 38%;
    min-width: 400px;
    max-width: 500px;
    background-color: var(--panel-bg);
    padding: 40px;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    z-index: 10;
    position: relative;
    overflow-y: auto;
}

.right-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

/* --- CARRUSEL DE FONDOS --- */
#bg-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 3s ease-in-out;
}

.slide.slide-active {
    opacity: 1;
}

/* Contenedor central (Opcional, para simular la portada cuadrada) */
.game-cover-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: transparent;
    z-index: 2;
    /* Aquí se puede añadir la caja del juego si el usuario la provee luego */
}

/* --- ESTILOS DEL PANEL IZQUIERDO --- */
.lang-selector {
    text-align: right;
    margin-bottom: 20px;
}

.lang-dropdown {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}
.lang-dropdown option { background: var(--panel-bg); }

.header {
    margin-bottom: 30px;
}

.main-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.separator {
    color: var(--border-color);
    margin: 0 10px;
    font-weight: 300;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Cartas de Selección Estilo Rockstar */
.rockstar-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.rockstar-card {
    display: block;
    cursor: pointer;
}

.rockstar-card input[type="radio"] {
    display: none;
}

.rockstar-card .card-content {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    transition: all 0.2s ease;
}

.rockstar-card .card-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.rockstar-card .card-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

.rockstar-card input[type="radio"]:checked + .card-content {
    background: #ffffff;
    color: #000000;
}
.rockstar-card input[type="radio"]:checked + .card-content p {
    color: #333333;
}

.rockstar-card.small .card-content {
    padding: 12px 16px;
    text-align: center;
}
.rockstar-card.small .card-content h3 { margin-bottom: 0; }

.edition-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.info-box {
    background: #ffffff;
    color: #000000;
    padding: 20px;
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
}

.info-box h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}

.info-box p {
    font-size: 13px;
    line-height: 1.5;
}

.bonus-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.bonus-dropdown {
    background: #634079; /* Color morado claro del screenshot */
    border-radius: var(--border-radius-md);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.bonus-dropdown:hover {
    background: #734c8a;
}
.bonus-dropdown > div {
    display: flex;
    align-items: center;
    gap: 12px;
}
.bonus-dropdown .badge {
    background: #ffb7c5; /* Color rosa claro del badge */
    color: #000000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
}
.bonus-dropdown .arrow {
    font-style: normal;
    font-size: 12px;
    color: var(--text-primary);
}

/* Botones */
.btn-rockstar {
    width: 100%;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 30px; /* Estilo píldora */
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-rockstar:hover {
    background: rgba(255,255,255,0.1);
}

.btn-rockstar.highlight {
    background: linear-gradient(90deg, #ffcf40 0%, #ffaa00 100%);
    color: #000000;
    border: none;
}

.btn-rockstar.highlight:hover {
    background: linear-gradient(90deg, #ffe066 0%, #ffb700 100%);
}

.collapsible-main-btn {
    width: 100%;
    background: var(--panel-bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}
.collapsible-main-btn:hover {
    background: #472b59;
}
.collapsible-main-btn .arrow {
    font-style: normal;
    font-size: 14px;
    transition: transform 0.3s ease;
}
.collapsible-main-btn.active .arrow {
    transform: rotate(180deg);
}

.btn-group {
    display: flex;
    gap: 12px;
}

.btn-secondary {
    flex: 0.3;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.btn-secondary:hover { color: var(--text-primary); }

.rockstar-input {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 16px;
    border-radius: var(--border-radius-md);
    font-size: 15px;
    outline: none;
}
.rockstar-input:focus { border-color: var(--accent-gold); }

/* --- SISTEMA DE PASOS --- */
.step {
    display: none;
    animation: fadeIn 0.3s ease;
}
.step.step-active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MODALES Y OVERLAYS --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px 30px;
}

.modal-card.hidden { display: none; }

.modal-icon-wrapper {
    width: 64px; height: 64px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center; align-items: center;
    background: rgba(255, 183, 0, 0.1);
    border-radius: 50%;
    color: var(--accent-gold);
}

.success-wrapper {
    background: rgba(48, 209, 88, 0.1);
    color: #30d158;
}

.action-icon {
    width: 32px; height: 32px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.progress-container { width: 100%; }
.progress-bar-bg {
    width: 100%; height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px; margin-bottom: 12px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%; width: 0%;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}
.progress-stats {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-secondary);
}

.notification-pill {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 30px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.notification-pill.show-pill {
    transform: translateY(0);
    opacity: 1;
}
.notify-text { font-size: 13px; }
.hidden { display: none !important; }

/* RESPONSIVE MÓVIL */
@media (max-width: 900px) {
    .layout-wrapper {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        min-height: 100vh;
    }
    
    /* El carrusel de fondo se vuelve fondo completo de pantalla */
    .right-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
    }
    
    /* Animación de paneo para mostrar las imágenes anchas en móviles */
    @keyframes panImage {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }
    .slide {
        background-position: 0% 50%;
    }
    .slide.slide-active {
        animation: panImage 24s linear infinite; /* Recorre toda la imagen en 12 segundos exactos (mitad de 24s) */
    }
    
    .game-cover-wrapper {
        display: none; /* Ocultamos la caja del juego flotante en móvil para ahorrar espacio */
    }

    /* El formulario se vuelve una tarjeta de cristal centrada flotante */
    .left-panel {
        width: 100%;
        max-width: 450px;
        min-width: 0; /* Sobrescribir el min-width global de 400px */
        height: max-content; /* Se ajusta solo a lo que necesite */
        max-height: 85vh; /* Evita que crezca más del 85% de la pantalla y toque los bordes */
        overflow-y: auto; /* Si el contenido es más alto, se hará scroll por dentro de la tarjeta */
        padding: 30px 20px;
        background-color: rgba(43, 27, 54, 0.85); /* Fondo púrpura semitransparente */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        z-index: 10;
        margin: auto; /* Fuerza centrado vertical y horizontal dejando espacio libre arriba y abajo */
        box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    }
    
    /* Arreglar los botones en móvil */
    .btn-group {
        flex-direction: column-reverse;
        gap: 15px;
    }
    .btn-secondary {
        flex: 1;
        padding: 10px;
    }
    .btn-rockstar {
        padding: 18px; /* Botón principal un poco más grande en móvil */
    }

    /* Mover la notificación para que flote abajo pero sin tapar */
    .notification-pill {
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translate(-50%, 100px); /* Oculto abajo por defecto */
        width: 90%;
        justify-content: center;
        z-index: 1000;
    }
    .notification-pill.show-pill {
        transform: translate(-50%, 0);
    }
}

/* =========================================================
   BOTÓN RGB GTA 6 (Efecto Neón Vice City / GTA VI)
   ========================================================= */
@keyframes gta6RgbGlow {
    0% {
        background-position: 0% 50%;
        box-shadow: 0 0 20px rgba(255, 0, 127, 0.7), 0 0 35px rgba(255, 159, 10, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.2);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 25px rgba(189, 0, 255, 0.8), 0 0 45px rgba(0, 229, 255, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.3);
    }
    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 20px rgba(255, 0, 127, 0.7), 0 0 35px rgba(255, 159, 10, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.2);
    }
}

@keyframes gta6Pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.06);
    }
}

.btn-gta6-rgb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #ff007f, #9b51e0, #ff9f0a, #00e5ff, #ff007f);
    background-size: 300% 300%;
    animation: gta6RgbGlow 3.5s ease infinite, gta6Pulse 2s ease-in-out infinite;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-gta6-rgb:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.btn-gta6-rgb img {
    height: 30px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
}
