/* --- Variables del Sistema de Diseño --- */
:root {
    --primary-navy: #0A2540;
    --accent-emerald: #2ECC71;
    --accent-emerald-dark: #27ae60;
    --bg-light: #F8F9FA;
    --bg-card: #E3EFE3; /* Tono verdoso suave para el subpanel */
    --text-dark: #1A1A1A;
    --text-muted: #555555;
    --white: #FFFFFF;
    --border-radius: 12px;
    --transition: all 0.25s ease-in-out;
}

/* --- Resets --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header Distinguido --- */
.header {
    padding: 20px 40px;
    background-color: var(--primary-navy);
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--accent-emerald);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-title {
    font-weight: 700;
    font-size: 24px;
    color: var(--white);
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-weight: 400;
    font-size: 14px;
    color: var(--accent-emerald);
    letter-spacing: 4px;
    margin-top: 4px;
}

/* --- Layout Principal --- */
.main-container {
    max-width: 850px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
    flex: 1;
}

.main-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 16px;
}

.main-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.5;
}

/* --- Tarjeta del Generador --- */
.generator-card {
    background: var(--white);
    border: 1px solid #E2E8F0;
    border-radius: var(--border-radius);
    padding: 28px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}

/* Caja de contraseña superior */
.password-display-box {
    border: 1px solid #CBD5E1;
    border-radius: var(--border-radius);
    background-color: var(--white);
    margin-bottom: 24px;
    padding: 16px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.password-display-box input {
    width: 100%;
    border: none;
    outline: none;
    font-family: monospace;
    font-size: 24px;
    font-weight: bold;
    text-align: left;
    color: var(--text-dark);
    letter-spacing: 1px;
}

/* Rejilla de Doble Columna (Modelo ejemplo de panel) */
.layout-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 24px;
}

/* Columna Izquierda: Panel de Controles */
.controls-panel {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.control-group label, .group-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 8px;
}

/* Slider */
.slider-wrapper input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #A3D9A5;
    outline: none;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid #CBD5E1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: var(--transition);
}

/* Grid de badges informativos */
.indicators-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    background-color: var(--white);
    color: var(--primary-navy);
    font-size: 12px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.badge-icon {
    color: var(--accent-emerald-dark);
    margin-right: 6px;
    font-weight: bold;
}

/* Columna Derecha: Panel de Acciones Activas */
.actions-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Botón Circular Refresh (Igual al de tu imagen) */
.btn-circular-refresh {
    background: none;
    border: none;
    color: var(--accent-emerald);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.btn-circular-refresh:hover {
    color: var(--accent-emerald-dark);
    transform: rotate(45deg) scale(1.05);
}

/* Contenedor de Robustez */
.strength-wrapper {
    width: 100%;
    text-align: center;
}

.strength-bar-container {
    height: 6px;
    background-color: #E2E8F0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: var(--transition);
}

.strength-bar.standard { width: 40%; background-color: #F39C12; }
.strength-bar.advanced { width: 75%; background-color: var(--accent-emerald); }
.strength-bar.unbreakable { width: 100%; background-color: var(--primary-navy); }

.strength-text {
    font-size: 12px;
    font-weight: 700;
}

/* Botón de Copiar Contraseña Inferior */
.btn-action {
    background-color: var(--accent-emerald);
    color: var(--white);
    border: none;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:hover {
    background-color: var(--accent-emerald-dark);
}

/* --- Responsividad para Dispositivos Móviles --- */
@media (max-width: 768px) {
    .layout-grid {
        grid-template-columns: 1fr; /* Pasa a una sola columna en móviles verticalmente */
        gap: 20px;
    }
    
    .actions-panel {
        flex-direction: row; /* En móvil se alinean de lado a lado para no ocupar espacio excesivo */
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .btn-circular-refresh {
        order: 1;
    }

    .strength-wrapper {
        order: 2;
        width: 50%;
    }

    .btn-action {
        order: 3;
        width: 100%; /* El botón de copiar retoma todo el ancho abajo para mayor comodidad táctil */
    }

    .indicators-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Footer Corporativo con Colores Invertidos --- */
.footer {
    background-color: var(--accent-emerald); /* Fondo Verde Esmeralda */
    color: var(--white); /* ¡Cambiado a Blanco Puro para máxima claridad! */
    text-align: center;
    padding: 20px 40px;
    font-size: 13px;
    font-weight: 700;
    
    /* Forzamos que ocupe todo el ancho de la pantalla y se alinee al fondo */
    width: 100%;
    margin-top: auto; 
    
    /* Mantener el límite visual con el encabezado */
    border-top: 3px solid var(--primary-navy);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.footer p {
    margin: 0;
    padding: 0;
    display: inline-block;
}

/* --- Sección de Donación / PayPal --- */
.donation-box {
    margin-top: 24px;
    background-color: #F1F5F9; /* Un gris azulado muy limpio y sutil */
    border: 1px dashed #CBD5E1; /* Borde discontinuo que invita a la colaboración */
    border-radius: var(--border-radius);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.donation-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.donation-icon {
    font-size: 22px;
}

.donation-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

/* Botón de PayPal personalizado con la marca */
.btn-paypal {
    background-color: var(--primary-navy); /* Azul Marino Profundo de Clave Segura */
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-paypal:hover {
    background-color: var(--accent-emerald); /* Cambia a Verde Esmeralda al pasar el mouse */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.paypal-svg {
    display: inline-block;
}

/* --- Ajuste Responsivo para Móviles --- */
@media (max-width: 768px) {
    .donation-box {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 16px;
    }
    
    .donation-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-paypal {
        width: 100%;
        justify-content: center;
    }
}