:root {
    --bg-color: #0b0b0b;
    --card-bg: #121212;
    --text-main: #e3e3e3;
    --google-blue: #a8c7fa;
    --border-grey: #444746;
}

body {
    background-color: var(--gm3-sys-color-surface-container, #202121);
    color: var(--text-main);
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.card {
    background-color: rgb(12 12 12);
    width: 1000px; /* Más ancho para el diseño dividido */
    min-height: 334px;
    border-radius: 28px;
    padding: 48px;
    display: flex;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 153px;
    margin-left: 24px;
    cursor: pointer;
    user-select: none;
}
.checkbox-wrapper input {
    display: none;
}
.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #909090; /* Gris de la foto */
    border-radius: 2px;
    display: inline-block;
    position: relative;
    transition: all 0.2s;
}
.checkbox-wrapper input:checked + .checkmark {
    background-color: var(--google-blue);
    border-color: var(--google-blue);
}

/* El check interno */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #062e6f;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked + .checkmark:after {
    display: block;
}

/* --- ANIMACIÓN LOADER CORREGIDA --- */
.loader-container {
    position: fixed;
    top: 141px;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
    overflow: hidden;
    display: none;
}

.loader-progress {
    position: absolute;
    width: 30%;
    height: 100%;
    background-color: var(--google-blue);
    animation: load-run 1.5s infinite ease-in-out;
}

@keyframes load-run {
    0% { left: -30%; width: 10%; }
    50% { width: 30%; }
    100% { left: 100%; width: 10%; }
}
/* Sección Izquierda */
.info-section { width: 50%; display: flex; flex-direction: column; }
.logo { width: 48px; margin-bottom: 24px; }
h1 { font-size: 36px; font-weight: 400; margin: 0 0 12px 0; }
.subtitle { font-size: 18px; margin: 0; }

/* Sección Derecha */
.form-section { width: 50%; padding-left: 40px;    padding-top: 72px; display: flex; flex-direction: column; position: relative; }

/* Floating Label Input */
.input-container { position: relative; margin-top: 20px; }
input {
    width: 100%; padding: 16px; background: transparent;
        border: 1.5px solid #909090; border-radius: 8px;
    color: white; font-size: 16px; outline: none; box-sizing: border-box;
}
input:focus { border: 2px solid var(--google-blue); }

/* Estado de error para el input */
input.error-style {
    border: 2px solid #f28b82 !important;
}

input.error-style + label {
    color: #f28b82 !important;
}

.error-message {
    color: #f28b82;
    font-size: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    display: none; /* Oculto por defecto */
}
label {
    position: absolute; left: 16px; top: 16px; color: #9aa0a6;
    transition: 0.2s ease all; pointer-events: none; background: var(--card-bg); padding: 0 4px;
}

/* Estilos específicos para la validación de notificación */
.number-display {
    font-size: 72px;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 24px;
    text-align: center;
}

.instruction-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 16px;
}

.instruction-body {
    font-size: 14px;
    line-height: 1.6;
    color: #c4c7c5;
}

.instruction-body b {
    color: var(--google-blue);
}

.divider {
    border-top: 1px solid var(--border-grey);
    margin: 40px 0 20px 0;
    width: 100%;
}

.actions-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* --- Fase 4: Estilo Blanco --- */
/* Fase 4: Estilo de tarjeta blanca */
.card.success-mode {
    background-color: #ffffff !important;
    color: #1f1f1f !important;
    width: 500px !important;
    min-height: auto !important;
    flex-direction: column !important;
    border: 1px solid #dadce0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.card.success-mode h1, 
.card.success-mode p {
    color: #1f1f1f !important;
}
/* Clase para cuando el input tiene foco o texto */
input:focus + label, input:not(:placeholder-shown) + label {
    top: -10px; left: 10px; font-size: 12px; color: var(--google-blue);
}

.link-blue { color: var(--google-blue); font-size: 14px; font-weight: 600; text-decoration: none; margin-top: 12px; cursor: pointer; }
.guest-info { font-size: 14px; color: #9aa0a6; margin-top: 40px; line-height: 1.4; }

/* User Pill (Foto de perfil y correo) */
.user-pill {
    display: inline-flex; align-items: center; padding: 4px 12px 4px 6px;
    border: 1px solid var(--border-grey); border-radius: 20px;
    margin-bottom: 24px; font-size: 14px; width: fit-content; cursor: pointer;
}
.user-icon { background: #5f6368; border-radius: 50%; padding: 4px; margin-right: 8px; font-size: 12px; }

/* Botones Inferiores */
.actions { margin-top: auto; display: flex; justify-content: flex-end; align-items: center; gap: 24px; }
.btn-next { background: var(--google-blue); color: #062e6f; border: none; padding: 12px 28px; border-radius: 24px; font-weight: 600; cursor: pointer; }

/* Loader Barra Superior */
.loader-progress { width: 40%; height: 100%; background: var(--google-blue); animation: load 1.5s infinite linear; }
@keyframes load { 0% { left: -40%; } 100% { left: 100%; } }

/* --- RESPONSIVE DESIGN (MÓVIL TOTAL) --- */
@media (max-width: 768px) {
    body {
        background-color: #0b0b0b; /* Fondo uniforme */
        align-items: flex-start; /* Alinea al inicio superior */
        display: block; /* Cambiamos flex por block para evitar estiramientos raros */
        overflow-x: hidden; /* Evita el scroll horizontal */
    }

    .card {
        width: 100% !important; /* Obliga a ocupar el 100% del ancho del teléfono */
        max-width: 100vw;
        min-height: 100vh;
        border-radius: 0;
        padding: 24px 20px; /* Padding ajustado a pantallas pequeñas */
        flex-direction: column; /* Apila las secciones */
        box-sizing: border-box; /* Asegura que el padding no sume ancho */
        background-color: transparent;
        display: flex;
    }

    /* Quitamos el diseño de 50% / 50% */
    .info-section, .form-section {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .info-section {
        margin-bottom: 20px;
    }

    /* Ajuste de textos */
    h1 {
        font-size: 28px !important; /* Más pequeño para que no rompa línea */
        margin-bottom: 15px;
    }

    .subtitle {
        font-size: 16px;
        margin-bottom: 25px;
    }

    /* El loader en móvil debe estar arriba de todo */
    .loader-container {
        top: 0;
        position: absolute;
    }

    /* Ajuste de los botones inferiores en móvil */
    .actions {
        margin-top: 50px;
        flex-direction: row; /* Mantiene Crear cuenta y Siguiente en la misma línea */
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* Ajuste del checkbox para que no quede tan lejos */
    .checkbox-wrapper {
        margin-top: 68px;
        margin-left: -15px;
     
    }
    
    /* Fase 4 móvil (Blanco) */
    .card.success-mode {
        background-color: #ffffff !important;
        padding-top: 60px;
    }
}