/* ESTILOS COMPLETOS PARA HUB DE ESTUDIANTES - MOBILE FIRST */

/* Variables CSS globales */
:root {
    --color-principal: #673ab7;
    --color-secundario: #34a853;
    --color-fondo: #f0ebf8;
    --color-blanco: #ffffff;
    --color-texto-primario: #202124;
    --color-texto-secundario: #5f6368;
    --color-error: #ea4335;
    --color-exito: #34a853;
    
    --sombra-card: 0 2px 4px rgba(0,0,0,0.1);
    --sombra-elevada: 0 4px 8px rgba(0,0,0,0.15);
    
    --border-radius: 8px;
    --border-radius-button: 24px;
    --transition-suave: all 0.2s ease;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', 'Roboto', Arial, sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto-primario);
    line-height: 1.5;
    min-height: 100vh;
    padding: 0;
}

/* CONTENEDOR PRINCIPAL */
.container {
    max-width: 760px;
    margin: 0 auto;
    background: var(--color-blanco);
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    overflow: hidden;
}

/* HEADER DEL FORMULARIO */
.form-header {
    background: var(--color-principal);
    color: var(--color-blanco);
    padding: 24px 20px;
    text-align: center;
}

.form-title {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 8px;
}

/* CONTENIDO PRINCIPAL */
.form-content {
    padding: 40px 20px;
    text-align: center;
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PANTALLA DE LOADING */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-fondo);
    border-left-color: var(--color-principal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 16px;
    color: var(--color-texto-secundario);
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* PANTALLA DE LOGIN */
.login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 320px;
    margin: 0 auto;
    padding: 20px;
}


.login-button {
    background: var(--color-blanco);
    color: var(--color-texto-primario);
    border: 2px solid #dadce0;
    border-radius: var(--border-radius-button);
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-suave);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: center;
    min-height: 48px;
}

.login-button:hover {
    border-color: var(--color-principal);
    box-shadow: var(--sombra-card);
}

.google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* PANTALLA DEL HUB */
.hub-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    max-width: 320px;
    margin: 0 auto;
    padding: 20px;
}

.welcome-section {
    text-align: center;
}

.welcome-avatar {
    font-size: 48px;
    margin-bottom: 16px;
}

.welcome-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--color-texto-primario);
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--color-texto-secundario);
}

/* BOTONES DE NAVEGACIÓN */
.navigation-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.nav-button {
    background: var(--color-principal);
    color: var(--color-blanco);
    border: none;
    border-radius: var(--border-radius-button);
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-suave);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    width: 100%;
}

.nav-button:hover {
    background: #563098;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.3);
}

.nav-button:active {
    transform: translateY(0);
}

.nav-button.secondary {
    background: var(--color-secundario);
}

.nav-button.secondary:hover {
    background: #2e7d32;
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.3);
}

.nav-button.disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
}

.nav-button.disabled:hover {
    background: #e0e0e0;
    transform: none;
    box-shadow: none;
}

.nav-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* ACCIONES DE USUARIO */
.user-actions {
    width: 100%;
    margin-top: 16px;
}

.logout-link {
    background: transparent;
    color: var(--color-texto-secundario);
    border: 1px solid #dadce0;
    border-radius: var(--border-radius-button);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-suave);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.logout-link:hover {
    border-color: var(--color-error);
    color: var(--color-error);
}

/* MENSAJE DE MANTENIMIENTO */
.maintenance-message {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius-button);
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

/* PANTALLA DE ERROR */
.error-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 320px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.error-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--color-texto-primario);
    margin-bottom: 8px;
}

.error-message {
    font-size: 16px;
    color: var(--color-texto-secundario);
    margin-bottom: 24px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.retry-button,
.debug-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-suave);
}

.retry-button {
    background: var(--color-principal);
    color: var(--color-blanco);
}

.retry-button:hover {
    background: #563098;
}

.debug-button {
    background: #f1f3f4;
    color: var(--color-texto-secundario);
}

.debug-button:hover {
    background: #e8eaed;
}

.error-contact {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #dadce0;
}

.error-contact small {
    color: var(--color-texto-secundario);
    font-size: 12px;
}

/* SISTEMA DE TOASTS */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--color-blanco);
    border-radius: var(--border-radius);
    box-shadow: var(--sombra-elevada);
    padding: 16px 20px;
    max-width: 320px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 9999;
    border-left: 4px solid;
}

.toast.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-error {
    border-left-color: var(--color-error);
}

.toast-success {
    border-left-color: var(--color-exito);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 14px;
    color: var(--color-texto-primario);
    font-weight: 500;
}

/* RESPONSIVE DESKTOP */
@media (min-width: 768px) {
    body {
        padding: 20px 0;
    }
    
    .container {
        border-radius: var(--border-radius);
        box-shadow: var(--sombra-card);
        min-height: auto;
    }
    
    .form-header {
        padding: 40px;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .form-title {
        font-size: 28px;
    }
    
    .form-content {
        padding: 80px 40px;
        min-height: auto;
    }
    
    .hub-screen,
    .login-screen,
    .error-screen {
        max-width: 400px;
        padding: 40px;
    }
    
    .navigation-buttons {
        max-width: 320px;
    }
}