/* =gs ==========================================
    ESTRUCTURA GENERAL
   ============================================== */
main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
    font-family: var(--font-pixel);
}

/* =gs ==========================================
    CONTENEDOR DEL FORMULARIO
   ============================================== */
form, 
main > .form-input {
    width: 100%;
    max-width: 450px; /* Un poco más ancho que el login por el texto de términos */
    background-color: var(--bg-card);
    padding: 2rem;
    border: 2px solid var(--primary-color);
    box-shadow: 6px 6px 0px var(--registro-color); /* Sombra sólida estilo retro */
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* Contenedor del botón "VOLVER" (fuera del form) */
main > .form-input {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    text-align: center;
    margin-bottom: 10px;
}

/* =gs ==========================================
    INPUTS Y LABELS
   ============================================== */
.form-input {
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

label {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Estilos para texto, password Y EMAIL */
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 15px;
    background-color: #000;
    border: 1px solid #555;
    color: var(--text-color);
    font-family: var(--font-pixel);
    font-size: 1.5rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(0, 171, 255, 0.5);
}

/* =gs ==========================================
    CHECKBOX Y TÉRMINOS (ESTILO GAMER)
   ============================================== */
/* Contenedor específico para la línea de términos */
.form-input label:has(.checkbox) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.1rem; 
    color: var(--text-color);
    cursor: pointer;
}

.form-input label a {
    color: var(--secondary-color);
    text-decoration: none;
    margin: 0 5px;
    border-bottom: 1px dashed var(--secondary-color);
}

.form-input label a:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Personalización del Checkbox */
input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none; /* Quita el estilo por defecto del navegador */
    width: 24px;
    height: 24px;
    background-color: #000;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    display: inline-block;
    position: relative;
    margin-left: 10px;
    flex-shrink: 0; /* Evita que se aplaste si hay mucho texto */
}

/* Estado Checkeado (Simula un pixel lleno) */
input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    box-shadow: inset 0 0 0 4px #000; /* Crea un efecto de cuadro dentro de cuadro */
}

/* =gs ==========================================
    BOTÓN DE MOSTRAR CONTRASEÑA
   ============================================== */
#togglePassword {
    position: absolute;
    right: 15px;
    top: 45px; /* Ajustado para centrar con el input */
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    filter: invert(1);
    opacity: 0.7;
    transition: opacity 0.3s;
}

#togglePassword:hover {
    opacity: 1;
}

/* =gs ==========================================
    BOTONES (SUBMIT Y VOLVER)
   ============================================== */
input[type="submit"],
.button {
    display: inline-block;
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: #000;
    border: none;
    font-family: var(--font-pixel);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 0.1s, box-shadow 0.1s;
}

/* Hover effects */
input[type="submit"]:hover,
.button:hover {
    background-color: var(--secondary-color);
    color: #fff;
    box-shadow: 0 0 15px var(--secondary-color);
}

input[type="submit"]:active,
.button:active {
    transform: scale(0.98);
}

/* Estilo específico para el botón VOLVER (Outline) */
.button {
    background-color: transparent;
    border: 2px solid var(--registro-color);
    color: var(--registro-color);
    box-sizing: border-box;
}

/* =gs ==========================================
    RESPONSIVE
   ============================================== */
@media (max-width: 600px) {
    main { 
        padding: 10px;        
        margin-top: 20%;
    }
    
    form {
        padding: 1.5rem;
        width: 100%;
    }

    h1 { font-size: 2rem; }

    /* Ajuste texto términos en móvil */
    .form-input label:has(.checkbox) {
        font-size: 1rem;
        flex-direction: row; /* Mantiene el checkbox a la derecha */
    }
}