/* --- VARIABLES DE TEMA --- */
:root {
    --bg-color: #000000;
    --card-bg: rgba(22, 22, 24, 0.8);
    --primary: #E50914; /* Netflix Red por defecto */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --input-bg: #202022;
    --border-color: rgba(255, 255, 255, 0.1);
}

/* TEMAS ESPECÍFICOS */
body.theme-netflix {
    --bg-color: #000000;
    --primary: #E50914;
    --card-bg: rgba(20, 20, 20, 0.9);
}

body.theme-amazon {
    --bg-color: #0F171E; /* Azul oscuro Amazon */
    --primary: #00A8E1; /* Azul Amazon */
    --card-bg: rgba(25, 35, 45, 0.9);
}

body.theme-disney {
    --bg-color: #1A1D29; /* Azul oscuro Disney */
    --primary: #0072D2; /* Azul Disney */
    --card-bg: rgba(30, 35, 50, 0.9);
}

/* --- ESTILOS GENERALES --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: background-color 0.5s ease;
}

/* TARJETA PRINCIPAL (Responsive) */
.card-container {
    width: 100%;
    max-width: 420px; /* Ancho máximo estilo móvil */
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 35px 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* HEADER */
.header { text-align: center; margin-bottom: 30px; }
.logo {
    font-weight: 900;
    font-size: 36px;
    letter-spacing: -1px;
    color: var(--primary);
    margin-bottom: 5px;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.welcome { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.welcome span { color: white; font-weight: 700; }

/* --- AQUÍ ESTÁ EL ARREGLO DEL PIN --- */
.profile-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between; /* Separa texto a la izq y PIN a la der */
    align-items: center;
    margin-bottom: 25px;
}

.profile-info { display: flex; flex-direction: column; gap: 4px; }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 600; }
.screen-name { font-size: 16px; font-weight: 700; color: white; }

/* EL BADGE DEL PIN */
.pin-badge {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px; /* ESTA ES LA CLAVE: Separación entre candado y número */
    font-family: monospace; /* Para que los números se vean tipo código */
}

.pin-badge i { font-size: 12px; color: var(--text-muted); }
.pin-badge span { font-size: 16px; font-weight: 700; letter-spacing: 1px; }

/* CREDENCIALES (Inputs) */
.credentials-box { display: flex; flex-direction: column; gap: 12px; margin-bottom: 25px; }

.input-group {
    position: relative;
    background: var(--input-bg);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: 0.3s;
}
.input-group:hover { border-color: rgba(255,255,255,0.2); }

.input-group input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 14px 45px 14px 16px;
    color: white;
    font-family: monospace;
    font-size: 14px;
    outline: none;
}

.btn-copy {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}
.btn-copy:hover { color: white; transform: translateY(-50%) scale(1.1); }

/* BOTONES */
.actions { display: grid; gap: 15px; }

.btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.15);
    color: white;
}
.btn-outline:hover {
    border-color: white;
    background: rgba(255,255,255,0.05);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 30px -10px var(--primary); /* Glow effect */
}
.btn-primary:hover {
    filter: brightness(1.15);
    box-shadow: 0 15px 40px -10px var(--primary);
}

/* ÁREA DE RESULTADOS */
.result-area { text-align: center; min-height: 20px; margin-bottom: 20px; }
.msg-wait { color: #FBBF24; font-size: 12px; font-weight: 600; animation: pulse 1.5s infinite; }
.msg-success { font-size: 32px; font-weight: 800; color: #4ADE80; letter-spacing: 2px; margin-bottom: 5px; animation: popIn 0.3s; }
.msg-sub { font-size: 11px; color: #4ADE80; opacity: 0.8; }
.msg-error { color: #EF4444; font-size: 12px; font-weight: 600; }

@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* FOOTER */
.footer {
    text-align: center;
    margin-top: 25px;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    font-weight: 500;
}
.footer span { color: rgba(255,255,255,0.6); }

/* --- RESPONSIVE (Móvil y Tablet) --- */
@media (max-width: 480px) {
    .card-container {
        padding: 25px 20px;
        max-width: 100%;
        border: none;
        border-radius: 0;
        background: transparent; /* En móvil puro se integra al fondo */
        box-shadow: none;
    }
    .logo { font-size: 28px; }
    .btn { padding: 14px; }
}
/* --- FIX MÓVIL ANTI-ZOOM --- */
@media screen and (max-width: 768px) {
    input[type="text"], input[type="password"], button {
        font-size: 16px !important; /* Obligatorio para no hacer zoom */
        touch-action: manipulation; /* Respuesta rápida al toque */
    }
    
    .input-group input {
        font-size: 16px !important;
        padding-top: 12px;
        padding-bottom: 12px;
    }
}